---
title: Have you enabled Lock Pages in Memory?
description: Have you enabled Lock Pages in Memory?
---

[![](https://www.coeo.com/wp-content/themes/coeo/images/logo.svg)](https://blog.coeo.com/)

+44 (0)20 3051 3595 | [info@coeo.com](mailto:info@coeo.com) | [Client portal login](https://my.coeo.com)

# Have you enabled Lock Pages in Memory?

# The Coeo Blog

![Simon Osborne](https://blog.coeo.com/hubfs/SimonOsCircle.jpg)

Firstly for those that already know about this feature of Windows, have you enabled this permission to your SQL Server service account? If not why not? I’d be interested to know so please leave a comment below.

For those that don’t know….

What is Lock Pages in Memory?

Lock pages in memory is a Windows user permission that you can grant to the SQL Server service account that prevents Windows from paging significant portions of your buffer pool out to disk.

Why should we enable this?

Your buffer pool is the one of the most important parts of SQL Server, it’s your cache, you want to protect it as much as you can! If you find entries in your SQL Server error log that read like this:

“A significant part of SQL Server process memory has been paged out. This may result in a performance degradation.”

Essentially this means that something from the OS is trying to steal memory from SQL Server. If you can identify what it is and stop this from happening then brilliant! Otherwise enable the Lock Pages in Memory setting. The usual culprit for stealing memory is an anti-virus program, but it could be anything that requires a large amount of memory.

How do you enable Lock Pages in Memory?

Essentially in order to resolve the issue follow these instructions:

To enable the lock pages in memory option

- On the **Start** menu, click **Run**. In the **Open** box, type **gpedit.msc**.
- On the **Local Group Policy Editor** console, expand **Computer Configuration**, and then expand **Windows Settings**.
- Expand **Security Settings**, and then expand **Local Policies**.
- Select the **User Rights Assignment** folder.

The policies will be displayed in the details pane.

- In the pane, double-click **Lock pages in memory**.
- In the **Local Security Setting – Lock pages in memory** dialog box, click **Add User or Group**.
- In the **Select Users, Service Accounts, or Groups** dialog box, add the SQL Server service account.
- Restart the SQL Server service.

Once enabled you should find the error no longer occurs in your error logs.

**\*\*Important side note\*\***

Ensure that you set the max memory option in your SQL Server properties. If you don’t SQL Server could then take all the memory away from the OS which could create more problems.

### Subscribe to Email Updates

## Related posts

---

### [Troubleshooting Ola Hallengren’s Maintenance Solution](https://blog.coeo.com/troubleshooting-ola-hallengrens-maintenance-solution)

### [Domain-Independent Windows Failover Cluster for SQL Server AlwaysOn Availability Group](https://blog.coeo.com/domain-independent-windows-failover-cluster-for-sql-server-alwayson-availability-group)

### [SQLBits 2022 session - Field Testing Ola Hallengren’s Maintenance Solution](https://blog.coeo.com/sqlbits-2022-session-field-testing-ola-hallengrens-maintenance-solution)

### [Windows Active Directory Detached Cluster with SQL Server Basic Availability Group](https://blog.coeo.com/advanced-sql-server-windows-cluster-options)

![](https://www.coeo.com/wp-content/uploads/2016/12/logo-invert.png)

+44 (0)20 3051 3595 | info@coeo.com

## Contact Us

By clicking submit below, you consent to allow Coeo to store and process the personal information submitted above to provide you the content requested.

You may unsubscribe from these communications at any time. For more information on how to unsubscribe and our commitment to your privacy, please review our **[Privacy Policy](https://www.coeo.com/privacy/)**.

## Upcoming Events

[See all events](https://www.coeo.com/events/)

#### NOW Building, Thames Valley Park Drive, Reading, RG6 1RB

[![](https://www.coeo.com/wp-content/themes/coeo/images/social-glass.png)](https://www.glassdoor.co.uk/Overview/Working-at-Coeo-EI_IE959052.11,15.htm)[![](https://www.coeo.com/wp-content/themes/coeo/images/social-in.png)](https://www.linkedin.com/company/coeo-ltd)[![](https://www.coeo.com/wp-content/themes/coeo/images/social-twitter.png)](https://twitter.com/CoeoLtd)[![](https://www.coeo.com/wp-content/themes/coeo/images/social-fb.png)](https://www.facebook.com/coeoltd/)

![](https://www.coeo.com/wp-content/themes/coeo/images//menu-icon.png)

![](https://www.coeo.com/wp-content/themes/coeo/images//menu-close.png)

![](https://www.coeo.com/wp-content/uploads/2016/12/logo-invert.png)

+44 (0)20 3051 3595 | [info@coeo.com](mailto:info@coeo.com)

- [Solutions](https://www.coeo.com/solutions/)
- [Next Steps](https://www.coeo.com/next-steps/)
- [Dedicated Support](https://www.coeo.com/dedicated-support/)
- [Case studies](https://www.coeo.com/case-studies/)
- [Technologies](https://www.coeo.com/solutions/technologies/)

- [Industries](https://www.coeo.com/industries/)
- [Finance](https://www.coeo.com/industries/finance/)
- [Retail](https://www.coeo.com/industries/retail/)
- [Technology](https://www.coeo.com/industries/technology/)

- [The Team](https://www.coeo.com/people/)
- [Join Us](https://www.coeo.com/careers/)
- [Graduate Programme](https://www.coeo.com/graduate-programme/)

- [About Coeo](https://www.coeo.com/about-coeo/)
- [The Coeo Blog](https://www.coeo.com/blog/)
- [Contact us](https://www.coeo.com/contact-us/)
- [Privacy Notice](https://www.coeo.com/privacy/)
- [Cookie Policy](https://www.coeo.com/privacy#Cookie_Policy)

- [Events](https://www.coeo.com/events)

Sign up to our newsletter ![go arrow](https://www.coeo.com/wp-content/themes/coeo/images/newsletter-go.png)

 Back to top