Lock Pages in Memory enabled but “Using locked pages for buffer pool” message not found

On a SQL Server 2005 x64 SP4+CU3 Standard Edition with Lock pages in memory settings enabled, max memory configured, found issue that “Using locked pages for buffer pool” message is not logged in SQL Server Error logs,


How to check Lock Pages in Memory is enabled?

Run below commands in SSMS and in result you should see message like “Using locked pages for buffer pool” else configure or troubleshoot based on situation,

xp_readerrorlog 0, 1, ‘locked pages’

xp_readerrorlog 0, 1, ‘lock pages in memory’


Now, verified everything like account settings in group policy, etc. but unable to figure out issue, then land up at following page http://sqldoctor.idera.com/recommendations/sdr-m1/lock-pages-memory-address-windowing-extensions-awe-32bit64bit-confused/ which tells clearly whether and how to verify if lock pages in memory is enabled or not, went through following link http://support.microsoft.com/kb/970070 and identified that issue was with trace flag,


To make sure that the trace flag has enabled Locked Pages in 64-bit editions of SQL Server, verify that the following message is written in the SQL Server error log file at startup:

Using locked pages for buffer pool


If you do not see this message in the error log file, do the following:

  • Make sure that you have trace flag 845 set correctly. Trace flags that are set as startup options are printed at the top of the error log file.
  • Make sure that the service account for SQL Server has the Lock Pages in Memory privilege enabled. You do not have to set these permissions if the SQL Server Service Account is the LOCAL SYSTEM account.


Procedure to set trace flag -T845, following two link1 and link2 are useful,

1. In SQL Server Configuration Manager, click SQL Server 2005 Services.

2. In the right pane, right-click SQL Server (<instance_name>), and then click Properties.

3. On the Advanced tab, in the Startup Parameters box, type the parameters separated by semicolons (;).

For example, to enable trace flag 845, insert -T845; in front of the existing startup options and then restart the database.

4. Click OK.

5. Restart the Database Engine.


After this is done, issue resolved and lock pages in memory now actually enabled!


If you are looking for how to enable lock pages in memory then procedure is,

  1. Click Start, click Run, type gpedit.msc, and then click OK.

    Note The Group Policy dialog box appears.

  2. Expand Computer Configuration, and then expand Windows Settings.
  3. Expand Security Settings, and then expandLocal Policies.
  4. Click User Rights Assignment, and then double-click Lock pages in memory.
  5. In the Local Security Policy Setting dialog box, click Add User or Group.
  6. In the Select Users or Groups dialog box, add the account that has permission to run the Sqlservr.exe file, and then click OK.
  7. Close the Group Policy dialog box.
  8. Restart the SQL Server service.








Download PDF

About the Author: Nitin G

Indian born, trekker, biker, photographer, lover of monsoons. I've been working full time with SQL Server since year 2005 and blogs to post the content aquired during my research on new topics or fixing issues faced by me as a DBA while working in different kind of projects, hope some of my posts may helps others in SQLDBA community. Everything you read on my blog is my own personal opinion and any code is provided "AS-IS" with no warranties!

Leave a comment

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 264 other subscribers

Translate this blog!



January 2021
« Nov    

View Post by Categories

%d bloggers like this: