yar*_*ing 107 sql-server ssms sql-server-2008 sql-server-2012 sql-server-2014
当我右键单击表中的索引文件夹时,"新索引"菜单项显示为灰色.我不明白为什么.为了防万一,我删除了表中的所有数据,并刷新并重新启动了SSMS,但没有运气.我正在使用SQL Server 2012 Business Intelligence SP1 CTP.
Kei*_*ith 248
解决方案:关闭表设计器和数据库图表,然后重试.如果这没有帮助,请关闭Management Studio中的所有窗口.
原因:当表被模式锁定时,"新索引"选项被禁用.
It could be a rights issue, or perhaps you've become disconnected. Try using code to add the index; that may resolve your issue, or report a more meaningful exception for you to work from:
create index ix_MyTable_Column1
on dbo.MyTable(Column1 asc)
Run Code Online (Sandbox Code Playgroud)
http://msdn.microsoft.com/en-us/library/ms188783.aspx