开发者

SQL Server get Unique 'BIOS' string?

In Windows we can get a unique string which represents the BIOS (unique to that machine)

Is there anything comparable in SQL Server where I can return the Identity or BIOS of that SQL Serve开发者_如何学JAVAr installation (unique to that installation?)


A MAC address, maybe... although there could be more than one per machine.

CREATE TABLE #ipconfig(info varchar(256) null)
INSERT INTO #ipconfig EXEC master..xp_cmdshell 'ipconfig/all'
SELECT SubString(info, CharIndex(':', info) + 1, 99) AS MAC FROM #ipconfig
WHERE info Like '%Physical Address%'
DROP TABLE #ipconfig


I have built as extended stroed procedure as bridge to WMI you could just query

exec xp_wmiv3 'SELECT * FROM Win32_BIOS'

It can be downloaded at http://bummisoft.de/download/XP_WMI.zip. Versions contained for 32bit and 64bit Servers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜