Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2021
  • Last Modified:

How to know the Instance name of SQL Server?

How to know the Instance name of SQL Server? Can it have multiple instances?
0
baberamin
Asked:
baberamin
1 Solution
 
momi_sabagCommented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>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
 
RiteshShahCommented:
from DOS prompt, run command

osql -L

you will see all SQL Server's instances from your network, including your own server.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
vinurajrCommented:
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
 
chapmandewCommented:
for the name:

select serverproperty('servername')
0
 
baberaminAuthor Commented:
what about these command? does they do the same?

sp_helpserver
select @@servername
0
 
RiteshShahCommented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now