HOw do i use regular expressions in an exclude list?
stiej1977
Posts: 12
Hi,
I want to compare two databases using the command line. but i want it to ignore all stored procs that begin with sp_MS.
How do i write this?
Thanks!
I want to compare two databases using the command line. but i want it to ignore all stored procs that begin with sp_MS.
How do i write this?
Thanks!
Comments
Here's how we do it:
differencesParam is a Differences instance obtained from Database.CompareWith(null, options)
but where would i place that code? how do i get sqlcompare.exe to use it?
thanks again.
Using the pre-built command-line tool, the usage is similar, only the regular expression matches the object type, for instance The above will exclude any table beginning with the word Widget.
And are you missing the closing square brakect purposely?
If you want to use /include /exclude options on stored procedures, you'd use /exclude:StoredProcedure:<regex>. To see the full list of objects that you can include or exclude, use the program help by running SQLCOMPARE.exe /? /v | more. all of the supported object types are then listed to the console.