Product Not Licensed error
gbargsley
Posts: 34 Bronze 4
I have automation that runs in a PowerShell script that is kicked off by a SQL Agent job. If I do not run Data Masker as an actual user account. My windows AD account for a period of time my automation starts to fail when running under the SQL Server Agent service account showing not licensed. If I then open Data Masker with my personal account then close it, then run my automation everything is fine. The server does not have access to the internet to check home for a license. Is there a way to by pass this or is it a bug that can be looked at?
Error:
Error:
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: ###########################################################
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: ##### Data Masker Software ##########
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: ###########################################################
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager:
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment OS Version: Microsoft Windows NT 6.2.9200.0
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment CLR Version: 4.0.30319.42000
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment CMDLine: "C:\Program Files\Red Gate\Data Masker for SQL Server\DataMasker.exe" \DBA\DataMasker\Masking Sets\Elastic_DataMasking_08152018.DMSSet -R -X
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment CurDir: C:\Windows\system32
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment Machine: ServerName
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Environment User: SQLServerAgentServiceAccount$
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager:
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: Logging Begins
01/29/2019 12:55:26 DMS_Client.frmMain:
01/29/2019 12:55:26 DMS_Client.frmMain: Data Masker Version: 5.6.7.177 (64bit)
01/29/2019 12:55:26 DMS_Client.frmMain: Data Masker Installation Usage: INSTALL_USAGE_THISUSER_ONLY
01/29/2019 12:55:26 DMS_Client.frmMain:
01/29/2019 12:55:26 DMS_Client.frmMain: Messages buffered before logging was enabled.
01/29/2019 12:55:26 DMS_Client.frmMain: DetectInstallationType: Local User Install version = 5.6.7.177
01/29/2019 12:55:26 DMS_Client.frmMain: Startup Mode cgl=True cgg=False usage=INSTALL_USAGE_THISUSER_ONLY
01/29/2019 12:55:26 N2KCommon.ctlN2KLogManager: GetLastLogDirName: value not found on registry read:
01/29/2019 12:55:26 DMS_Client.frmMain: End buffered messages
01/29/2019 12:55:26 DMS_Common.CommandLineArgumentProcessor: ProcessCommandLineArguments: Found ARGS_RUN_SET_FLAG
01/29/2019 12:55:26 DMS_Common.CommandLineArgumentProcessor: ProcessCommandLineArguments: Found ARGS_EXIT_SET_FLAG
01/29/2019 12:55:26 InitLicensing for Data Masker for SQL Server 59
01/29/2019 12:55:26 DMS_DataSets.ctlDataSetDirectory: GetLastMaskerReportName: value not found on registry read:
01/29/2019 12:55:26 DMS_DataSets.ctlDataSetList: BuildAllKnownDataSetsList called
1/29/2019 12:55:26 PM Licensing info: Found client endpoint at net.tcp://127.0.0.1:22222/activationplugin/
01/29/2019 12:55:26 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList called
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList lookup failed on DataSet filename: female_firstnames_shortlist_fr.dmds
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList lookup failed on DataSet filename: firstnames_malefemale_shortlist_fr.dmds
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList lookup failed on DataSet filename: lastnames_shortlist_fr.dmds
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList lookup failed on DataSet filename: male_firstnames_shortlist_fr.dmds
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList found correlated user defined DataSet filename: Endangered_Mammals.udef
01/29/2019 12:55:27 DMS_DataSets.ctlDataSetList: BuildAvailableDataSetsList found user defined correlated DataSet filename: Country_Names_and_ISO_Codes.udefc
01/29/2019 12:55:28 Licensing info: Redgate Client capability version: 2
01/29/2019 12:55:29 DMS_Common.MaskerRunStateMachine: MaskerRunStateMachine: ResetStateMachine()
01/29/2019 12:55:29 DMS_Common.MaskerRunStateMachine: MaskerRunStateMachine: ResetStateMachine()
01/29/2019 12:55:29 DMS_Client.frmMain: Reading Rule Set from file:D:\DBA\DataMasker\Masking Sets\Elastic_DataMasking_08152018.DMSSet
01/29/2019 12:55:29 DMS_Client.frmMain: PopulateTablesAndSchemasTab
01/29/2019 12:55:29 Initial licence: {Licence status: activated / edition: standard / serial: }
01/29/2019 12:55:29 Rechecking license state
01/29/2019 12:55:29 Licence valid - running masks will be enabled
01/29/2019 12:55:29 Starting check for updates automatic:True
01/29/2019 12:55:29 State: CheckingForUpdates
01/29/2019 12:55:29 N2KCommon.N2KStdMessageBox: The application is not currently licensed. Please go to About > Manage My License to view the licensing status. You may need to restart the application if you have recently licensed the product.
01/29/2019 12:55:29 DMS_Client.frmMain: RunMaskerRules: Exception building the rules err=Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
01/29/2019 12:55:29 DMS_Client.frmMain: RunMaskerRules: Exception building the rules diagnostics= at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at N2KCommon.N2KfrmBase.ShowN2KForm(N2KfrmBase formToShow, N2KFormModalTypeEnum modeTypeIn)
at DMS_Client.frmMain.IsSoftwareLicensedAndComplainIfItIsNot()
at DMS_Client.frmMain.RunMaskerRules(Boolean bSilent, Boolean resumeRun)
01/29/2019 12:55:29 DMS_Client.frmMain: AutoRun:RunMaskerRules kickoff returned -1210
01/29/2019 12:55:29 DMS_Client.frmMain: ApplicationExitCode now set to 2210
01/29/2019 12:55:29 DMS_Client.ctlRuleWorkerManager: WorkerManagerLoop:, ThreadAbortException WorkerManagerLoop Thread Now Ending
01/29/2019 12:55:29 DMS_Client.ctlRuleWorkerManager: WorkerManagerLoop: Stopped
Tagged:
Answers
I have noted 2 things from this error, the first is that you're running an older version of Data Masker (major version 5.6 with Redgate licensing) and the second that you're using the older command line executable.
For automation purposes, in v6+ a new command line feature was added that would allow you to circumvent this error and run normally.
If you update to, at the very least, v6.0 but preferably the newest version and then utilise the PARFILE based cmdline to call your masking set, you should find that this solves your problems - the documentation for this can be found here: https://documentation.red-gate.com/dms6/data-masker-help/version-6-tech-tips/running-data-masker-from-the-command-line and you'll note the usage of this is: 'DMSCmdLine.exe PARFILE=C:\MaskingSets\SamplePARFILE.txt'
Please let me know how you get on and if you have any further questions.
Thank you very much.
If so, Then you should be able to open this in v6 without any issues.
If not and it is the older format, then there is a handy Masking Set Converter in the Tools tab of Data Masker v6 which should help you convert the file to be compatible.
This would then allow you to utilise the cmdline and PARFILE capabilities to get around the above error.
Thank you very much.
Just to be on the safe side I would recommend trying to convert a copy of the set separately, just to be sure.
Happy to help where I can!
I used to use: Start-Process "C:\Program Files\Red Gate\Data Masker for SQL Server\DataMasker.exe" "D:\DBA\DataMasker\Masking Sets\Elastic_DataMasking_08152018.DMSSet -R -X" -NoNewWindow -Wait
But: Start-Process "C:\Program Files\Red Gate\Data Masker for SQL Server 6\DataMaskerCmdLine.exe" "PARFILE=D:\DBA\DataMasker\Masking Sets\v6\PARFILE_Elastic_DataMasking_01312019.txt -R -X"
This should then run the process.
Let me know how you get on - thank you very much.