Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After using for some time MS SQL Server Management Studio for creating and editing databases I tried to use Visual Studio 2010 "SQL Server 2008 Database Project" for this.

I used the SQL 2008 Wizard for importing existing database to VS2010. Everything went ok. Build succeeded as well. But when I try to deploy the database back to the server under another name I got lots of errors of type "Procedure: XXXX has an unresolved reference to object XXXX".

I'm surprised because all these stored procedures in fact work well and SQL Server Management Studio never complained about them. What could be wrong?

share|improve this question
Are you referencing system objects, or objects within other databases? – mrdenny Feb 22 '11 at 8:23
@mrdenny Thanks, you helped me to see my silly mistake. Stored procedures contained the name of the database before the name of schema (it was, of course, the previous name of the database so it always gave an error). After I removed it all get ok. If you put your tip as an answer, I'll accept it. Or should I delete my question? Anyway, thank you once again! – rem Feb 22 '11 at 10:58
I've added it as an answer. Didn't expect it to be quite that simple. :) – mrdenny Feb 22 '11 at 21:51
up vote 4 down vote accepted

Are you referencing system objects, or objects within other databases?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.