How to make Visual studio schema comparison igonore database references -
we using visual studio 2010 , our database scripts in database project.
have 2 databases db1 , db2. db1 uses db2.
created database project each of databases , added db2's .dbschema file "database reference" db1's project. code view in db1
create view dbo.myview select * [$(db2ref)].dbo.sometable go until here fine. when make schema comparison between actual db1 database , db1 database project, comparison finds difference between "myview" in project , "myview" in database.
is there way make schema comparisons igonore these referenced database variables ?
yo can set default sql cmd variable in project settings actual database name. schema compare in visual studio know there no change. unfortunately if compare against different databases different names, you'll need change default each time database you're comparing to.
setting sql cmd variable default
sql schema compare of view - top without default defined , object marked change, , bottom variable defined , marked no-action
sorry not enough rep add images or more 3 links yet
Comments
Post a Comment