x

Unable to connect to SQL server Instance

Hi

When i trying to use my ID im getting the below error msg.

How can i resolve this.

===================================

Cannot connect to DSQLM13DATACEN01.

===================================

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) (.Net SqlClient Data Provider)

------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

------------------------------ Error Number: 53 Severity: 20 State: 0

------------------------------ Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server) at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
more ▼

asked Aug 23 '11 at 12:45 PM in Default

ETHMAN5 gravatar image

ETHMAN5
472 41 45 48

(comments are locked)
10|1200 characters needed characters left

4 answers: sort voted first
Does this SQL instance allow connections from any other users? Is this a new configuration? You may need to enable SQL Server in the firewall. You also need to enable TCP/IP in SQL Server Configuration Manager and allow Remote connections. If using SQL Server 2005 do this in SQL Server Surface Configuration.
more ▼

answered Aug 23 '11 at 12:49 PM

Tim gravatar image

Tim
35.5k 32 40 138

Also helps to make sure SQL Server Service is running.
Aug 23 '11 at 12:54 PM mikelanders
We are using SQL server 2008 R2, How can i check the Firewall is enable or not, and how can i enable TCP/IP in SQL Server Configuration Manager and allow Remote connections.
Aug 24 '11 at 09:40 AM ETHMAN5
Firewall would be the windows firewall, you can find it in the control panel on the local server. SQL Server Configuration Manager SSCM is located in the program files typically in a folder called "Configuration Tools" under the folder for SQL Server. You want to expand all the options under SQL Server Configuration Manager and choose the TCP/IP protocol for MSSQLSERVER and enable it. To allow remote connections open SQL Server Management Studio SSMS, right click on your server connection, chose properties, click on Connections then check the box "Allow remote connections to this server".
Aug 24 '11 at 10:55 AM Tim
Thanks....
Aug 24 '11 at 11:24 AM ETHMAN5
@Ethman5, did you get this resolved?
Aug 26 '11 at 11:55 AM Tim
(comments are locked)
10|1200 characters needed characters left

check the below Registry path for correct instance name

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names

more ▼

answered Aug 23 '11 at 11:44 PM

ramesh 1 gravatar image

ramesh 1
2.1k 59 67 69

We are using Default instance with Default port, so im try to connect using Server name 'DSQLM13DATACEN01
Aug 29 '11 at 11:23 AM ETHMAN5
Can you ping the server? Can you telnet to the port?
Aug 29 '11 at 12:49 PM Blackhawk-17
(comments are locked)
10|1200 characters needed characters left

This blog post has a few things you can work through to see if it might resolve your issue.

Telnet is a good tool to use on testing whether the ports are opened on your server/network for SQL Server connections.

You can check the SQL Server ERRORLOG from the last startup of the services and it should contain the configuration regarding what ports/protocols your instance is listening on. Also, Andy Leondard was kind enough to provide a [quick database connectivity testing][3] tip.

[3]: http://sqlblog.com/blogs/andy_leonard/archive/2011/08/26/quick-database-connectivity-testing.aspx
more ▼

answered Aug 29 '11 at 11:42 AM

Shawn_Melton gravatar image

Shawn_Melton
5.3k 17 21 29

(comments are locked)
10|1200 characters needed characters left

After a quick glance it appears your Client is attempting to connect by Named Pipes... is that protocol enabled on SQL Server?

The Client and the Server need a common protocol to communicate over. If the Client is configured to only use Named Pipes and the Server to only use TCP/IP then the two won't be able to talk. Ensure that both have one protocol enabled that the other does as well.
more ▼

answered Aug 29 '11 at 12:29 PM

Blackhawk-17 gravatar image

Blackhawk-17
11.8k 28 30 35

I have seen that as the default message regardless of if the client is coded for TCP/IP only and if the server has Named Pipes on or off. Lovely generic MS messages.
Aug 29 '11 at 12:32 PM Tim
Setting up my lab tonight, kept getting this issue and found the hostname was not resolving to the IP on my LAN. Since I'm not in domain I added it to my desktop's host file, pinged with a response, connected no problem.
Aug 29 '11 at 05:54 PM Shawn_Melton
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x45

asked: Aug 23 '11 at 12:45 PM

Seen: 53983 times

Last Updated: Aug 23 '11 at 12:45 PM