Docker: cannot connect to SQL Server

I tried to run the Docker as described 
docker run --rm redgate/sqlcompare:14 /IAgreeToTheEULA /s1:my-server\\sql2019 /db1:database1 /u1:sa /p1:my-password  /s2:my-server\\sql2019 /db2:database2 /u2:sa /p2:my-password
In that case my SQL Server located in the LAN on the server

But receive the error:
Error: A network-related or instance-specific error occurred while establishing
a connection to SQL Server. The server was not found or was not accessible.
Verify that the instance name is correct and that SQL Server is configured to
allow remote connections. (provider: SQL Network Interfaces, error: 25 -
Connection string is not valid)

What I am doing wrong? 
Tagged:

Answers

  • Sergio RSergio R Posts: 600 Rose Gold 5
    edited September 2, 2020 1:50PM
    This appears to be a connection issue, it might be worth trying to use the IP address in place of the server name in s1 and s2.
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • I have checked
    >ping my-server
    192.168.0.101

    and run 
    docker run --rm redgate/sqlcompare:14 /IAgreeToTheEULA /s1:192.168.0.101\\sql2019 /db1:database1 /u1:sa /p1:my-password  /s2:192.168.0.101\\sql2019 /db2:database2 /u2:sa /p2:my-password

    Error: A network-related or instance-specific error occurred while establishing
    a connection to SQL Server. The server was not found or was not accessible.
    Verify that the instance name is correct and that SQL Server is configured to
    allow remote connections. (provider: SQL Network Interfaces, error: 25 -
    Connection string is not valid)


Sign In or Register to comment.