SQL 2000.
Is there a way to get a databases physical file names for data and log
using t-sql?
exec sp_helpdb '<database name>' returns two resultsets, the latter
would be good if I can get at the filename in the second resultset. If
anyone knows how?...
sysdatabases seems to hold the physical name for the data only. So
where is the logfile physical name stored?
I need to get the physical names into t-sql variables for later use.
Any help much appreciate.
thanks
PaulDid you look at sp_helpfile?
"Paul Fell" <penzina@.iinet.net.au> wrote in message
news:bea9531b.0308271721.7a2ea54f@.posting.google.com...
> SQL 2000.
> Is there a way to get a databases physical file names for data and log
> using t-sql?
> exec sp_helpdb '<database name>' returns two resultsets, the latter
> would be good if I can get at the filename in the second resultset. If
> anyone knows how?...
> sysdatabases seems to hold the physical name for the data only. So
> where is the logfile physical name stored?
> I need to get the physical names into t-sql variables for later use.
> Any help much appreciate.
> thanks
> Paul|||> I found all the info I needed by looking at sysdatabases and sysaltfiles
Note that the behavior (and existence!) of these tables might change in a
future release, which is why I tend to recommend using system stored
procedures (and information_schema views, where possible) rather than direct
system table access, especially if you're putting code into production.|||Agreed. But if you look at my orginal posting, you'll see I did try
sp_helpfile.
This system SP returns two recordsets. How do I get at the second
records set in my SP? I need to be able to access this data and I
don't know of a way of doing it dynamically.
"Aaron Bertrand - MVP" <aaron@.TRASHaspfaq.com> wrote in message news:<#FImIRWbDHA.2580@.TK2MSFTNGP09.phx.gbl>...
> > I found all the info I needed by looking at sysdatabases and sysaltfiles
> Note that the behavior (and existence!) of these tables might change in a
> future release, which is why I tend to recommend using system stored
> procedures (and information_schema views, where possible) rather than direct
> system table access, especially if you're putting code into production.|||> This system SP returns two recordsets. How do I get at the second
> records set in my SP?
No can do. INSERT ... EXEC only picks up the first resultset. Either pick it up in a client program,
or use the source code for the proc to write your own proc.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Paul Fell" <penzina@.iinet.net.au> wrote in message
news:bea9531b.0308281845.730c942b@.posting.google.com...
> Agreed. But if you look at my orginal posting, you'll see I did try
> sp_helpfile.
> This system SP returns two recordsets. How do I get at the second
> records set in my SP? I need to be able to access this data and I
> don't know of a way of doing it dynamically.
> "Aaron Bertrand - MVP" <aaron@.TRASHaspfaq.com> wrote in message
news:<#FImIRWbDHA.2580@.TK2MSFTNGP09.phx.gbl>...
> > > I found all the info I needed by looking at sysdatabases and sysaltfiles
> >
> > Note that the behavior (and existence!) of these tables might change in a
> > future release, which is why I tend to recommend using system stored
> > procedures (and information_schema views, where possible) rather than direct
> > system table access, especially if you're putting code into production.
Showing posts with label physical. Show all posts
Showing posts with label physical. Show all posts
Wednesday, March 7, 2012
Friday, February 24, 2012
Obtain msinfo32 info + am I SAN attached ?
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
ThanksHi Hassan
"Hassan" wrote:
> 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
>
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
John|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
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
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
>> 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
> 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
> John
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
ThanksHi Hassan
"Hassan" wrote:
> 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
>
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
John|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
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
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
>> 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
> 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
> John
Obtain msinfo32 info + am I SAN attached ?
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
ThanksHi Hassan
"Hassan" wrote:
> 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 attach
ed
> storage programatically ?
> I would prefer any TSQL way of obtaining the info
> Thanks
>
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
John|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
Beats me. :-(
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
>
> 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
> John
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
ThanksHi Hassan
"Hassan" wrote:
> 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 attach
ed
> storage programatically ?
> I would prefer any TSQL way of obtaining the info
> Thanks
>
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
John|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
Beats me. :-(
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
>
> 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
> John
Obtain msinfo32 info + am I SAN attached ?
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
Hi Hassan
"Hassan" wrote:
> 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
>
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
John
|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
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
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
> 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
> John
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
Hi Hassan
"Hassan" wrote:
> 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
>
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
John
|||Hassan (hassan@.hotmail.com) writes:
> 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
The extended stored procedure xp_msver has some of that information.
> Also, how can I find out if my server is SAN attached or has direct
> attached storage programatically ?
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
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Cool. Thanks John.
Do you know how I could put those values in 2 columns for item and value ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BF35DE06-0415-41A8-A5C2-83A03CD09374@.microsoft.com...
> Hi Hassan
> "Hassan" wrote:
> 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
> John
Subscribe to:
Posts (Atom)