How to ONLY compare static data tables?

rb13crb13c Posts: 7
We're using SQL Source Control to link static data for a subset of tables in our database. Using the command line I can successfully run a SQL Data Compare from source control to a database. However, in order to filter on only the static tables, I have to list them all in the /include:table switch like:

/Include:table:\[dbo\]\.\[Table1\]^|\[dbo\]\.\[Table2\] etc.

This is less than ideal because now we have to link the table to source control and also maintain this second list. I likely am going to create a powershell script to generate this list from the scripts "Data" folder. This all seems very hackish, is there a better way?

I am aware of the /include:staticdata switch in SQL Compare but seems very limited. I can't get that to work to compare only staticdata without it comparing schema of all tables and security roles, etc. also.

Comments

  • Hello,

    Thanks for your post.

    You shouldn't have to use the /include switch at all.

    I just tested, and using

    /sourcecontrol1
    /revision1
    /sfx
    /server2
    /db2

    should give you the appropriate behavior. It will generate a script that will only compare the tables with linked data in source control.

    Here's a link to the descriptions of those switches: http://documentation.red-gate.com/displ ... mmand+line

    Please let me know if you're getting different behavior.

    Thanks,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • Thanks! I got this to work now using that. Previously I actually was using /scripts1 rather than /sourcecontrol1 and /sfx.
Sign In or Register to comment.