Solved

Script to Get Server Info

Posted on 2008-06-16
5
207 Views
Last Modified: 2013-11-26
Does anyone know of a script that I can run that will go to a specific server on my network and return the

1. Operating System
2. Disks and space left on them
3. SQL Server Version
4. Memory and type
0
Comment
Question by:computerstreber
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:DocCan11
ID: 21798270
The best choice for this is to use WMI.. it will provide the information you need.
0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21798280
0
 
LVL 8

Accepted Solution

by:
sbagireddi earned 500 total points
ID: 21798327
these may help:


-- Server Info
SELECT  CAST( SERVERPROPERTY( 'MachineName' ) AS varchar( 30 ) ) AS MachineName ,
        CAST( SERVERPROPERTY( 'InstanceName' ) AS varchar( 30 ) ) AS Instance ,
        CAST( SERVERPROPERTY( 'ProductVersion' ) AS varchar( 30 ) ) AS ProductVersion ,
        CAST( SERVERPROPERTY( 'ProductLevel' )  AS varchar( 30 ) ) AS ProductLevel ,
        CAST( SERVERPROPERTY( 'Edition' ) AS varchar( 30 ) ) AS Edition ,
       ( CASE SERVERPROPERTY( 'EngineEdition')
            WHEN 1 THEN 'Personal or Desktop'
            WHEN 2 THEN 'Standard'
            WHEN 3 THEN 'Enterprise'
       END ) AS EngineType ,
       CAST( SERVERPROPERTY( 'LicenseType' ) AS varchar( 30 ) ) AS LicenseType ,
         SERVERPROPERTY( 'NumLicenses' ) AS #Licenses;


-- Drive Space
EXEC master..xp_fixeddrives
0
 
LVL 3

Author Comment

by:computerstreber
ID: 21808048
sbagireddi, your answer is reall good. Is there a way to include the OS on the server and memory; type and amount? I looked up the syntax for SERVERPROPERTY and I did not see anything related to those.  
0
 
LVL 8

Expert Comment

by:sbagireddi
ID: 21835130
I do not think that any of the system tables in SQL server carry information pertaining to the OS of the server.
Again I may be wrong.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now