An error Occurred while establishing a connection to sql server.
Solution 1
Go to Control Panel -> Administrative Tools -> Computer Management : Open It
Expand Services And Application-> SQL Server Configuration Manager->
After this Sql server services restart it. then Check.
if it not work
Check Aliases Option Under.
If you find any aliases for the SQL Server that you are getting problem. Delete it for time being and test it.
Suggestion 2:
Try checking these things,
1. Check SQL Server Browser service is running and is kept in automatic Start mode.
This can be checked by.
Start -> run- > type services.msc -> enter -> check for SQL Server browser service, and start if it is not running.
2. Under SQL Server Surface Area Configuration check if SQL Server allows remote connections, by default it will allow only local connections.
This can be checked by,
Login to Server ( Where SQL Server is installed )
Start-> allprograms -> Microsoft SQL Server 2005->Configuration Tools -> SQL Server Surface Area configuration -> Click Server Area configuration for Services and connections ->choose your sql server – remote connections -> on the right side, choose allow remote connections to this server and choose both TCP/IP and NamedPipes.
3. Or Check your Windows Firewall, if SQL Server is being blocked, try to disable Firewall and then connect if it works then problem could be WIndows firewall.
Suggestion 3:
There are couple of ways to troubleshoot this problem. The one you should use depends on how your databse server was configured and some other factors as well.
For example, if you configure the database engine to use dynamic port allocation, make sure that sql browser is runnning. SQL browser provides the connection information about the database engine to the the client.
If the sql browser is not running and you have restarted sql server and port 1433 is being used by other applications, database engine will be allocated a different port number. Imagine that the client has been configured to use port 1433 to connect and the database engine is using a different port number. The client wont be get the connections properties to the database engine from sql browser because sql browser is not running.
Suggestion 2:
Try checking these things,
1. Check SQL Server Browser service is running and is kept in automatic Start mode.
This can be checked by.
Start -> run- > type services.msc -> enter -> check for SQL Server browser service, and start if it is not running.
2. Under SQL Server Surface Area Configuration check if SQL Server allows remote connections, by default it will allow only local connections.
This can be checked by,
Login to Server ( Where SQL Server is installed )
Start-> allprograms -> Microsoft SQL Server 2005->Configuration Tools -> SQL Server Surface Area configuration -> Click Server Area configuration for Services and connections ->choose your sql server – remote connections -> on the right side, choose allow remote connections to this server and choose both TCP/IP and NamedPipes.
3. Or Check your Windows Firewall, if SQL Server is being blocked, try to disable Firewall and then connect if it works then problem could be WIndows firewall.
Suggestion 3:
There are couple of ways to troubleshoot this problem. The one you should use depends on how your databse server was configured and some other factors as well.
For example, if you configure the database engine to use dynamic port allocation, make sure that sql browser is runnning. SQL browser provides the connection information about the database engine to the the client.
If the sql browser is not running and you have restarted sql server and port 1433 is being used by other applications, database engine will be allocated a different port number. Imagine that the client has been configured to use port 1433 to connect and the database engine is using a different port number. The client wont be get the connections properties to the database engine from sql browser because sql browser is not running.
No comments:
Post a Comment