Composite index error on alter table statement

Composite index error on alter table statement

Post by JSI FundRaising R&D Grou » Thu, 06 Apr 2000 04:00:00



We are changing some column sizes in our database using the Alter table
statement. We have one table at one of our client sites getting the
following error:

1903 - 37000 - [Microsoft][ODBC SQL Server Driver][SQL Server]900 is the
maximum allowable size of an index. The composite index specified is 4000
bytes.

Even if I drop off all of the indexes I get this error.  Are there hidden
indexes in SQL 7.0?  Anybody have an idea on this one?  The column being
changed is not part of any index I can see.

Thanks!

Michaele James
JSI FundRaising Systems

 
 
 

Composite index error on alter table statement

Post by Tibor Karasz » Thu, 06 Apr 2000 04:00:00


Michaele,

A few guesses:

What does sp_helpindex tblname say?
Any statistics?

Foreign key?

--
Tibor Karaszi, Cornerstone Sweden AB
MCDBA, MCSE, MCSD, MCT, SQL Server MVP
Please reply to the newsgroup only, not by email.



> We are changing some column sizes in our database using the Alter table
> statement. We have one table at one of our client sites getting the
> following error:

> 1903 - 37000 - [Microsoft][ODBC SQL Server Driver][SQL Server]900 is the
> maximum allowable size of an index. The composite index specified is 4000
> bytes.

> Even if I drop off all of the indexes I get this error.  Are there hidden
> indexes in SQL 7.0?  Anybody have an idea on this one?  The column being
> changed is not part of any index I can see.

> Thanks!

> Michaele James
> JSI FundRaising Systems



 
 
 

Composite index error on alter table statement

Post by JSI FundRaising R&D Grou » Thu, 06 Apr 2000 04:00:00


That column in question is not used in Foreign Keys.  When I do a
sp_helpindex there is a statistics set up on that column,
_WA_Sys_namecomm_2EDAF651.  Could it be causing the problem?

I will drop the statistics and see if I can do the alter table with no
error....

Thanks


>Michaele,

>A few guesses:

>What does sp_helpindex tblname say?
>Any statistics?

>Foreign key?

>--
>Tibor Karaszi, Cornerstone Sweden AB
>MCDBA, MCSE, MCSD, MCT, SQL Server MVP
>Please reply to the newsgroup only, not by email.



>> We are changing some column sizes in our database using the Alter table
>> statement. We have one table at one of our client sites getting the
>> following error:

>> 1903 - 37000 - [Microsoft][ODBC SQL Server Driver][SQL Server]900 is the
>> maximum allowable size of an index. The composite index specified is 4000
>> bytes.

>> Even if I drop off all of the indexes I get this error.  Are there hidden
>> indexes in SQL 7.0?  Anybody have an idea on this one?  The column being
>> changed is not part of any index I can see.

>> Thanks!

>> Michaele James
>> JSI FundRaising Systems


 
 
 

Composite index error on alter table statement

Post by JSI FundRaising R&D Grou » Thu, 06 Apr 2000 04:00:00


It was the statistics, I dropped that particular statistics and I was able
to change the size of the column.

Thanks, you saved me a lot of time on this.


>That column in question is not used in Foreign Keys.  When I do a
>sp_helpindex there is a statistics set up on that column,
>_WA_Sys_namecomm_2EDAF651.  Could it be causing the problem?

>I will drop the statistics and see if I can do the alter table with no
>error....

>Thanks


>>Michaele,

>>A few guesses:

>>What does sp_helpindex tblname say?
>>Any statistics?

>>Foreign key?

>>--
>>Tibor Karaszi, Cornerstone Sweden AB
>>MCDBA, MCSE, MCSD, MCT, SQL Server MVP
>>Please reply to the newsgroup only, not by email.



>>> We are changing some column sizes in our database using the Alter table
>>> statement. We have one table at one of our client sites getting the
>>> following error:

>>> 1903 - 37000 - [Microsoft][ODBC SQL Server Driver][SQL Server]900 is the
>>> maximum allowable size of an index. The composite index specified is
4000
>>> bytes.

>>> Even if I drop off all of the indexes I get this error.  Are there
hidden
>>> indexes in SQL 7.0?  Anybody have an idea on this one?  The column being
>>> changed is not part of any index I can see.

>>> Thanks!

>>> Michaele James
>>> JSI FundRaising Systems


 
 
 

1. multiple ALTER COLUMNs in one ALTER TABLE statement?

Hello,

I am afraid the answer is no but is there a way to do something like this:

ALTER TABLE mytable
    ALTER COLUMN col1 int,
    col2 float

I am taking a database that has been created by an upsizing wizard from
Visual FoxPro and all the numerics are set to float in SQL Server and I want
to use varchar on longer text fields (I'll ask about that in another post).
since many of the tables have 10 or more fields that need changing I just
used Enterprise Manager to Generate SQL for the database and used my text
editor to change the column values and change from CREATE to ALTER.

What I have now is a script with a lot of ALTER TABLEs that look like the
above but Query Analyzer is not liking it.

Thanks, Tom

2. Full name from user name

3. Alter ALTER TABLE statement ...

4. (no subject)

5. Error Trapping for Alter table statement

6. Restricted specification

7. scripting problem - ALTER statements are before the create table statements

8. SELECTing first x results (a FAQ?)

9. Errors With ALTER TABLE/ALTER COLUMN

10. referencing composite key in create table statement

11. Creating Unique composite Index on a table which has datetime as one of its keys

12. composite Index to a DBASE Table

13. Composite Indexes vs. Multiple Single-column indexes