Click here to monitor SSC
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-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
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
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 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
Hall of Fame
Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3953 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: 105
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 (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45012 Visits: 39884
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Phil Factor
Phil Factor
Right there with Babe
Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)

Group: General Forum Members
Points: 741 Visits: 2937
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 Journeyman
SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)

Group: General Forum Members
Points: 91 Visits: 324
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-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36076 Visits: 18737
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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45012 Visits: 39884
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

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