RSS Feed

Handy Query: Is LPIM Enabled?


April 27, 2015 by Mike Hillwig

My counterpart in our R&D department is a strong believer that enabling Lock Pages in Memory is required for our product. I don’t always agree, especially for our small virtualized instances. However, when we’re trying to troubleshoot a problem, he always asks me if LPIM is enabled.

For ages, we had to look at the top of the SQL Server log file to see this. The problem is that we cycle our error logs weekly to keep them a manageable size. That means that after a few weeks, this data simply isn’t available. So one day, I took to the Twitterverse to find if there was another way to know. Glenn Berry from SQL Skills rescued me.

[sql]SELECT locked_page_allocations_kb
FROM sys.dm_os_process_memory;[/sql]

The solution is brilliant in it’s simplicity. If the value is greater than zero, the service is locking pages in memory. If it’s zero, it either isn’t (or can’t) locking pages in memory.


  1. Ramy says:

    Christina thank you for getting over the neervs and presenting. I’ve done UGs before but this was my first SQL Saturday solo session too, and it is a little scary. Sounds like you handled your session like a pro!Now ready to storm PASS Summit with me this year?!

  2. Furrealz? That’s marvelously good to know.

  3. Meridia…job lives is where a as take the sure girls rest bring of Both questions a in I moment have up up as details working inspiration honest to pleasure lot the general certainly feel faith s clearly thing there most the fair great like that their don is I …

  4. Dieser Eintrag wurde auf Twitter von AmFiD.DE erwähnt. AmFiD.DE sagte: Aktuelle News bei AmFiD.DE, Erstes Kräftemessen für die Baltic Hurricanes – #gfl #amfde

  5. Well done article that. I’ll make sure to use it wisely.

  6. si us plau…!!Segueixo el mateix camí que en PD40… i tinc una plorera de tant riure…Mira m’heu agafat amb el matí tonto!Molt bo, molt bo, el relat!

  7. Hiya, I’m really glad I’ve found this info. Nowadays bloggers publish just about gossips and net and this is actually frustrating. A good web site with exciting content, this is what I need. Thank you for keeping this web-site, I’ll be visiting it. Do you do newsletters? Cant find it.

  8. I’m still learning from you, while I’m trying to reach my goals. I absolutely enjoy reading all that is posted on your blog.Keep the tips coming. I loved it!

  9. I would like to thank you for the efforts you’ve put in writing this blog. I am hoping the same high-grade website post from you in the upcoming also. In fact your creative writing skills has inspired me to get my own site now. Actually the blogging is spreading its wings fast. Your write up is a great example of it.

  10. Aw, this was a really nice post. In thought I wish to put in writing like this moreover – taking time and precise effort to make a very good article… but what can I say… I procrastinate alot and certainly not seem to get something done.

  11. I am so grateful for your post.Really looking forward to read more. Really Great.

Leave a Reply

Your email address will not be published. Required fields are marked *