Solved

How to know the Instance name of SQL Server?

Posted on 2009-04-12
7
2,017 Views
Last Modified: 2012-06-27
How to know the Instance name of SQL Server? Can it have multiple instances?
0
Comment
Question by:baberamin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 37

Expert Comment

by:momi_sabag
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?
0
 
LVL 143

Expert Comment

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

>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
MSSQLSERVER$

or simply
MSSQLSERVER

for a unnamed (default) instance
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24128432
from DOS prompt, run command

osql -L

you will see all SQL Server's instances from your network, including your own server.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 8

Expert Comment

by:vinurajr
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....
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24129182
for the name:

select serverproperty('servername')
0
 

Author Comment

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

sp_helpserver
select @@servername
0
 
LVL 31

Accepted Solution

by:
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.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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

623 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