Problem connecting to SQL 2008 R2

Automate and integrate using the SQL comparison API

Problem connecting to SQL 2008 R2

Postby Martin_P » Thu Jul 22, 2010 3:17 pm

I am getting the following error message when trying to open a database connection to R2...

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Source=".Net SqlClient Data Provider"

I am able to connect to the database via SQL management studio, and also via the SQL Compare GUI - but not from the SDK.

My connection to the database is as follows ...

new ConnectionProperties("my-server\\r2", "SQLCompareDev");

I have also tried {IP}\\{instance] but get the same error

Finally I can connect to other databases in our environment (SQL 2005) without any problem - so is there an issue with SQL 2008 R2 ?

Posts: 3
Joined: Thu Jul 22, 2010 3:07 pm

Postby Martin_P » Tue Jul 27, 2010 8:20 am

To resolve this issue I had to add a "\\" between the database and the instance name, i.e.


Thanks to support for solving this
Posts: 3
Joined: Thu Jul 22, 2010 3:07 pm

Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest