Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Instance ID for SQL 2k

Status
Not open for further replies.

macleod1021

Programmer
Mar 10, 2006
642
US
Is there a unique instance ID created when an SQL 2k instance is installed? I vaguely remember seeing this information somewhere but my memory is a bit clouded and I may be thinking of something else. If there is, where is it stored at? Is it something that I can get through DMO, registry or some other method?

There may also be another way to do what I'm looking for. I need to get some type of unique identifier that will be different if the user attempts to create a new instance and copy the database over.

Thanks.
 
select @@SERVERNAME will pull the server name and the instance name. If there is a \ and anything after it it's a named instance. If @@SERVERNAME is just the name of the server then it's the default instance.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I'm actually looking for a numeric value, if it exists. I know the registry stores a GUID, but I was looking for something that could be pulled from the server itself for the database.
 
I don't know of a numeric value for the instance.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top