New training: Setting up masking sets in Data Masker. Watch now.

Automation via CLI on Local SQL Server

So running into a syntax issue for running the Masker PARFILE from a CMD step in an SQL Agent Job.

I have two Controllers in a single Mask Set. It would be great if I could use the Login Sub feature but I need it to find the server. In the GUI if I put: (local)\   in the "Server Name:" field, using Windows Auth OR SQL Auth it works just fine. This is using the default instance on the local install of SQL Server 2019. If I don't use the Login Sub (i.e. just save the login/password in the GUI and don't put a sub line in the PARFILE) it works fine (exit code 0 yay).

If I use SQL Auth, no password and not checking the save pwd check box in the GUI and then this line in the PARFILE:

[email protected][Austin]||myuser/[email protected][DBName]

It returns this error:

Param File Substitution Values failed posttest. Err=Unused Controller substitution variable in parameter file on line 8
CmdLineMain: Ending Exit Code=110

Please note: The server name DOES have a dash in as shown. I don't get a choice in that. It is the local default instance though and I have also tried:

[email protected][Austin]||myuser/[email protected]\MSSQLSERVER[DBName]

[email protected][Austin]||myuser/[email protected]\Default[DBName]

[email protected][Austin]||myuser/[email protected][DBName]

[email protected][Austin]||myuser/[email protected](local)\[DBName]

[email protected][Austin]||myuser/[email protected][DBName]

[email protected][Austin]||myuser/[email protected]<IP Address>[DBName] lol

Didn't find it anywhere in the documentation, so maybe something nice to add there as well!
Sign In or Register to comment.