5

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?

4
  • 1
    Are you referencing system objects, or objects within other databases?
    – mrdenny
    Feb 22, 2011 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, 2011 at 10:58
  • Are you referencing system objects, or objects within other databases?
    – mrdenny
    Feb 22, 2011 at 21:50
  • I've added it as an answer. Didn't expect it to be quite that simple. :)
    – mrdenny
    Feb 22, 2011 at 21:51

0