According to your description, as far as I know, this issue is maybe caused by the server was not found or was not accessible. Please verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Please check the following site about how to connect to remote sql server: .NET Framework Data Provider for SQL Server
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
2 Posts
Connections string where instance name has a backslash in it
Aug 09, 2017 03:56 PM|tmorford|LINK
I am trying to connect to an instance on a remote server with a backslash in the instance name so it would look something like this:
string sqlConnString = @"Data Source= test.testserver.com\testinstance\STAGE;Initial Catalog = testdb ; User Id = tester; Password = test123; Integrated Security = False;";
The Sever name is:test.testserver.com
The instance name is: testinstance\STAGE
Error:A network-related or instance-specific error occurred while establishing a connection to SQL Server
Thank you.
All-Star
50841 Points
9895 Posts
Re: Connections string where instance name has a backslash in it
Aug 09, 2017 04:19 PM|A2H|LINK
Are you facing any issues
Aje
My Blog | Dotnet Funda
None
0 Points
2 Posts
Re: Connections string where instance name has a backslash in it
Aug 09, 2017 04:38 PM|tmorford|LINK
Error:A network-related or instance-specific error occurred while establishing a connection to SQL Server
Contributor
6730 Points
2715 Posts
Re: Connections string where instance name has a backslash in it
Aug 10, 2017 06:24 AM|Eric Du|LINK
Hi tmorford,
According to your description, as far as I know, this issue is maybe caused by the server was not found or was not accessible. Please verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Please check the following site about how to connect to remote sql server: .NET Framework Data Provider for SQL Server
https://www.connectionstrings.com/sql-server/
Also here are some possible reasons and solutions about this issue, please check:
http://support.sysonline.com/support/solutions/articles/4000016491-errmsg-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.