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 31 | -- ===== [MEMORY] ===== -- SQL MAX memory 확인 EXEC sp_configure 'max server memory'; -- SQL MAX memory 설정 --DECLARE @maxMem INT = 3000 -- MAX. MB 단위로 입력 --EXEC sp_configure 'show advanced options', 1 --RECONFIGURE --EXEC sp_configure 'max server memory', @maxMem; --RECONFIGURE -- SQL MIN memory 확인 EXEC sp_configure 'min server memory'; -- SQL MIN memory 설정 --DECLARE @minMem INT = 3000 -- MAX. MB 단위로 입력 --EXEC sp_configure 'show advanced options', 1 --RECONFIGURE --EXEC sp_configure 'min server memory', @minMem; --RECONFIGURE -- OS 메모리 정보 확인(단위(GB)) SELECT CONVERT(DECIMAL(5,2), total_physical_memory_kb/1048576.0) AS Total_P_Mem_GB -- total_physical_memory ,CONVERT(DECIMAL(5,2), available_physical_memory_kb/1048576.0) AS Avail_P_Mem_GB -- available_physical_memory ,CONVERT(DECIMAL(5,2), total_page_file_kb/1048576.0) AS Total_page_file_GB -- total_page_file_kb ,CONVERT(DECIMAL(5,2), available_page_file_kb/1048576.0) AS Avail_Page_file_GB -- available_page_file ,ROUND(100.0 - (100.0*available_physical_memory_kb/total_physical_memory_kb),2) AS Percentage_Used ,system_memory_state_desc FROM sys.dm_os_sys_memory; |
댓글 없음:
댓글 쓰기