remote connection to a SQL server ? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

remote connection to a SQL server ?

hi
i added 2 databases to my SQL server on a machine next door using Microsoft SQL server management studio express… I made sure that the server allows remote connection then from this computer i pass a connection string to my SQLCLient in VB2005 that looks a bit like this Code: ( text )
ConnString = "Server=USER-PTDH8Z5ESHSQLEXPRESS;Database=FSS.MDB;Trusted_Con nection=True;User Instance=True" for which it gives me this error when i open the connection
SQLConnecton.Open() System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Flying_School_Scheduler.DBEngine.StartConnection() in whats the big idea?
i’m in a bit of a tight schedule here… can anyone help me here?
To go about this problem, do the following:
1. make sure that server and client use the same network protocol (enable TCP/IP).
2. Enable the service SQL Browser from your server.
3. Enable ‘Allow remote connections’ setting in the server.
4. check your server/workstation firewall. KBAhttp://support.microsoft.com/kb/914277 should get you more information. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
quote:Originally posted by satya To go about this problem, do the following:
1. make sure that server and client use the same network protocol (enable TCP/IP).
2. Enable the service SQL Browser from your server.
3. Enable ‘Allow remote connections’ setting in the server.
4. check your server/workstation firewall.

a few questions… =)
how and from where do i check if the server and the client are usng the same network protocol? and how do i enable TCP/IP
from where do i enable the sql browser?
ive already enabled Allow remote connections setting in the server what do i check in my server/worksation firewall???
Use surface area configuration tool on the Server and configuration manager on client’s machine.
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
http://technet.microsoft.com/en-us/library/ms174212.aspx
..fyi Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
You can start SQL browser in SQL SERVER CONFIGURATION MANAGER… Server network protocol can be checked through SURFACE AREA CONFIGURATION… Did you try to specify the port number along with server name… if not try the following… ServerName, portnumber
OR
ServerNameInstanceName,portnumber In firewall make sure Mangement studio exe is allowed…
MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

thanks a million its working now
quote:Originally posted by MohammedU You can start SQL browser in SQL SERVER CONFIGURATION MANAGER… Server network protocol can be checked through SURFACE AREA CONFIGURATION… Did you try to specify the port number along with server name… if not try the following… ServerName, portnumber
OR
ServerNameInstanceName,portnumber In firewall make sure Mangement studio exe is allowed…
MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

You are welcome….
and Welcome to SSP….
MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

]]>