June 10, 2011 at 7:20 pm
I am migrating our database scripting and update processes to Visual Studio 2010 Premium. There are three production databases serving data to our applications. I have a single solution in VS2010 which has 3 database projects in it (one for each db). I reverse engineered the databases into each of the projects from our production server. All has gone fairly smoothly. However, I have 79 errors left to resolve. All of those are the "SQL03006 ...contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects:" error. It appears that all of the objects involved are referring to cross database objects which are represented by synonyms in the target database. The column used for a join field seems to be the primary problem field. The error is easy to recreate using the following steps:
1. Create a new database project / solution. name the db database1
2. Add a new database project to the solution. name the new db database2
3. In database1 create 2 tables that can be joined together. (no data needed for this exercise)
4. In database2, add a reference to database1
5. In database2, create a synonym for the 2 tables in database1
6. In database2, create a view which joins the 2 synonyms together and returns some or all of the columns from the tables.
7. Build the solution.
You will receive the error described above.
I have searched the web and microsoft and sql server central for an answer / workaround for this. It does appear to be a bug and it appears that Microsoft is aware of these issues. However, that does me no good right now.
I have tried several things found in my search. Using the referenced database name, 2, 3 part naming, etc to try to get this error to go away. I have even tried beating my head on my desk. that didn't help either...
Has anyone had to deal with this issue? Does anyone know of a functional workaround? I would even be happy with some method to tell VS2010 to ignore the error in these objects.
Many thanks in advance,
Scott B Dragoo
Database Administrator
Yield Technologies
Scott B Dragoo
Enterprise Architect
Vitality Group
http://www.thevitalitygroup.com
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy