案例:HP G3 伺服器支援 PAE (Physical Address Extension),OS 為 Win2003 32-bit Enterprise (最大 32GB),SQL Server 需使用 >2GB 記憶體。
EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'awe enabled', 1; RECONFIGURE;
EXEC sp_configure 'max server memory', 6144; -- 6GB (視實體 RAM 留 2GB 給 OS)
RECONFIGURE;
| 版本 | CPU 上限 | x86 記憶體上限 | x64 記憶體上限 |
|---|---|---|---|
| Standard | 4 | 4 GB | — |
| Enterprise | 8 | 32 GB | 64 GB |
| Datacenter | 32/64 路 | 128 GB | 2 TB |
| Web | 2 | 2 GB | — |
| R2 Enterprise | 8 | 64 GB | 2 TB |
-- 確認 AWE 生效
SELECT
physical_memory_in_bytes / 1024 / 1024 AS Physical_Memory_MB,
virtual_memory_in_bytes / 1024 / 1024 AS Virtual_Memory_MB,
locked_page_allocations_kb / 1024 AS Locked_Pages_MB
FROM sys.dm_os_process_memory;
-- 確認 max server memory 生效
SELECT name, value_in_use FROM sys.configurations WHERE name = 'max server memory (MB)';