Solved

Script to Get Server Info

Posted on 2008-06-16
5
214 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 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