Determining your SQL Server instance
How to determine your SQL Server instance name
Print Friendly View
written: 05/09/2013
last modified: 09/16/2024

PREREQUISITES

SQL Server or SQL Management Studio must be installed on the PC on which you are performing this activity.


INTRODUCTION

Starting with SQL Server 2005, Microsoft introduced the concept of SQL instances. It used to be that you would simply enter a connection using the server name, database name, user id and password in order to connect to a SQL Server database. As of 2005, you now need to specify the SQL instance along with the server name. The syntax for this is as follows:

[Server Name]\[Instance]

Example: MainServer\SQLExpress

This is not a UNC path so there is no need to put a double back slash before the server name. After the server name, put a back slash (\) and the instance name. If you are using SQL Server Express (the free edition from Microsoft) then it is almost always "SQLExpress". If it is the regular paid edition of SQL Server, then the instance was set when you installed SQL Server and usually your IT department can help you with that. If you don't know the instance, you can do the following steps to get a list of available instances on the network. This can be helpful in determining the instance name.

If you are accessing a SQL Server database on your local PC, you can skip the name and use the (local) keyword. This will automatically use the local PC as the server name.

Example: (local)\SQLExpress

NOTE: Neither the server nor instance names are case sensitive so you don't have to worry about upper and lower case.

NOTE: If you don't know the name of the server, you can also type the IP address of the server in place of its name if you need to do so. Please just be advised that this is not recommended longer term as the IP address of the server could change over time.


STEPS

  1. Start a DOS prompt by starting a run box by clicking the Start button (or typing windows key + R), typing "cmd" (without the quotes) in the run box, and then pressing Enter. A black DOS shell should appear on screen.
  2. From the command prompt, type "SQLCMD -L" (without the quotes) and press Enter.
    NOTE: The "L" must be upper case or it will not work.
  3. It may take several seconds to return, but will return a list of servers and instances that can be seen on the network. Please see the picture below.

Applies To

Enterprise Data Loader v.4.2
Enterprise Data Loader v.3.3
Enterprise Report Scheduler v.4.2
Enterprise Report Scheduler v.4.1
Enterprise Report Scheduler v.3.4
Enterprise Report Scheduler v.3.3

Category

Importing Data
See more articles in this category