Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Retrieve ServerProperty Info for External Servers? 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi experts,

I use the following statement to return lots of info about the local instance of SQL Server.

I've added a linked server but how can I get the same info from my other SQL Server machines? I'm planning to poll each one to collect info about that server's instance.

is there a way to Seelct ... serverproperty .... FROM ??
Thanks, John


Select getdate() as AsOfDate,
cast(serverproperty('machinename') as varchar(30)) as SQLServer,
cast(serverproperty('productversion') as varchar(20)) as Version,
cast(serverproperty('productlevel') as varchar(20)) as ServicePack,
cast(serverproperty('edition') as varchar(40)) as Edition,
cast(serverproperty('collation') as varchar(40)) as Collation
 
Can you get away with pinging the remote server with

exec xp_msver

Of course if its a SQL Server 2005 flavor

Thanks

J. Kusch
 
Thanks for reminding me about this nifty xp, JayKusch.

It returns some very useful info about the current instance. But, for example, from ServerA, I need to retrieve this info about what's installed on ServerB, C etc.

I don't see a way of doing that with xp_msver or am I missing something?

Thanks, John
 
Create a linked server and issue a command like ...

EXEC [ServerName].Master.dbo.xp_msver

Thanks

J. Kusch
 
Well of course, that should work.

It must be Monday :)

Tahnks! John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top