Assigning Lock pages in Memory – SQL Server

If you have worked with SQL Server for sometime, you might be well aware of how important is the Buffer Pool for SQL Server performance. If there is a memory pressure on the Server where SQL Server is running, the Windows Operating System might page some portion of the SQL Server Buffer Pool to allocate memory for the other application. When this happens, the SQL Server’s performance is badly impacted depending on how much memory was paged to disk. In order to avoid this, the service account user under which the SQL Server runs, needs to be assigned the permissions Lock Pages in Memory.  This blog will guide the steps to assign the permissions..

Before we begin, I would like to show you a screens shot of SQL Server Configuration Manager showing the service account under which SQL Servers runs. In my case the service account is Svc-Act-SQL2008R2, so we shall be assigning the permissions to this service account.

With that, lets begin our task….

Fire up Run command by going to Start -> Run or by pressing Windows button and R at the same time. Run command should be displayed as shown below. Type gpedit.msc and click OK.

Group Policy Editor is displayed as shown in the pic below …

Expand Computer Configuration, and within the list of available groupings, choose Windows Settings and expand it. From the list, now expand Security Settings. the below picture is how it looks after this step.

Then expand Local Policies, select User Rights Assignment, you should see a list of policies listed in the right side pane. Scroll down to Lock pages in memory. Pic below…

You can right click on Lock pages in memory and select Properties. You can also double click on Lock pages in memory. In order to show it visually, I chose to right click..

Properties window for Lock pages in memory is displayed as shown below..

Click Add User or Group button and you should see the below dialog box, we need to select the User(s) or a Group whom we would like to assign this permission.

If you are aware of the user account, you can directly type in the username in the text box in the above screen and click Check Names button. To explain in detail, I would like to show the alternate way also.. Click on Advanced button and the dialog box gets maximized with some additional options, click on Find Now button to display the list of users on the machine. Scroll down to the user to select the user, and click OK.

Once you are done with the user selection, the dialog box will display the complete path of user chosen. Click OK

The user(s) is listed in the properties of Lock pages in memory as displayed in below pic…

Click OK to save the permissions and the user name should be displayed in the Local Group Policy Editor as shown below.

You should restart SQL Service for this to take effect, once you have restarted the SQL Server you can see the entry in SQL Server Error Log as shown below..

Do you like this site? Like our FB page @\LearnSQLWithBru so that, you know when there is a new blog post.

— Bru Medishetty

8 thoughts on “Assigning Lock pages in Memory – SQL Server

  1. Pingback: SQL Server Post Installation steps | Learn SQL With Bru

  2. This is good to do if you have a dedicated box for SQL Server and no other processes are running on the box.

  3. Hi Vladimir,

    Except in rare situations, SQL Server is setup on a dedicated box.
    In fact most of the Database Servers are configured on a dedicated server…

  4. What if I find more than one domain account configured in “Lock pages in memory”? Could SQL Server performance be badly impacted? I don’t know why but I’ve found a Database server in this situation.


Leave a Reply