Comments
Sort by recent activity
I have a bit of a novel workaround for this if anyone is interested, although you will need to write some .NET code to parse the generated script file from SQL Compare.
In our shop, all of our Active Directory groups follow a convention where they begin with the string "SG_" after the domain, e.g. FLEXIRENT\SG_Database_ReadOnly_Users.
So we just use a regular expression to find all matches for the offending DEFAULT_SCHEMA string and remove them: *snip*
string CreateUserStatementRegEx = "(?<=CREATE\\sUSER\\s\\[.*?\\\\SG_.*?)WITH\\sDEFAULT_SCHEMA=\\[.*?\\]";
GeneratedSQLBatchString = Regex.Replace(GeneratedSQLBatchString, CreateUserStatementRegEx, "", RegexOptions.IgnoreCase);
*snip*
If you don't use such a naming convention, another way you could do it is use the "RegEx.Matches(..)" method and query Active Directory from your code to determine the object type, and set the "Value" property on the returned MatchCollection items appropriately.
Hope this helps someone!
Dan / comments
I have a bit of a novel workaround for this if anyone is interested, although you will need to write some .NET code to parse the generated script file from SQL Compare.
In our shop, all of our Acti...
You could also try writing a negative regular expression for the /Exclude parameter as a workaround, e.g. exclude all except this table name string. I just had a bash at this but kept getting tripped up by reserved characters on the command line, so that might be fiddly to get right.
Dan / comments
You could also try writing a negative regular expression for the /Exclude parameter as a workaround, e.g. exclude all except this table name string. I just had a bash at this but kept getting tripp...
I've had this too! But since it didn't do any harm, I just left it alone.
But it's good to know what is actually happening there, thanks for pointing that out. / comments
I've had this too! But since it didn't do any harm, I just left it alone.
But it's good to know what is actually happening there, thanks for pointing that out.