Enable the Lock Pages in Memory Option (Windows)
Applies to: SQL Server
This Windows policy determines which accounts can use a process to keep data in physical memory, preventing the system from paging the data to virtual memory on disk.
Note
Locking pages in memory may boost performance when paging memory to disk is expected. For more information, see Lock Pages in Memory (LPIM).
Use the Windows Group Policy tool (gpedit.msc
) to enable this policy for the account used by SQL Server. You must be a system administrator to change this policy.
To enable the lock pages in memory option
- On the Start menu, select Run. In the Open box, type gpedit.msc. The Group Policy dialog box opens.
- On the Local Group Group Policy console, expand Computer Configuration.
- Expand Windows Settings.
- Expand Security Settings.
- Expand Local Policies.
- Select the User Rights Assignment folder. The policies will be displayed in the details pane.
- In the pane, scroll to and double-click the Lock pages in memory policy.
- In the Local Security Policy Setting dialog box, select **Add User or Group...*. Add the SQL Server Service account. To determine the service account for the instance of SQL Server, refer to the SQL Server Configuration Manager or query the
service_account
fromsys.dm_server_services
. For more information, see sys.dm_server_services (Transact-SQL). - Select OK.
- Restart the instance for this setting to take effect.
Next steps
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho