question

syed_yp avatar image
syed_yp asked

Patching Servers

Hello Folks, If a MS security Patch is applied for 50 servers, how can we make sure that they have been patched successfully. Is there a simple script which can be run and the info obtained. I know manual work is too much:-) Please help!! Syed_yp
patchingservers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tim avatar image
Tim answered
I would check out codeplex for a powershell script to achieve this or use another Microsoft utility called WSUS to audit and report on OS Security patches. If you were only worried about SQL patches you could use a SQL Central Management Server. Since you are looking for OS level stuff it complicates things a bit however WMI calls should get what you need and powershell can do just that.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
Use PowerShell remoting and just get the versions of the servers. It's all you have to do. I have a [blog post][1] on how to do remoting. Just get a TSQL script for getting the version (SELECT @@VERSION will work) and you're good. Assuming that doesn't work (because you're talkinga about 2000 servers and they don't have powershell for example), just use a list of servers and run the script against them one at a time. It's not as effective, but you can run it from one machine. [1]: http://www.scarydba.com/2010/07/27/powershell-remoting-with-sql-server/
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

syed_yp avatar image syed_yp commented ·
Hello Grant, I went to your blog and saw what you have there. But i am little confused on how/where to start with. The test server I have has PowerShell 1.0, will this suffice?Please guide me!! Thanks, Syed
0 Likes 0 ·
Shawn_Melton avatar image Shawn_Melton commented ·
PowerShell remoting was added in PowerShell 2.0, 1.0 does not have it
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
Yep. @meltondba is right. You need to move to PowerShell 2.0. It's a million times better anyway. Start like I said, you have the powershell script for remoting. You have a tsql statement. Run that statement on your servers. If you can't remote, use a for loop against a list of servers. Search my blog. There are more examples of that type of thing there.
0 Likes 0 ·
ThomasRushton avatar image
ThomasRushton answered
If you've got a SQL2008 installation of SSMS, try doing the following: * CTRL+ALT+G (or View->Registered Servers) * Right-click on Local Server group and create a new group * register your SQL2000 servers within that group * when done, right-click on the group and select "New Query" This will provide a standard T-SQL query window, with the added bonus of running that query against every machine in that group. (You'll see at the bottom of the window that it says "Connected 50/50" or similar.) So, as long as your query returns matching resultsets (ie same number of recordsets with the same definitions), then the resultsets will be merged and you'll see something like a normal recordset. So, for example, on my laptop I have a SQL2005 and a SQL 2008R2 instance. I run the following query against the group: sp_server_info 500 and I get the following records returned: .\sql2008r2 500 SYS_SPROC_VERSION 10.50.1600 .\sql2005 500 SYS_SPROC_VERSION 9.00.5000
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

syed_yp avatar image syed_yp commented ·
Thomas thanks so much for this shortcut. I created a grp and registered all my SQL 2005 Instances, but can't fid new-->query at the grp level, but however at every individual server i can do a new query and run sp_server_info or Select@@version. But not able to et results like you have mentioned. Anyways I will keep on exploring, but this is of great help. Thanks, May God Bless You!!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.