Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Hardware

Author  Topic 

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-28 : 10:43:40
Does anyone know of something that is a unique identifier for a server at the hardware level; something that does not change when the OS is re-installed, but is available through some sort of API call? Maybe a BIOS serial number or something like that?

I am trying to develop a database to hold information about servers, and for the hardware itself, I am having a hard time coming up with a natural key.





CODO ERGO SUM

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-28 : 10:48:31
Network Card # maybe?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-28 : 10:53:56
There are a few of problems with the network card:
1. There can be multiple cards.
2. They can be replaced.
3. The active MAC address can be changed.




CODO ERGO SUM
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-06-28 : 11:29:02
"There are a few of problems with the network card:
1. There can be multiple cards.
"

Store them all. Any of them present in the future represents the same machine (of course a card can be moved ...)

But there again anything else with a UniqueID could be replaced - CPU, BIOS, ...

Perhaps you should collect info about a number of bits of hardware, and assume that any future machine that has a majority of those bits is the same machine?

Perhaps you need your own USB dongle!

Kristen
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-28 : 12:13:27
For the utilities that I have looked at, the MAC address only shows up for the cards that are currently active, so if they plug it into a different card next week, the current mac address doesn't show up.

Also, since the network card is one to many, it doesn't really make a very good key.

I could live with something like a BIOS ID if it is available. There is only one as far as I know, and motherboard replacements are rare enough. Anyone know of a utility for getting that information?




CODO ERGO SUM
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-06-28 : 12:20:09
"Get BIOS ID" in Google brings up some hopeful contenders.

http://www.microsoft.com/technet/sysinternals/SystemInformation/PsInfo.mspx

might be useful in your Auditing toolbox?

Kristen
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-06-28 : 13:28:43
Michael,

There isn't any single item that will permanently identify a computer. That's why Microsoft forces a reactivation of Windows after you replace a hard drive or network card (and sometimes even adding memory); the activation is derived from a combination of hardware identifiers, and it becomes invalid when you change any one of the parts that makes up that combination.

The BIOS isn't even reliable. A flash update can sometimes change the BIOS ID enough to invalidate Windows activation.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-28 : 15:07:02
It looks like the WMIC utility may be useful for looking at hardware info. If I can just figure out how to use it...

Windows Management Instrumentation Command-line
http://technet2.microsoft.com/windowsserver/en/library/ea5d7f04-07e8-4b96-bda3-a2b2cc15391e1033.mspx?mfr=true



CODO ERGO SUM
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-28 : 16:14:53
actually the query language for WMI is sort of similar to SQL:

http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_jehv.mspx?mfr=true

EDIT: it's too bad WQL doesn't support UPDATE. it would be a lot easier to upgrade your hardware if that were the case...

here's a sample that does it in C#:

http://www.codeproject.com/cs/system/GetHardwareInformation.asp?df=100&forumid=395273&exp=0&select=2034875


elsasoft.org
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-06-29 : 13:58:31
quote:
Originally posted by Michael Valentine Jones

It looks like the WMIC utility may be useful for looking at hardware info. If I can just figure out how to use it...



I have a HyperTextApplication (Internet Explorer application, written in HTML) that uses Windows Scripting to use WMI. I got it from the MS Scripting Guys. I don't have the URL where I got it, but you can probably find it by searching the Microsoft web site for "Scriptomatic".

Scriptomatic will allow you to run WMI queries and will also write the VBA/JScript code. It's great to use the code to figure out how to do things via COM.

Edit: Forgot to mention: If you can't find it on the MS site, drop me a note or leave one here and I'll email it to you (it's plain old text HTML).
Go to Top of Page
   

- Advertisement -