March 18, 2022 at 3:43 pm
Setup: We have used GPG to encrypt files for several yeears. Worked without issue. For one job, the GPG command is called from a powershell script which is in turn called in a T-SQL step of a SQL Server job.
For other jobs, the GPG command is called from a script task in an SSIS package. Again, worked fine for years.
We recently migrated our SQL Servers, so now everything is failing. GPG is installed on the new servers and the .exe is in the exact same location. OS went from Windows 2012 R Server to Windows 2019 Server. SQL from 2012 Enterprise to 2019 Enterprise. I've tried several things. Importing the .asc keys to my login. Copying the public keys folder from the old server to the new servers (which worked the last time we migrated). I can run the powershell script in powershell without error. But when I put myself as the job owner and kick off that step it fails. I can run the SSIS package manually but when it gets kicked off by the job (whether it's owned by the service account, SA or myself) it fails.
Error is: "gpg is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
I have even pointed the file to the correct path in the powershell script and gotten the same error from the job. I tried doing a SET PATH for the gpg.exe but it didn't work either.
Has anyone ever worked with GPG, SSIS / Powershell, and SQL jobs together? If so, do you have any advice?
March 18, 2022 at 4:26 pm
Just a thought, pipe the SET command output as a exec task within the job into a file and inspect the environmental variables of the session.
😎
March 26, 2022 at 12:44 pm
So it turns out that I needed to reboot the servers because nothing was recognizing that GPG had been installed. GPG didn't say anything about needing a reboot, but once I did, almost everything started working again.
Thanks, Eirikur.
March 28, 2022 at 9:31 am
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply