Error 25: A network-related or instance-specific error occurred while establishing a connection to SQL Server.

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)

Snapshot:

Causes:

1. The instance name is spelled wrong (probably not the case here)

2. UDP remote port 1434 is not set as an inbound rule on the client machine that is using Windows Firewall. This port needs to be open for the SQL Server Browser to work properly.

Workaround 1:

Open SQL Server Surface area configuration > Surface Area configuration for services & connections > Click database [RELYONDB] > Click Remote Connections > Select Using both TCP/IP and Named pipes & Restart SQL Server & SQL Server Browser service.

Workaround 2:

Disable the firewall – Start > Run > firewall.cpl > make it Off

Workaround 3:

Check whether PINGing is happening in both client and server systems –

Open command prompt > Type PING <ServerIPAddress>

Workaround 4:

Re-start the SQL Browser service and SQL Server [RELYOND] service.

Workaround 5:

Open command prompt >  type IPCONFIG /FLUSHDNS.

Workaround 6:

Navigate to [C:\Windows\System32] folder & search for MSWINSCK.OCX file > Unregister & Re-register the file using Regsvr32 / u “C:\Windows\System32\MSWINSCK.OCX” to unregister & without /u to register it again.

Workaround 7:

Create an exception for SQLServr.exe, SQLBrowser.exe, SQLServerPort 1433. [Check for how to create SQL Server exception from firewall].