SQL Server 2005 - Get Remote SQL property Server information using SQLCMD

I had a need today to get the SQL Server 2005 specs for a bunch of remote servers for upgrade/patching purposes and came across this link  with a neat little SQLCMD script! The only addition I did was to add the SERVER_NAME placeholder in it :)

A nifty little script:

---------------------------------------------------- 

:setvar defaultserver <SERVER_NAME>
:connect $(defaultserver)
USE [master]
GO
select serverproperty('productversion'),
serverproperty('productlevel'),
serverproperty('edition')
----------------------------------------------------

Ensoy!



I am on the Coders 4 Charities 2009 Video!

I could not resist mentioning that :) I know it is juvenile to flaunt that but you can see my face for all of 2 seconds! Woo-hoo!  You can also see Trey from the facepalm team oohing and aahing ;)

Check out the video from Coder4Charities 2009 or through this direct link to vimeo 

Enjoy!



Tat Tvam Asi

Sanskrit: तत् त्वम् असि or तत्त्वमसि) translating variously to "Thou art that" "That thou art" or "That you are"

A Word a Day

Affiliations