SQLCompare - Jenkins Remote PowerShell Calls to Red Gate CLI

caseywisecaseywise Posts: 1 New member
edited January 27, 2021 6:01PM in SQL Compare Previous Versions
Seek to syncrhonize databases w/ Jenkins automation firing remote Powershell commands at the RedGate CLI.

Roughed in a CLI command using the /Synchronize switch on the ./sqlcompare.exe program, this works great.  Works like a boss when I run it locally or as "Run Powershell as administrator" remotely from the machine where Jenkins resides. 
cd C:\'Program Files (x86)'\'Red Gate'\'SQL Compare 13'\; ./sqlcompare.exe "/db1:DATABASE1 /server2:DBSERVER2 /db2:DATABASE2 /options:default /exclude:Identical /Synchronize"
When I attempt to call from Jenkins, where I'm configured to run a remote PowerShell command, I end up with a  RemoteException

Determined that permissions are allowing for remote calls to ./sqlcompare.exe as I'm able to get help content back with a call to SQLCompare's "/help" command. 
cd C:\'Program Files (x86)'\'Red Gate'\'SQL Compare 13'\; ./sqlcompare.exe "/help"
Still pretty new with Powershell, working on digging out that RemoteException.
Tagged:

Answers

  • Eddie DEddie D Posts: 1,800 Rose Gold 5
    Hi, thank you for your forum post.

    Are you able to provide details of the RemoteException you are experiencing?  This will help in understanding the error you are experiencing.

    The fact that you can run this command locally:
    cd C:\'Program Files (x86)'\'Red Gate'\'SQL Compare 13'\; ./sqlcompare.exe "/db1:DATABASE1 /server2:DBSERVER2 /db2:DATABASE2 /options:default /exclude:Identical /Synchronize"Suggests that the problem is with Jenkins and not SQL Compare.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.