Comments
1 comment
-
Hi - sorry to hear you're having trouble with the commandline
I think there could be a couple of things going on here:
Firstly, the regex isn't quite correct, since we're interpreting the commandline option as a .NET regex rather than a glob, so MyDomain* will match things like MyDomai and MyDomain and MyDomainnnnnn. Adding .* at the end would be technically more correct.
However, that probably isn't the issue here, since we only need to match a substring of the user name for it to be excluded anyway. It looks like the line that's failing isn't actually creating a user in the database, but trying to create a server login for the user in case that is necessary. It's probably worth taking a look at the deployment script that the commandline is trying to run using the /scriptfile:<filename> argument - I'm guessing that the part of the deployment script that's failing will look something like this:... IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'MyDomain\JoeUser') CREATE LOGIN [MyDomain\JoeUser] FROM WINDOWS GO CREATE USER [Joe] FOR LOGIN [MyDomain\JoeUser] ...
In this case, it's the user Joe that we need to exclude rather than the login [MyDomain\JoeUser], so the commandline arguments would look something more like /exclude:user:Joe in this example
Add comment
Please sign in to leave a comment.
Reading the documentation made this look like a simple matter of setting an /exclude switch in the command line. So, I tried the following command line:
However, SQL Compare is still comparing & trying to synchronize the MyDomain users I want it to ignore.
Am I misusing the /exclude switch here?
Version: SQL Compare Command Line V12.3.3.4490