Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing Objects into a Visual Studio 2010 Server Project

I'm trying to reverse engineer my database via the SQL Server Wizard in the VS2010 database project template. I'm able to RE my database, but it's not enough, because in order for my sprocs to compile without errors and warnings, I need to have my linked servers and their logins included also. However, my DBA's can't give me the required VIEW ALL DEFINITION permission on the SQL Server in order to run that wizard at the server level. They don't want to do that for me in VS2010 so I am stuck. Has anyone had success compiling or found a work around for using the database level database project and using linked servers and other server level objects?

like image 995
StoneJedi Avatar asked Nov 13 '22 13:11

StoneJedi


1 Answers

Developers can create an empty server project. You can then have your DBAs populate it via "Import Database Scripts and Objects" command. Just have them right-click the server project and they'll see that as the top command.

Your database project then should add a reference to this server project, and you should be all set.

Microsoft designed database projects on the assumption that only a DBA will import objects. For instance, in importing a SQL Server 2008 database, if you don't have "VIEW DEFINITIONS" privilege, you'll get an error about attempting to import user encryption keys. You'll get this error even if there are no user encryption keys! They assume only a DBA will do that.


Read and vote on Schema Compare permission error for Database Encryption Keys even though the type is set to be ignored if you would like to let Microsoft know what you think about this issue.

like image 154
John Saunders Avatar answered Nov 16 '22 23:11

John Saunders