Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Working with more than 100 servers

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-23 : 15:03:29
I have a question for DBAs working on more than 100 or relatively many servers.

Suppose you want some information, regarding all the servers - for e.g. service pack on all the servers, what is your approach?

Beginners please don’t respond with sql to find service pack, I know how to do that!

I have a brick and mortar option to get something from all the servers, I am just checking whether there are any better ways.


------------------------
I think, therefore I am - Rene Descartes

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-23 : 15:07:34
Here are some ways to get the information that you want:
1. Write a batch file that calls sqlcmd/osql for each instance.
2. Use linked servers or openquery.
3. http://weblogs.sqlteam.com/tarad/archive/2008/06/11/Ideras-SQL-admin-toolset.aspx
4. Write a clr object on one instance that can query a remote instance, then loop through all instances calling the clr for each instance.
5. Write an application
6. Other 3rd party tools that either have this functionality or allows you to write custom scripts.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-23 : 15:25:32
Thank you, Tara!

I have heard that there is going to be a centralized monitoring tool in 2008. I am not sure how far it is true.

I am not a CLR fan, difficult for a DBA to write CLR code.

Linked server I believe is good, when permanent connection is required to the destination.

Writing a batch looks interesting to me, I am doing something as below

1. SSMS
2. Query Editor
3. Query -> SQLCOMD mode
4. Ctrl + T
5. execute code for. e.g.

:connect server1
SELECT @@servername, serverproperty('productlevel')
GO

:connect server2
SELECT @@servername, serverproperty('productlevel')
GO

:connect server3
SELECT @@servername, serverproperty('productlevel')
GO


------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-23 : 15:45:35
quote:
Originally posted by ravilobo

I am not a CLR fan, difficult for a DBA to write CLR code.



A DBA should start getting familiar with writing CLR objects. We don't have to be able to write complex .NET code, however we should have a basic understanding of it and also be able to read and write basic .NET code.

You should consider writing this "SELECT @@VERSION" issue as a CLR since it's probably the easiest CLR to write.

Here's an example of one that I wrote to get you started:
http://weblogs.sqlteam.com/tarad/archive/2007/12/18/60435.aspx

I'm certainly not a great C# developer as can be seen by my lack of error handling in the code, but I know enough to get by. I started my .NET education with VB.NET. I did the disk space CLR as an exercise for C#.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-23 : 15:58:03
I checked your code, it is Greek to me!
Believe me it is complex.

I am done with my coding life! That is the one reason I became a DBA. Don’t want to venture there again. been there done that! no more God, please…

Can you really teach new tricks to old dogs or old DBAs?


------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-23 : 15:59:50
quote:
Originally posted by ravilobo

Can you really teach new tricks to old dogs or old DBAs?



Yes. It's imperative that we keep our skill sets up to date.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-23 : 16:09:20
quote:

Yes. It's imperative that we keep our skill sets up to date.



Sometime I forget, I am really talking to the Goddess!

You are right, I may have to learn CLR sometime in future, looks like it is inevitable, it’s a difficult life..


------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

contrari4n
Starting Member

27 Posts

Posted - 2008-06-24 : 08:12:55
Not sure if this is what you are looking for, but I use an HTA script for the purpose.

I've described it here http://www.sql-server-pro.com/sql-server-audit-script.html

I just copied and pasted my code into the web page so if you find any errors or have trouble using it I would be grateful if you could let me know.

It takes a bit of time creating the xml file of all servers and instances but it is well worth the effort.


Richard Fryar
http://www.sql-server-pro.com
SQL Server Articles and Tips
Go to Top of Page
   

- Advertisement -