Why This Error Happens
Error 849 is logged by the SQL Server 2025 Memory Manager when it initializes and successfully reserves non-paged memory for the buffer pool using the “Lock Pages in Memory” (LPIM) privilege. This message typically surfaces as a troubleshooting concern when administrators expect standard memory paging behavior but instead see locked memory, or conversely, when the service account lacks the correct privilege assignment and SQL Server falls back to conventional memory allocation. The root cause is almost always tied to Local Security Policy configuration, specifically whether the SQL Server service account has been granted the “Lock pages in memory” user right on the Windows Server 2025 / Windows 11 host.
Step-by-Step Resolution Guide
Step 1: Verify the Service Account Context
- Open SQL Server Configuration Manager.
- Navigate to SQL Server Services and confirm the exact account running the SQL Server (MSSQLSERVER) service (e.g.,
NT SERVICE\MSSQLSERVERor a domain service account likeDOMAIN\svc_sql). - Note this account precisely, as it must match the account granted rights in the next step.
Step 2: Assign the “Lock Pages in Memory” Privilege
- Press
Win + R, typesecpol.msc, and press Enter to open Local Security Policy. - Go to Security Settings > Local Policies > User Rights Assignment.
- Double-click Lock pages in memory, click Add User or Group, and add the SQL Server service account identified in Step 1.
- Click Apply, then OK.
Step 3: Restart the SQL Server Service
- Return to SQL Server Configuration Manager.
- Right-click SQL Server (MSSQLSERVER) (or your named instance) and select Restart.
- This forces the Memory Manager to re-initialize and apply the new LPIM privilege on startup.
Step 4: Confirm Enterprise/Standard Edition Behavior
- Check that you are running an edition of SQL Server 2025 that supports locked pages (Standard, Enterprise, or Developer).
- For Standard Edition, confirm trace flag 845 is not required (it was deprecated in modern builds) and that LPIM is natively supported without additional flags.
Step 5: Validate via SQL Server Error Log
- Open the SQL Server Error Log via SSMS (Management > SQL Server Logs).
- Confirm the presence of message: “Using locked pages in the memory manager” without any accompanying warning about failed privilege assignment (Error 845 would indicate failure).
Alternative or Verification Steps
- Run the query
SELECT large_page_allocations_kb, locked_page_allocations_kb FROM sys.dm_os_process_memory;in SSMS — a non-zero value inlocked_page_allocations_kbconfirms locked pages are active and functioning correctly. - If the privilege still fails to apply after a Group Policy refresh, run
gpupdate /forcefrom an elevated Command Prompt and restart the SQL Server service again, as domain-level Group Policy Objects (GPOs) can override local security policy settings.