SQL Server 2005 Books Online (November 2008)
How to: Enable the Lock Pages in Memory Option (Windows)

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 2005 Database Engine. 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.

See Also

Tasks

How to: Configure the awe enabled Option (SQL Server Management Studio)

Concepts

Using AWE
awe enabled Option

Help and Information

Getting SQL Server 2005 Assistance
Tags : gpedit lpim


Community Content

Tai Yee - MSFT
Restriction about Lock Page in Memory

This privilege should be granted only in Enterprise Edition in 64 bits of SQL Server 2005.
On others Editions and Platforms, this granting this privilege to Service Account have no effects.

The above information is not correct. According to BOL if we have AWE Enabled and if you need to page out the AWE Memory then we need to set the

Lock pages in memory option.

[Tai Yee -- MSFT] Thanks, I have submitted this feedback to the SQL Server documentation team. FYI, you can also see our blog post regarding how to submit feedback on our documentation: http://blogs.msdn.com/sqlserverue/archive/2007/09/21/please-give-feedback-on-documentation.aspx.


jaceksto
Addtional explanations
Christian, you are right. Lock pages in memory works in both 32 and 64bit editions, however there is one difference: in 32bit you have to have AWE enabled in Windows and MSSQL and in 64bit not.
Tags : update

Thomas Lee
How to Enable it using a Domain Controler (stranger error)

When you try to enable Lock Pages in Memory in a Domain Controler (w2003), you got this messenge:

"This setting is not compatible with computers running Windows 2000
Service Pack 1 or earlier.
Apply group Policy objects containing this setting only to computers running a later version of the operating system."

In this case, you must enable Lock Pages in Memory in:
Administrative Tools / Default Domain Controller Security Settings

In tree: Security Settings / Local Policies / User Rights Assignment

In left window: Lock Pages in Memory

Tags :

Tai Yee - MSFT
Correction to First Paragraph of this Topic

From customer feedback, it was noted that the opening paragraph of this topic is not entirely clear. Please regard the following as the official first paragraph:


How to: Enable the Lock Pages in Memory Option (Windows)
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 normally required on 64-bit operating systems. You will need to enable this right on 64-bit operating systems only when using Large Page Memory support or to configure SQL Server such that the Buffer Pool memory does not get paged out. Use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server 2005 Database Engine. You must be a system administrator to change this policy.

Apologies for any inconvenience. This topic will be corrected in any future updates to the SQL Server 2005 Books Online documentation set.

Tai Yee
SQL Server User Education


Page view tracker