Automation via CLI on Local SQL Server
regrisim
Posts: 1 New member
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:
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name[DBName]
It returns this error:
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:
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name[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:
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name\MSSQLSERVER[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name\Default[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@local[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@(local)\[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@localhost[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@<IP Address>[DBName] lol
Didn't find it anywhere in the documentation, so maybe something nice to add there as well!
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:
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name\MSSQLSERVER[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@Server-Name\Default[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@local[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@(local)\[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@localhost[DBName]
LOGINSUB=Zorro@Texas[Austin]||myuser/password@<IP Address>[DBName] lol
Didn't find it anywhere in the documentation, so maybe something nice to add there as well!