Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Connection Issue

Author  Topic 

carthik_s
Starting Member

34 Posts

Posted - 2007-11-07 : 16:56:34
Hi,

I have installed a SQL 2005 serers on a windows box which already has SQL 2K. When I try to connec to the instance via query analyser in a different computer, I am getting two different behavior:-
1) If the remote computer is in the same subnet mask as the sql server box, the conenction is successful
2) If not, the conenctions fails with the following error:-
SQL Server does not exist or access denied
Msg 17, Level 16, State 1

I have made the SQL 2005 the default instance on port 1433.

Any pointers to the solution is appreciated.

Thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-07 : 16:58:57
Have you tried connecting via ServerName,1433 or IPAddress,1433 in SSMS?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

carthik_s
Starting Member

34 Posts

Posted - 2007-11-07 : 17:20:08
I have tried to give servername,1433 in SSQM. This connects to the database... But I do not want to give the port number in the connection string. Is there a way to do that? Or if a box has two sql server instances, a port number needs to be specified?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-07 : 17:23:24
You'll need to add an alias via SQL Server Configuration Manager since servername,1433 worked. Adding the alias will allow you to connect with only servername.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

carthik_s
Starting Member

34 Posts

Posted - 2007-11-07 : 18:02:00
Hi,

I tried to create an alias... and tried to connect to the instance using "servername\alias". But this is failing error message:-

SQL Server does not exist or access denied
Msg 17, Level 16, State 1

But if I change the connection string as "servername\alias,1433", the connection to the database opens fine.

Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-07 : 18:06:27
Specifying servername\alias is incorrect. You only need to provide the alias name.

Here are some of the ways to connect:

servername
servername,portnumber
servername\instancename
servername\instancename,portnumber
aliasname

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -