Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

MSSQLFUN

I, Rohit Garg, am working as Consultant in IT Company. I am having an around 5 years of experience in MSSQL server & other Microsoft technologies. I am working as DBA in Microsoft SQL Server from last 5 years in e-Commerce, Telecom, Finance domain. In this tenure, I got a chance of working as Database administrator, Developer and trainer on SQL server 2000 to SQL Server 2012. I am holding Master’s degree in Computer Science along with certification in SQL Server & .Net. I like to learn new things by hand-on experience on regular basis. This journey is so far is delightful & valuable with the addition of wonderful friends.

Why SQL Server Named Instance connect without specifying instance name ?

Issue :

Today Evening, I was just about to leave the office and at same time I got a call from one of my friend. He is not running under any production issue but bit confused with SQL server behavior while connecting with port no. in case of named instance.

He is having one named SQL Server 2005 instance running on non-default port 55537.

He tried to connect by following Server Names :-

· MachineName\InstanceName – Working fine & he is having no issue

· MachineName\InstanceName,PortNo – Working fine & he is having no issue

· MachineName,PortNo – Now this is the issue.

He is running with question :-

1. How SQL server is going to connect without instance name?

2. Is it connecting some different instance? But his machine is having only one named instance.

Solution :

The correct syntax for connecting to SQL Server is “Servername/InstanceName” or “ServerName,port”. When you specify both an instance name and the port, the connection is made to the port number.

So when you mention Port with machine name, SQL server connect to the SQL instance running on mentioned port without being knowing instance name.


Comments

Leave a comment on the original post [mssqlfun.com, opens in a new window]

Loading comments...