Red Gate forums :: View topic - Problem connecting to SQL 2008 R2
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

Problem connecting to SQL 2008 R2

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
Martin_P



Joined: 22 Jul 2010
Posts: 3

PostPosted: Thu Jul 22, 2010 4:17 pm    Post subject: Problem connecting to SQL 2008 R2 Reply with quote

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 ?

Cheers
Back to top
View user's profile Send private message
Martin_P



Joined: 22 Jul 2010
Posts: 3

PostPosted: Tue Jul 27, 2010 9:20 am    Post subject: Reply with quote

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

"MyInstance\\R2"

Thanks to support for solving this
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group