Prevent deletion of certain procedures and functions when using SQLCompare

I'm using SQLCompare thought cmd line with /project and /filter to sync a DB. the source is a script folder.
The filter is used to update only schema:tSQLt, i.e. unit tests.
 
What I want to do is prevent the deletion of any new tests on the DB, tests that are not in my repo. (added by the devs, but not uploaded to repo)
I was hoping to use /exclude: Additional but that does not work with /project.
I then tried without using /project and found out that you can't use /filter with /exclude.

So my question is, is there any way to use SQLCompare to sync a DB with specific schema, while not deleting anything on the target DB?

Best Answer

  • tryggviFMEtryggviFME Posts: 5 New member
    Accepted Answer
    1. We have a DEV DB that contains a number of tSQLt unit tests. The tests are run daily. The Devs(bless their little hearts) often make changes to the DB, like deleting tests.  I would like to be able to sync only the tests, while not deleting any new tests the devs might be working on. 

    2. The project file contains various setting I use to control the DB sync. As stated before, I've tried using SQLCompare without the project file but you can't use filter with exclude. 

    3.The devs (bless their little hearts) work on the servers and forget sometimes to commit their changes to a repo. 

    I just realized (from your comment) that I can probably just filter the source folder to contain only the tests. Then I don't need to use the filter in SQLCompare and I can then run SQLCompare without /project and use /exclude: Additional with /Scripts1 and /database2.

Answers

Sign In or Register to comment.