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!



Tat Tvam Asi

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

A Word a Day

Affiliations