SQL Server Management Studio won't let me add an index to a table

When I right-click on the index folder in the table, the "New Index" menu item is not available. I do not understand why. I deleted all the data in the table just in case, updated and restarted SSMS, but no luck. I am using SQL Server 2012 Business Intelligence SP1 CTP.

+104
sql-server sql-server-2008 sql-server-2012 ssms sql-server-2014
Nov 18 '12 at 18:44
source share
4 answers

Solution: Close the table and chart designers of the database and try again. If this does not help, close all windows in Management Studio.

Cause. The New Index option is disabled when the table is locked by a schema in the designer window.

+237
Nov 19 '12 at 2:57
source share

This may be a rights issue, or you may have disconnected. Try using the code to add the index; this may solve your problem or report a more significant exception from which you can work:

create index ix_MyTable_Column1 on dbo.MyTable(Column1 asc) 

http://msdn.microsoft.com/en-us/library/ms188783.aspx

+5
Nov 18 '12 at 18:54
source share

Close the table if it is open in the designer. Right-click on the indexes for the table and select Rebuild All. This will fix it ...

+2
Jan 16 '19 at 16:42
source share

In my case, it was a view, not a table, because the view was not created using a schema binding. I changed it using a schema binding, and then I could add an index to the view. NTN.

0
Feb 19 '19 at 10:31
source share



All Articles