[dba-SQLServer] can't specify database in DROP INDEX

jwcolby jwcolby at colbyconsulting.com
Wed Jun 17 08:01:49 CDT 2009


I found AN answer.

It turns out that there are two valid syntaxes

DROP INDEX TblName.IndexName.  With this syntax it is NOT valid to specify the database name, i.e. 
DBName.TblName.IndexName.

Another syntax is DROP INDEX IndexName ON DatabaseName.TableName where it IS valid to include the 
database name.

Thanks for all your help!  ;)

John W. Colby
www.ColbyConsulting.com


Arthur Fuller wrote:
> USE <dbName>
> DROP INDEX <indexName>
> 
> hth,
> Arthur
> 
> On Wed, Jun 17, 2009 at 8:26 AM, jwcolby <jwcolby at colbyconsulting.com>wrote:
> 
>> Am I missing something?
>>
>> CREATE INDEX allows me to specify the database but DROP INDEX gives me an
>> error message
>>
>> 'DROP INDEX does not allow specifying database name...'
>>
>> Please tell me there is a way around this.
>>
>>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 



More information about the dba-SQLServer mailing list