Options

Filter stored procedure copy

tkloostertklooster Posts: 2
edited April 28, 2010 11:40AM in SQL Compare Previous Versions
I have SqlCompare 6.2. I'd like to use it to synchronize my stored procedures across multiple dbs when we do a new release. I have a bat file with a line below for each db. How do I add a filter to only copy stored procedures that start with sp_ for example?
Thanks,
Tim

"c:\Program Files\Red Gate\SQL Compare 6\SQLCompare.exe" /s1:.\devdb /db1:modeldb /s2:.\devdb /db2:db1 /include:StoredProcedure:[$(CurText)] /synchronize

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Tim,

    The object names are in the form of regular expressions, so in order to select something that "starts with" some test, you can put it right after a bracket because all object names in SQL Compare are bracketed. For instance, you could use \[sp_ (the backslash is necessary in DOS because it uses the bracket for something internally). If you wanted something that ends in _sp you could use _sp\]

    Hope this helps.
Sign In or Register to comment.