Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Script to Get Server Info

Posted on 2008-06-16
5
Medium Priority
?
226 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 2000 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 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