Microsoft KB Archive/276374

= BUG: Query Analyzer May Allow an Invalid Seed Number During Table Creation =

Article ID: 276374

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q276374



BUG #: 58514 (SQLBUG_70)



SYMPTOMS
With Microsoft SQL Query Analyzer, you may be allowed to enter an invalid (overflowed) identity seed value when you create a table. After the table is created, SQL Query Analyzer also allows you to insert rows. After you enter the data with Query Analyzer, you cannot do either of the following from SQL Server Enterprise Manager (SEM):  View the table design. -or-

 View the database diagram.

After errors occur in situations a. or b., you may not be able to access any database in SEM.

If you create the same table from SEM, the following behavior occurs:
 * When you save the table, the number is automatically corrected to 2147483647 if the identity seed number entered is invalid (for example, entered 151,000,000,000).



WORKAROUND
To work around this, use the following steps:
 * 1) Create the table with SQL Server Enterprise Manager, and then manually define the data type, identity column, id seed, and so forth.
 * 2) Save the table, and note that it is automatically corrected to 2147483647 if the identity seed number entered is invalid (for example, entered 151,000,000,000).
 * 3) Use Transact-SQL to set the identity column length and the seed value to a valid number.

For additional references, see the DBCC CHECKIDENT (T-SQL) topic in SQL Server Books Online.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.

Additional query words: sql 7.0 identity seed QA

Keywords: kbbug kbpending KB276374

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.