Comments
4 comments
-
Hi @Arun72 thank you for your post - can you please confirm the exact syntax you're running in powershell?
& runs an executable but it looks like your path includes an invalid character ">", it should be used like this:
& "C:\Program Files\Red Gate\Data Masker for SQL Server 7\DataMaskerCmdLine.exe" PARFILE="C:\Users\arun72\Documents\Data Masker(SqlServer)\Masking Sets\MyParFile.PARFILE"
Let me know if this helps,
Kindest -
HI @PlantBasedSQL
Thanks for the response, the path was right ,but I entered it wrong in my previous post. I have tried multiple syntaxes, ran from command line as batch file and even the syntax that you suggested ,below is the error for both couple of syntaxes and I couldn't see any logs as well.
Syntax 1: & "C:\Program Files\Red Gate\Data Masker for SQL Server 7\DataMaskerCmdLine.exe" PARFILE="C:\Users\arun\Desktop\DataMasker\PowerShell\PARFILE.txt"
Syntax 2: & "C:\Program Files\Red Gate\Data Masker for SQL Server 7\DataMaskerCmdLine.exe" PARFILE="C:\Users\arun\Desktop\DataMasker\PowerShell\PARFILE.PARFILE"
Error:CmdLineMain: StartingCmdLineMain: Initializing...DMS_CmdLine.MaskingSetRunner: Error Processing Command Line: line 3 cannot be processed because it has an unknown keyword.CmdLineMain: Ending Exit Code=103
PARFILE:MASKINGSET=C:\Users\arun\Desktop\Data Masker\MultipleSchemas.DMSMaskSetLOGFILEDIR=C:\Data\Data Masker(SqlServer)\Log FilesDATASETDIR=C:\PROGRA~1\Red Gate\Data Masker for SQL Server 7\DataSetsREPORTSDIR=C:\Data\Data Masker(SqlServer)\ReportsINTERIM_REPORTS=true
What should be the PARFILE format, I was using .txt but in your response I see its .PARFIL
Thank you -
Thanks @Arun72 It looks like Syntax 1 you have is correct but your DATASETDIR in the PARFILE might be the issue here, possibly if the cmdline isn't escaping the "~" in your directory, are you able to provide the full path at all or perhaps capture it in "''s?
It can be .txt or .PARFILE (still basically a .txt though) but it sounds more like a PARFILE issue than a cmdline issue! -
It should be DATASETSDIR=C:\Program files\Red Gate\Data Masker for SQL Server 7\DataSets in PARFILE
It's DATASETSDIR (Not DATASETDIR)
Add comment
Please sign in to leave a comment.
I am trying to run the masking from the command line and replicated the same that shown in the video from the official website. I also added the path for "DataMaskerCmdLine" in the system variables. But still getting the below error.
Path: C:\Program Files\Red Gate\Data Masker for SQL Server 7
-------
--------
Thanks for the help!