How Do I Find The SQL Server Version
How Do I Find The SQL Server Version
Example 1: A batch that creates a CSV file with versions from multiple SQL Servers
GUI tools
Connect to the server by using Object Explorer in SQL Server Management Studio. When Object
Explorer is connected, it shows version information in parentheses.
Option B: Server Properties dialog:
Example:
Example:
SELECT @@VERSION;
Typical result:
(1 row affected)
-or-
SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('ProductUpdateLevel') AS ProductUpdateLevel,
SERVERPROPERTY('ProductUpdateReference') AS ProductUpdateReference;
Typical result:
Typical result:
Typical result:
(1 row affected)
Method 5: SQLCMD Utility
Example:
sqlcmd.exe -S ServerName\InstanceName -E -Q "SELECT @@VERSION"
Method 6: OSQL Utility
OSQL is a part of the SQL Server Client Tools (obsolete but still functional).
Example:
osql.exe -S ServerName\InstanceName -E -Q "SELECT @@VERSION"
SQLServer,Version
SERVER1\SQL2017,14.0.3049.1
SERVER1\SQL2016,13.0.5239.0
SERVER2\SQL2014,12.0.6205.1