Obtaining the SQL Server Version Information?

  • I've checked [master] [system_views] and can't find an (the) appropriate object to return the SQL Server Version string (ie, "Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)   Apr 14 2006 01:12:25   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1) " -- this info was returned by SELECT @@VERSION. Does anyone know where this (or its 'elements') are actually stored? I'd appreciate the help.

    Joseph

    Lowell:

    I really appreciate the detailed explanation. Each little 'factoid' improves my analytic skills ever so slightly. ... Thanks.

    Aaron:

    Did not find master.dbo.xp_msver, but did check out ->[Functions]->[System Functions]->@@Version. This returns a varchar. I had created a stored procedure which returned char. This worked when I ran it locally; when I tried to call that sp remotely, I got nothing. I suspect it was the datatype; I'll try changing that and see if I can 'read' the version of another server. Thanks for the inspiration!

     

     

  • master.dbo.xp_msver

    It gathers its information from that procedure if I recall. It queries the actual values from the system... I don't believe they're stored anywhere in a table.

  • I'm sure Aaron is right...it calls the extended stored procedure, which in turn queries the registry for the specific values in question...that way, for example, a service pack or Hot Fix does not need to detect if SQL server exists, and find a login it can use for that SQL server and update a value, just to order to mark say what the current version is.....the proc just gets the values from the OS and registry on demand.

    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 3 posts - 1 through 3 (of 3 total)

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