Connecting to Named and Default Instances in SQL Server

You might be aware that SQL Server supports multiple instances on a single machine and a there can be one default instance on any machine. When working with a default instance of a SQL Server you can connect to it by using just the name of the Windows Server where it is installed on. Whereas the when you have to connect to a named instance of SQL Server, you have to connect using the convention Servername\Instancename.

Let us look at this with examples.

Connecting to Default Instance:

When connecting to a default instance of SQL Server, you just have to enter the machine name where the SQL Server is installed. In the below example, I am connecting to a SQL Server 2005 default instance on a Server named SQLSVR2005VM.

Connecting to a named Instance:

Connecting to a named instance, you have to specify the machinename followed by a back slash “\” followed by the instance name. In this example (picture below), we are going to connect to a named instance called SQLTESTINSTANCE on the same machine SQLSVR2005VM, hence we need to type SQLSVR2005VM\SQLTESTINSTANCE to connect to the named instance.

Note: It is possible to configure the port number of a named instance to be 1433 in order to be able to access similar to default instance (without the back slash), but that case is not considered for this blog post. 

Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

–Bru Medishetty

Leave a Reply