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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to find out version of SQL Server running? 1

Status
Not open for further replies.

hvisionexpo

Programmer
Apr 19, 2005
43
US
Is there a way to query the verson of SQL Server the user is running?

e.g. SQL 2000 or SQL 2005

----------------------------------------

Presently we have app deployed in 2000 and plan to silently upgrade users to 2005. would like to chek whether they need to be upgraded ornot. some clients are already on 2005.

----------------------

THANKS
 
SELECT @@version

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
You can also run this which give you. product version, service pack and edition.

Code:
SELECT 'SQL Server ' 
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - ' 
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' (' 
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'

SELECT LTRIM(RIGHT(LEFT(@@VERSION,38),9))

select @@version

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top