T-SQL: Cannot drop the index because it does not exist or you do not have permission.

2010 February 1
by r.claypool

database

Quick tip:   The table name and index name are required to drop an index, otherwise SQL Server will return an error.

e.g.

DROP INDEX [dbo].[IX_MyIndex]

fails with …

Msg 3701, Level 11, State 6, Line XX
Cannot drop the index 'dbo.IX_MyIndex', 
because it does not exist or you do not have permission.

However,

DROP INDEX [dbo].[MyTable].[IX_MyIndex]

will work fine if it exists and you have sufficient permissions. (Use Select user_name() to determine your user context, which will help to verify the permissions being used.)

One Response leave one →
  1. 2010 August 22
    hassan permalink

    I`vw the following error

    Msg 3701, Level 11, State 5, Line 1
    Cannot drop the table ‘islamabad’, because it does not exist or you do not have permission.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

This work by Robert Claypool is licensed under a Creative Commons Attribution 3.0 United States.