How to know the Instance name of SQL Server?

Posted on 2009-04-12
Last Modified: 2012-06-27
How to know the Instance name of SQL Server? Can it have multiple instances?
Question by:baberamin
LVL 37

Expert Comment

ID: 24128205
you can have multiple instances on the same machine

what do you mean by how to know the instance name?
you mean in an application or as a windows user?
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24128206
>Can it have multiple instances?

>How to know the Instance name of SQL Server?
you specify the name during installation.
after that, you can check in the windows services applet, the names are part of the service name, aka

or simply

for a unnamed (default) instance
LVL 31

Expert Comment

ID: 24128432
from DOS prompt, run command

osql -L

you will see all SQL Server's instances from your network, including your own server.
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.


Expert Comment

ID: 24128631
you can make use of serverproperties function... to know the instance name and In One server there may be more than one Instance ... This may Hold More than one DB....
LVL 60

Expert Comment

ID: 24129182
for the name:

select serverproperty('servername')

Author Comment

ID: 24135473
what about these command? does they do the same?

select @@servername
LVL 31

Accepted Solution

RiteshShah earned 500 total points
ID: 24135483
sp_helpserver gives you details about all the available server including linked server.

select @@servername can give you sql server name in which you are currently connected with.

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now