Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345»»»

Make a 100+ Server Inventory in 30 minutes Expand / Collapse
Author
Message
Posted Thursday, June 10, 2010 8:19 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 21,631, Visits: 15,289
Thanks - this was an informative and useful article.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #935383
Posted Thursday, June 10, 2010 8:20 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 9:55 AM
Points: 22, Visits: 192
Super tip! Very nice.

I tried a variation (all sql hosts are already in a table): Open a cursor to select servername, then set a command to pull system info by servername, and execute it using xp_cmdshell @cmd,NO_OUTPUT. This can be written as a stored proc and then scheduled to run at will with a SQL Agent job.
Post #935385
Posted Thursday, June 10, 2010 8:38 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
Excellent info and tool Stanley. Tried now and it took less that 25 minutes to get info for 162 servers.
Good thing is this tool generates the kind info which is very hard to get out of server from one place.

Thanks again.


SQL DBA.
Post #935404
Posted Thursday, June 10, 2010 10:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 4:07 AM
Points: 8, Visits: 70
Very good article.

I have wrote a batche file to create one csv file for all servers by using dsquery in conjunction with sysinfo.

However, there is a bug with sysinfo with XP SP3. If running sysinfo with the csv output enabled, from an XP SP3 computer, then copy sysinfo.exe from a server (W2K3 server for example).

example batch file - You will need to change the dsquery line to match the ou and domain that your servers are in. The csv file created is in c:\serverresults.csv:

@echo off
SET MYCOUNT = 0

dsquery computer ou=Servers,dc=MyDomain,dc=com > %TEMP%\Serverlist.txt

IF EXIST c:\serverresults.csv DEL c:\serverresults.csv

FOR /F "tokens=2 delims==," %%i in (%TEMP%\serverlist.txt) do call :GETINFO %%i

GOTO :FINISH


:GETINFO
SET SERVERNAME=%1
SET /A MYCOUNT=%MYCOUNT% + 1
IF "%MYCOUNT%" == "1" (
systeminfo /s %SERVERNAME% /FO CSV >> c:\serverresults.csv
) ELSE (
systeminfo /s %SERVERNAME% /FO CSV /NH >> c:\serverresults.csv
)
GOTO :EOF

:FINISH
Post #935547
Posted Thursday, June 10, 2010 11:51 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 13, 2012 11:42 AM
Points: 3, Visits: 40
Now that we know how to capture these info, including SQL info. Let's store it in SQL DB instead. What's the best SQL DB Schema if you want to store your SQL Servers and Databases when they're in this environment:

- SQL clustering
- Stand Alone
- VMs
(with multiple SQL instances)

Has anyone come up with a good way to store them in a many-to-many relationship?
Post #935599
Posted Thursday, June 10, 2010 3:00 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:51 PM
Points: 36,959, Visits: 31,469
Phil Factor (6/10/2010)
This would be handy for a DBA if all the servers are in the domain, but rather than make a batch file with a list of all your servers by hand, you could get the list of all your registered SQL servers very easily from SMO, and, whilst you're doing it, collect as much SQL Server information as you want about them to combine with the systeminfo info.


Hi Phil... have you got a link for the method you mention above?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #935738
Posted Thursday, June 10, 2010 3:22 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: 2 days ago @ 7:03 AM
Points: 579, Visits: 2,519
Hi Phil... have you got a link for the method you mention above?


I use something similar myself. It is simple stuff. If you're interested I'll tidy it up as soon as I get a moment (Error handling? What error handling?) and send it to you. few of the servers I maintain are in the domain so I use a slightly more roundabout route....



Best wishes,

Phil Factor
Simple Talk
Post #935749
Posted Thursday, June 10, 2010 3:51 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 3:11 PM
Points: 89, Visits: 258
Phil Factor (6/10/2010)
Hi Phil... have you got a link for the method you mention above?


I use something similar myself. It is simple stuff. If you're interested I'll tidy it up as soon as I get a moment (Error handling? What error handling?) and send it to you. few of the servers I maintain are in the domain so I use a slightly more roundabout route....


I am also interested in your approach. It would be nice if you can post it here


_________

Regards,
Ashish
Post #935763
Posted Thursday, June 10, 2010 4:27 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 3:06 PM
Points: 33,169, Visits: 15,304
If you want to use Powershell here, I found a cool script from SQL Chicken: http://sqlchicken.com/2010/06/powershell-i-heart-you/






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #935772
Posted Thursday, June 10, 2010 8:39 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:51 PM
Points: 36,959, Visits: 31,469
Phil Factor (6/10/2010)
Hi Phil... have you got a link for the method you mention above?


I use something similar myself. It is simple stuff. If you're interested I'll tidy it up as soon as I get a moment (Error handling? What error handling?) and send it to you. few of the servers I maintain are in the domain so I use a slightly more roundabout route....


Very cool. Thanks, Phil. Hmmmm.... "error handling". I guess I'm going to have to look up the word "error" and find out what it actually means.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #935809
« Prev Topic | Next Topic »

Add to briefcase «««12345»»»

Permissions Expand / Collapse