How can we help you today? How can we help you today?

Untrusted Certificate

Hello,

I was able to sync data between two databases using the GUI and getting started with automating SQL Data Compare. There is a checkbox in GUI to "Trust server certificate" and the sync worked. Now I am trying to use /Argfile with an XML. How to I tell it to trust the certificate?

PS C:\Program Files (x86)\Red Gate\sql data compare 15> .\sqldatacompare /Argfile:d:\DataRepository\DailyBackups\RedGateSync\ArgXMLFile.xml

SQL Data Compare V15.0.2.22953
===========================================
Copyright c Red Gate Software Ltd 1999-2023

SQL Data Compare: activated, edition professional, serial number: Licensed

Error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

<?xml version="1.0"?>
<commandline>
<database1>SourceDB</database1>
<server1>RemoteServer</server1>
<username1>userid</username1>
<password1>password</password1>
<database2>LocalServr</database2>
<server2>LocalDB</server2>
<sync/>
<include>Table:[table1]|[table2]|[table3]</include>
</commandline>

Is there a complete list valid switches and options? Documentation is very limited.

Thank you!
tekpmb
0

Comments

2 comments

  • DanC
    Hi @tekpmb

    Strange that it's not documented in the SDC specific command line documentation, but you can add the trustservercertificate parameter to the server switch in the xml file I suspect

    https://documentation.red-gate.com/sc/using-the-command-line/switches-used-in-the-command-line

    /server1:"Widget_Server\SQL2008,<port>;encrypt=true;trustservercertificate=true"
    DanC
    0
  • Tromeen
    To instruct SQL Data Compare to trust the server certificate when using the /Argfile option with an XML file, you can include the necessary settings within the XML configuration.
    Tromeen
    0

Add comment

Please sign in to leave a comment.