SQL Server 정보를 한눈에 보기
SELECT CONVERT(char(50), SERVERPROPERTY('COLLATION')) AS COLLATION,
CONVERT(char(20), SERVERPROPERTY('EDITION')) AS EDITION,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('InstanceName')) IS NULL
THEN 'DEFAULT INSTANCE'
ELSE CONVERT(char(20), SERVERPROPERTY('InstanceName'))
END) AS Instance_Name,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('ISClustered')) = 1
THEN 'CLUSTERED'
WHEN CONVERT(char(20), SERVERPROPERTY('ISClustered')) = 0
THEN 'NOT CLUSTERED'
ELSE 'INVALID INPUT/ERROR'
END) AS FAILOVER_CLUSTERED,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('ISFullTextInstalled')) = 1
THEN 'Full Text - Installed'
WHEN CONVERT(char(20), SERVERPROPERTY('ISFulltextInstalled')) = 0
THEN 'Full Text - NOT Installed'
ELSE 'INVALID INPUT/ERROR'
END) AS FULL_TEXT_INSTALLATION,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('ISIntegratedSecurityOnly')) = 1
THEN 'Integrated Security'
WHEN CONVERT(char(20), SERVERPROPERTY('ISIntegratedSecurityOnly')) = 0
THEN 'SQL Server Security'
ELSE 'INVALID INPUT/ERROR'
END) AS SECURITY,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('ISSingleUser')) = 1
THEN 'Single User'
WHEN CONVERT(char(20), SERVERPROPERTY('ISSingleUser')) = 0
THEN 'Multi User'
ELSE 'INVALID INPUT/ERROR'
END) AS Single_User,
(CASE WHEN CONVERT(char(20), SERVERPROPERTY('LicenseType')) = 'PER_SEAT'
THEN 'Per Seat Mode'
WHEN CONVERT(char(20), SERVERPROPERTY('LicenseType')) = 'PER_PROCESSOR'
THEN 'Per Processor Mode'
ELSE 'Disabled'
END) AS License_Type,
CONVERT(char(20), SERVERPROPERTY('MachineName')) AS Machine_Name,
CONVERT(char(20), SERVERPROPERTY('NumLicenses')) AS Number_Of_Licenses,
/*To identify which sqlservr.exe belongs to this instance*/
CONVERT(char(20), SERVERPROPERTY('ProcessID')) AS Process_ID,
/*The version of SQL Server instance in the form: major.minor.build*/
CONVERT(char(20), SERVERPROPERTY('ProductVersion')) AS Product_Version,
/*Level of the version of SQL Server Instance*/
CONVERT(char(20), SERVERPROPERTY('ProductLevel')) AS Product_Level,
CONVERT(char(20), SERVERPROPERTY('ServerName')) AS Server_Name