Visual Studio 2010 database edition schema compare where target is dbproj
Asked Answered
I

2

14

I'm using visual studio 2010 database edition and running a schema compare against a SQL database instance to sync up new objects on the database which arent yet in my project (dbproj). My solution contains many projects some of which reference each other via database references. When I write updated from my schema compare to my target project any references to objects in my other projects get added as hard references and do not use the sqlcmd variables that get set up when adding a database references.

This causes my solution to have warnings and errors until I manually swap out the hard references for the sqlcmd variables. I've found I can re-make the database references which has an option to pick up all the hard references through the project but this is still cumbersome. Is there a way to use the existing set of sqlCmd variables defined for my project such that updated are written to my project with the variable references used?

Ideography answered 22/7, 2010 at 22:8 Comment(0)
I
1

This is just a thought but we never make direct changes in the database and use our project to build against the db to produce a deploy script. By using the project as the master of all knowledge we feel this works very well for us.

We branch out to create our dev, test environments then merge the project when we deploy.

As for references, we found referencing the dbmeta file instead of the actual database was also useful as it makes all the projects more transferable.

Interlocution answered 7/9, 2010 at 11:49 Comment(0)
G
0

My solution isn't exactly what you want to do, but it might help.. When I run into similar issues, I usually create a (temp) DB for the schema compare & use it instead of my project..

Glockenspiel answered 1/8, 2010 at 13:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.