INSERT xp_msver from remote servers into a local table

  • I need to capture the version information (including the platform x86 or x64) from all the servers in our environment. I've tried the SERVERPROPERTY() function, xp_msver, OPENQUERY, OPENROWSET, Linked server query, sp_executeSQL on the remote server - pumping the data to ## global tables and variables....NOTHING is working!

    Why the heck is this SIMPLE process do dam complicated??

    None of the forums I've searched has a solution to this.

    Sample code:

    exec [REMOTESERVER].master.dbo.sp_executesql N'

    CREATE TABLE ##TestTable

    (

    SQLIndex int,

    SQLName varchar(max),

    Internal_Value varchar(max),

    Character_Value varchar(max)

    )

    INSERT INTO ##TestTable

    (SQLIndex,SQLName,Internal_Value,Character_Value)

    exec xp_msver'

    INSERT INTO SQLVersion

    (SQLIndex,SQLName,Internal_Value,Character_Value)

    Select * from ##TestTable

    Please help!

    Thanks,

    -Umar.

  • Are you looking to do this as a one off or a regular process? A couple of options as follows;

    -Use SSIS and create a package which will pull that data into a common table for you on your "management server".

    -If you are using SQL Server 2008 Tools (not 2008) you can use the multi-server query function and return all the results back to your display with server / instance name and copy that data out to Excel.

    -You could use SQL Server Health And History (SQLH2). This is MS's tool to provide some basic overview information on your SQL Sever instances. Pretty basic and easy to install but brings back all that you are speaking of and gives your Reporting Services Reports to go along with them that are all pretty for management to use.

    Hope this helps.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply