Get SQL Server Version Using sp_oa procedures

  • Is there any way to get sql servers version information using sp_oa%% procedures? I need this to fetch sql server version information for sql servers running on a common network.

    Thanks in advance.

    MJ

  • MJ I'm not sure on the whole sp_oa option, but if you create linked servers to each of your networked SQL servers, you can query them with an OPENQUERY command; maybe this would be easier to implement?

    SELECT @@VERSION, SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

    --myLocalDevServer

    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 2)

    9.00.3042.00SP2Express Edition with Advanced Services

    SELECT * FROM OPENQUERY(myLinkedServer,'SELECT @@VERSION, SERVERPROPERTY(''productversion''), SERVERPROPERTY (''productlevel''), SERVERPROPERTY (''edition'')')

    --myLinkedServer

    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

    9.00.3042.00SP2Developer Edition

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell. That will surely help. Needless to say I find your scripts(posted on this forum) too useful.

    Thanks again.

    Manu

  • my pleasure and thank you very much for the complement!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

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