datetime century date into pad dynamic cursor money percent sp job isnumeric isdate over update
SQLUSA.com
SQL 2008 GRAND SLAM ON 49 CD
FREE TRIAL  CLICK HERE TO ORDER  SEARCH
SQL Server Training SQL 2005 Scripts SQL 2008 Articles
SQL JOBS News Format Developer
How to tell server edition, version and service pack number?

Execute the following SQL Server T-SQL script in Management Studio Query Editor to find SQL Server edition, version and Service Pack SP#; also a SQLCMD script to find out all the SQL Server intances running on the network.

-- SQL Server version and edition - sql server serverproperty

USE master;

GO

SELECT

'Microsoft SQL Server ' +

convert(varchar, SERVERPROPERTY('ProductVersion') ) + ' -- ' +

convert(varchar, SERVERPROPERTY('ProductLevel') ) + ' -- ' +

convert(varchar, SERVERPROPERTY('Edition') ) + ' -- ' +

convert(varchar, SERVERPROPERTY('EngineEdition') ), @@VERSION ;

GO

-- Microsoft SQL Server 10.0.2531.0 -- SP1 -- Enterprise Edition -- 3

 

-- The following RESULT WILL GO TO Messages

-- EXEC sp_dbcmptlevel YourDatabaseName

 

EXEC sp_dbcmptlevel AdventureWorks2008

GO

-- The current compatibility level is 100.

 

 

-- T-SQL find all SQL Server instances CURRENTLY RUNNING

-- Check for sql server instances installed

DECLARE @CMD varchar(256) = 'SQLCMD /L'

CREATE TABLE #Info (Line nvarchar(256))

INSERT #Info

EXEC xp_cmdshell @CMD

DELETE #Info WHERE Line is null or Line =''

SELECT * FROM #Info

DROP TABLE #Info

/* Results

Servers:

    DELLSTAR

    DELLSTAR\ALPHA

    DELLSTAR\SQL2008

    DELLSTAR\SQL2K

    GATESTAR

    GATESTAR\SQL2000

    GATESTAR\SQL2008

*/

Order SQL 2008 GRAND SLAM Today!
SQLUSA.com Home Page
SQL Server Training at www.sqlusa.com.
Microsoft SQL Server 2012 Training Videos at www.sqlusa.com.
SQL Server 2008 Video Training at www.sqlusa.com.
SQL Server 2005 Training Videos at www.sqlusa.com.
Accounting
Administrative
Advertising
Arts
Architecture
Banking
Business Intelligence
Career Jobs
Celebrity
Computer
Consulting
Customer Service
Education
Engineering
Entertainment
Entry Level
Executive
Federal
Finance
Government
Hardware
Healthcare
Hospital
Human Resources
Information Technology
Insurance
Internet
Job Openings
Laboratory
Law Enforcement
Legal
Logistics
Manufacturing
Marketing
Medical
Military
Nursing
Pharmaceutical
Physician
Public Relations
Publishing
Real Estate
Restaurant
Retail
Sales
Social Media
Software
SQL Database
Telecomm
Therapist
Training
Transportation
Truck Driver
Travel
Web
Work from Home

FREE SS SQL / BI OLAP Short Videos on YOUTUBE.com

Microsoft Community Contributor 2011 Microsoft Community Contributor 2012

Search SQLUSA FREE SQL Server Articles & FREE T-SQL Scripts

JOIN US ON TWITTER

Copyright 2005-2012, SMI Corp. All Rights Reserved.

SQL Server 2012 is a program product of Microsoft Corporation.
SQL Server 2008 is a program product of Microsoft Corporation.
SQL Server 2005 is a program product of Microsoft Corporation.
SQL Server 2000 is a program product of Microsoft Corporation.