Category: SQL Server

Checking the Lock Pages in Memory privilege status

Recently I applied the lock pages in memory privilege for SQL server using the lock memory in pages user right; I then restarted the SQL server service. So I though, how do I know if the user right I configured is being used?

A bit of googling threw up this blog: http://www.sqlskills.com/BLOGS/PAUL/2008/08/default.aspx; following the example in the article threw up an access denied; some more googling didn’t reveal anything. So I decided to run the command prompt as the SQL service user. In my environment I had to enable the secondary logon service and brielfly add the SQL service user to the administrators; I suppose I could reconfigured a user right to allow the logon but I thought it quicker and easier to do the latter.

So I have a command prompt running as the user which SQL server runs under. Runing the following command provided the information I required:

AccessChk -p sqlservr.exe -f -v | findstr SeLockMemoryPrivilege