Once Sql server 2005 – Database (SQLExpress) is installed in our machine. If we try to connect to the local or remote server, we usually get an error in connecting the database. Below is the error string,
TITLE: Connect to Server
------------------------------
Cannot connect to Server.
------------------------------
ADDITIONAL INFORMATION:
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) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
I have searched in web for a proper solution. But, I didn’t find any proper solution and wish to log the solution in my blog.
As per the error, the problems are due to,
v Server’s remote connection is disabled.
v Protocol disabled for remote connection (TCP/IP).
v Alias creation or alias mismatch.
Solution:
Enabling Remote connection and protocol:
v Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
v On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
v On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
v On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.
Check the screen shot for the reference,
Resolving Alias Problem:
v Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, Click SQL Server configuration manager.
v Click “Aliases” you can see your aliases in the right pane.
v If your server’s name aliases is there just double click it and check your “server”, “port number” and “alias name”
v If there is no alias you need to create an alias. Provide your server name (machine name). Right click you’re my computer and you can get the name.
v You need to specify the port number check with 5000 and 20000 port numbers. Most probably it will work and it’s specific to your client.
v Now just click “Ok” button.
v Try to connect you SQL server database engine.
v Now it will work… cool… No worries.
Regarding creation of exceptions for your newly installed SQL Server 2005. You can check this KB, http://support.microsoft.com/kb/914277
Happy learning!!!
Regards,
Venkatesan Prabu . J
No comments:
Post a Comment