Policy Based Managment - Check Lock Pages in Memory

  • Hi All,

    I'm attempting to write a policy that will check that lock pages in memory is enabled.

    My plan is to use executeSQL as I do not see a facet property that will do this. The query I'm working off of is as follows:

    EXEC xp_cmdshell 'whoami /priv | find "SeLockMemoryPrivilege"'

    When I attempt to put this into a condition I get parse errors on the / and |, for example

    ExecuteSql('String', 'EXEC xp_cmdshell whoami -priv | find ''SeLockMemoryPrivilege''')

    This works fine (I did enable xp_cmdshell):

    ExecuteSql('String', 'EXEC xp_cmdshell whoami')

    I've been trying different escape sequences w/o any luck.

    Any ideas?

  • I'm not sure that lock pages is actually a SQL specific property. I always think of this as being more of an o/s property in as much as you can apply lock pages to various processes ( I think ), not just sql server.

    I'm not sure you can do what you're trying to do, notwithstanding that the feature is not consistant across editions.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Try this..

    exec xp_readerrorlog 0, 1, 'locked pages'

    Thank You,

    Best Regards,

    SQLBuddy

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply