all groups > sql server programming > april 2007 >
You're in the

sql server programming

group:

Obtain msinfo32 info + am I SAN attached ?


Obtain msinfo32 info + am I SAN attached ? Hassan
4/21/2007 6:36:47 PM
sql server programming:
I like the first screen shot of the msinfo32.exe that talks about OS
version, physical memory,Model,etc. I dont need all the info that it
provides such as hardware resources,components...

I just need that first opening page contents

Also, how can I find out if my server is SAN attached or has direct attached
storage programatically ?

I would prefer any TSQL way of obtaining the info

Thanks

Re: Obtain msinfo32 info + am I SAN attached ? Erland Sommarskog
4/22/2007 12:00:00 AM
Hassan (hassan@hotmail.com) writes:
[quoted text, click to view]

The extended stored procedure xp_msver has some of that information.

[quoted text, click to view]

Beats me. :-(




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
RE: Obtain msinfo32 info + am I SAN attached ? John Bell
4/22/2007 6:06:02 AM
Hi Hassan

[quoted text, click to view]
I have pointed you to the solution for this in your previous posts. It
doesn't really matter if you return more information than needed from
MSINFO32 as you can just ignore then when loading/loaded

For example:

USE TEMPDB
GO

EXEC xp_cmdshell '"C:\Program Files\Common Files\Microsoft
Shared\MSInfo\msinfo32.exe" /categories +ComponentsStorageDisks /report
C:\temp\system.txt'
GO

-- This will create a single record with the systeminfo as content which you
can
-- pattern match on
SELECT *
FROM OPENROWSET(BULK N'C:\temp\system.txt', SINGLE_NCLOB) AS Sysinfo
GO

-- Alternatively it may be easier to return each line as a separate row
CREATE TABLE dbo.systeminfo ( sysinfo varchar(max))
GO

BULK INSERT tempdb..systeminfo
FROM 'C:\temp\system.txt'
WITH
(
DATAFILETYPE = 'widechar',
ROWTERMINATOR = '\n'
)
GO

SELECT * FROM dbo.systeminfo

DROP TABLE dbo.systeminfo

AddThis Social Bookmark Button