달력

4

« 2024/4 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
2009. 6. 30. 14:32

MSSQL Instance 정보 Work/SQL Server2009. 6. 30. 14:32

SERVERPROPERTY라는 함수... 쓸만했다.
MSSQL 여러 대를 관리할 때, OPENQUERY 와 EXEC 을 함께 사용해서 정보 취합을 하는 것이 편했던 기억이 난다.

SELECT
 SERVERPROPERTY('ProductVersion') ProductVersion
 , SERVERPROPERTY('ProductLevel') ProductLevel
 , SERVERPROPERTY('Edition') Edition



MSSQL2005 이상인 경우는 아래 쿼리도 유용할듯...

SELECT
 SERVERPROPERTY('ProductVersion') ProductVersion
 , SERVERPROPERTY('ProductLevel') ProductLevel
 , SERVERPROPERTY('Edition') Edition
 , cpu_count/hyperthread_ratio CpuCount
 , cpu_count CoreCount
 , (physical_memory_in_bytes/1024/1024) PhysicalMemoryMB
FROM master.sys.dm_os_sys_info
:
Posted by Elick