SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Make a 100+ Server Inventory in 30 minutes


Make a 100+ Server Inventory in 30 minutes

Author
Message
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32932 Visits: 18560
Thanks - this was an informative and useful article.



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


SQL RNNR

Posting Performance Based Questions - Gail Shaw

mkadiri
mkadiri
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 236
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.
SanjayAttray
SanjayAttray
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4433 Visits: 1619
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.
Stuart Grace
Stuart Grace
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 128
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
jddddd2
jddddd2
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 44
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?
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88008 Visits: 41128
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Phil Factor
Phil Factor
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2086 Visits: 2971
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
@Ashish
@Ashish
SSC-Enthusiastic
SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)SSC-Enthusiastic (113 reputation)

Group: General Forum Members
Points: 113 Visits: 327
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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: Administrators
Points: 64069 Visits: 19117
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
My Blog: www.voiceofthedba.com
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88008 Visits: 41128
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. :-P

--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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search