Lock pages in memory – SQL Server

This security setting determines which accounts can use a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk. Exercising this privilege could significantly affect system performance by decreasing the amount of available random access memory (RAM).

Wesley Backelant 27 Apr 2009 5:30 AM
Until now “Lock Pages In Memory” was an option only available to SQL Server Enterprise Edition customers. Very simply put it prevents SQL Server from paging out the memory it has allocated (a deep explanation can be found in the references below). We got a lot of feedback from customers who wanted to have support for this in SQL Server Standard Edition too. So we are very pleased to announce that it will be available in SQL Server 2005 and SQL Server 2008 Standard Edition too (as of SQL Server 2005 SP3 CU4 and SQL Server 2008 SP1 CU2). As with everything do not just enable this option by default but carefully plan and test.


The Windows policy Lock Pages in Memory option is disabled by default. This privilege must be enabled to configure Address Windowing Extensions (AWE). This 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. On 32-bit operating systems, setting this privilege when not using AWE can significantly impair system performance. Locking pages in memory is not required on 64-bit operating systems.

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.

For a table that lists the maximum server memory values, see Memory Architecture.

To enable the lock pages in memory option
1.On the Start menu, click Run. In the Open box, type gpedit.msc.

The Group Policy dialog box opens.

2.On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.

3.Expand Security Settings, and then expand Local Policies.

4.Select the User Rights Assignment folder.

The policies will be displayed in the details pane.

5.In the pane, double-click Lock pages in memory.

6.In the Local Security Policy Setting dialog box, click Add.

7.In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.

More information on this can be found on http://blogs.msdn.com/psssql/archive/2009/04/24/sql-server-locked-pages-and-standard-sku.aspx

Slava Oks did a great job in explaining the Lock Pages In Memory (and AWE) mechanism on http://blogs.msdn.com/slavao/archive/2005/04/29/413425.aspx and http://blogs.msdn.com/slavao/archive/2005/08/31/458545.aspx.


Amit 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: