question

ranjeetffdfdfd avatar image
ranjeetffdfdfd asked

unable to delete SCHEMA due to object

I am unable to delete the SCHEMA due to object and getting below error Msg 3701, Level 11, State 6, Line 1 Cannot drop the index 'LICHECK_STARTUP.index_name', because it does not exist or you do not have permission. please help me asap
schema
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Magnus Ahlkvist avatar image Magnus Ahlkvist commented ·
Now I'm confused. The error message about not being able to drop index LICHECK_STARTUP.index_name - when is that happening? I understand that you can't drop the schema if there are objects owned by the schema. You can solve that by moving the objects to another schema, or by simply dropping the objects.
1 Like 1 ·
ranjeetffdfdfd avatar image ranjeetffdfdfd commented ·
Msg 3729, Level 16, State 1, Line 3 Cannot drop schema 'sfp_shd' because it is being referenced by object 'LICHECK_STARTUP'. schema name sfp_shd
0 Likes 0 ·

1 Answer

·
David Wimbush avatar image
David Wimbush answered
Is LICHECK_STARTUP a table? If so, the syntax is DROP INDEX index_name ON [schema_name.]table_name.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.