May 6, 2011 at 2:18 pm
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?
May 9, 2011 at 5:43 am
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/
May 10, 2011 at 9:42 pm
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