Docker: cannot connect to SQL Server
Win32nipuh
Posts: 15 Bronze 5
in SQL Compare
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:
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?
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
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
>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
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)
There might be an issue with the command syntax or options. The double backslashes (
\\
) in the server names may not be necessary, and make sure the SQL Server instance names, databases, and credentials are accurate. Also, the SQL Server must be configured to allow remote connections.Here's a modified version of your command with some adjustments:
Note that I changed
\\
to just\
in the server names.There might be an issue with the command syntax or options. The double backslashes (
\\
) in the server names may not be necessary, and make sure the SQL Server instance names, databases, and credentials are accurate. Also, the SQL Server must be configured to allow remote connections.Here's a modified version of your command with some adjustments:
Note that I changed
\\
to just\
in the server names.There might be an issue with the command syntax or options. The double backslashes (
\\
) in the server names may not be necessary, and make sure the SQL Server instance names, databases, and credentials are accurate. Also, the SQL Server must be configured to allow remote connections.Here's a modified version of your command with some adjustments:
Note that I changed
\\
to just\
in the server names.