Home Databases MS SQL Server Create Non-Clustered Index on MSSQL

Create Non-Clustered Index on MSSQL

E-mail Print PDF
User Rating: / 2
PoorBest 

Normally, when you try to create Non-Clustered Index on MSSQL Server Platform, SE14 gives errors

Request: Create Index LIPS-Z01 (TUREKS/03.01.06/06:32)                                         

Process: msisrv03_0                                                                            

sql:                                                                                           

CREATE                                                                                         

INDEX [LIPS~Z01] ON [LIPS]                                                                     

( [VGBEL] ,                                                                                    

[VGPOS] )                                                                                      

Cannot create more than 249 nonclustered indices or column statistics on one table.            

DDL time(___1): ........56 milliseconds                                                        

The SQL statement was not executed                                                             

Index   could not be created completely in the database                                        

Index LIPS-Z01 could not be created                                                            

Request for LIPS could not be executed    

To overcome this situation, follow the below steps:

 1. Connect to MSSQL Server Console and execute the following command to drop the statistics data

SELECT 'DROP STATISTICS []' + QUOTENAME(OBJECT_NAME(id)) + '.' + QUOTENAME(name) FROM

sysindexes WHERE OBJECT_NAME(id) = '' AND INDEXPROPERTY(id, name,'ISStatistics') = 1

GO

2. Copy the Drop statements produced with the STEP1 and run

3. Create Non-Clustered Index via SE14 

 

Comments (0)add comment

Write comment
smaller | bigger

security image
Write the displayed characters


busy
 

Our valuable member Huseyin Bilgen has been with us since Saturday, 06 May 2006.