cannot drop the view 'XXX' because it does not exist or you do not have permission

surya teja picture surya teja · Apr 7, 2016 · Viewed 25.2k times · Source

We migrated our servers from 2005 to 2014, User is able to delete it in the 2005 server But in 2014 we are getting the error as do not have permission or does not exits We have given to same permissions and even he is a system admin.In our application side they are not able to drop the view the application users are connecting through a user in our database he has all the permissions and he is sysyadmin

Answer

Sourcery picture Sourcery · May 19, 2016

I had a very similar problem. Make sure that the Schema didn't change when you moved the database.

In my case all the tables and views were placed in a schema with the databasename, so instead of the tables be called eg. table1, they were called database.table1.

As said, this is one reason this error is displayed.

Edit: after seeing the comments they suggest the same thing, to use the schema before the tablename, and yes. if dbo is your schema, then try writing dbo.tablename