Solved

Script to Get Server Info

Posted on 2008-06-16
5
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

631 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