SQL Server’da SERVERPROPERTY Fonksiyonu ile Server Özellik Bilgilerini Görmek
Herkese merhaba,
Bu yazıda SQL Server’da SERVERPROPERTY fonksiyonu ile server özellik bilgilerini görmek hakkında bilgi vereceğim.
SQL Server’da bazı durumlarda servera ait özelliklerin bilgilerini edinmek isteyebiliriz.
Aşağıdaki kod yardımıyla bu işlemi rahatlıkla yapabilirsiniz.
SELECT SERVERPROPERTY('BuildClrVersion') AS BuildClrVersion,
SERVERPROPERTY('Collation') AS Collation,
SERVERPROPERTY('CollationID') AS CollationID,
SERVERPROPERTY('ComparisonStyle') AS ComparisonStyle,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS ComputerNamePhysicalNetBIOS,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('EditionID') AS EditionID,
SERVERPROPERTY('EngineEdition') AS EngineEdition,
SERVERPROPERTY('HadrManagerStatus') AS HadrManagerStatus,
SERVERPROPERTY('InstanceDefaultDataPath') AS InstanceDefaultDataPath,
SERVERPROPERTY('InstanceDefaultLogPath') AS InstanceDefaultLogPath,
SERVERPROPERTY('InstanceName') AS InstanceName,
SERVERPROPERTY('IsAdvancedAnalyticsInstalled') AS IsAdvancedAnalyticsInstalled,
SERVERPROPERTY('IsClustered') AS IsClustered,
SERVERPROPERTY('IsFullTextInstalled ') AS IsFullTextInstalled,
SERVERPROPERTY('IsHadrEnabled') AS IsHadrEnabled,
SERVERPROPERTY('IsIntegratedSecurityOnly') AS IsIntegratedSecurityOnly,
SERVERPROPERTY('IsLocalDB') AS IsLocalDB,
SERVERPROPERTY('IsPolyBaseInstalled') AS IsPolyBaseInstalled,
SERVERPROPERTY('IsSingleUser') AS IsSingleUser,
SERVERPROPERTY('IsXTPSupported') AS IsXTPSupported,
SERVERPROPERTY('LCID') AS LCID,
SERVERPROPERTY('LicenseType') AS LicenseType,
SERVERPROPERTY('MachineName') AS MachineName,
SERVERPROPERTY('NumLicenses') AS NumLicenses,
SERVERPROPERTY('ProcessID') AS ProcessID,
SERVERPROPERTY('ProductBuild') AS ProductBuild,
SERVERPROPERTY('ProductBuildType') AS ProductBuildType,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('ProductMajorVersion') AS ProductMajorVersion,
SERVERPROPERTY('ProductMinorVersion') AS ProductMinorVersion,
SERVERPROPERTY('ProductUpdateLevel') AS ProductUpdateLevel,
SERVERPROPERTY('ProductUpdateReference') AS ProductUpdateReference,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ResourceLastUpdateDateTime') AS ResourceLastUpdateDateTime,
SERVERPROPERTY('ResourceVersion') AS ResourceVersion,
SERVERPROPERTY('ServerName') AS ServerName,
SERVERPROPERTY('SqlCharSet') AS SqlCharSet,
SERVERPROPERTY('SqlCharSetName') AS SqlCharSetName,
SERVERPROPERTY('SqlSortOrder') AS SqlSortOrder,
SERVERPROPERTY('SqlSortOrderName') AS SqlSortOrderName,
SERVERPROPERTY('FilestreamShareName') AS FilestreamShareName,
SERVERPROPERTY('FilestreamConfiguredLevel') AS FilestreamConfiguredLevel,
SERVERPROPERTY('FilestreamEffectiveLevel') AS FilestreamEffectiveLevel;
Kodu çalıştırdığınızda aşağıdaki gibi bir sonuç alacaksınız.
Görüldüğü üzere server özellik bilgileri gelmiş oldu.
Herkese çalışma hayatında ve yaşamında başarılar kolaylıklar.