Question

I am trying to compare two databases using Visual Studio 2012. However, the SQL instance where my database is being hosted is extremely locked down and my user does not have access to the VIEW DEFINITIONS permission.

I'm getting these errors in Visual Studio:

The target database schema could not be retrieved. The reverse engineering operation cannot continue because you do not have View Any Definition permission on the server '(URL here)'.

Comparing the master database requires VIEW ANY DEFINITION permission.

But yet, I can use tools like Red-Gate SQL Compare and XSQL to compare the databases. I don't want to purchase this software and I rather use Visual Studio 2012 because I already have a license... How can I overcome this problem? Is there any way I can use SQL Server Data Tools without VIEW ANY DEFINITION permission?

Was it helpful?

Solution 3

Running a comparison at the database-level rather than the instance-level did the trick.

OTHER TIPS

You need to give db_owner permission in SQL server to user as

SQL server
Security
Logins
Specific user
User mapping
Specific database
Check db_owner
OK

Oddly enough, restarting my Visual Studio fixed the issue for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top