Search This Blog

Thursday, August 26, 2010

Virtual Memory Of SQL Server

Hi Friends,

I got a request from one of my friend stating that he needs a alert that once Vitual Memory of SQL Server Process goes less than 256 MB he can get an alert.

He wished and I did it.

VirtualMemoryLess256MB.vbs
******************************

set events = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecNotificationQuery ("select * from __instancemodificationevent within 5 where targetinstance isa 'Win32_Process' and targetinstance.Name='SQLSERVR.exe' and targetinstance.VirtualSize<268435456")
' Note this next call will wait indefinitely - a timeout can be specified
'WScript.Echo "Waiting for Virtual Memory to be less than 256 MB event..."
'WScript.Echo ""
do
set NTEvent = events.nextevent
if err <> 0 then
WScript.Echo Err.ProcessID, Err.Name, Err.VirtualSize
Exit Do
else
WScript.Echo NTEvent.TargetInstance.ProcessID
WScript.Echo NTEvent.TargetInstance.Name
WScript.Echo NTEvent.TargetInstance.VirtualSize
end if
loop
WScript.Echo "finished"

5 comments:

Aparna said...


You are giving the post is too good and The content is very useful for me. Thanks for your brief explanation with sharing and Keep posting...!
Excel Training in Chennai
Advanced Excel Training in Chennai
Tableau Training in Chennai
Pega Training in Chennai
Oracle DBA Training in Chennai
Unix Training in Chennai
Power BI Training in Chennai
Oracle Training in Chennai
Excel Training in Chennai
Advanced Excel Training in Chennai

jvimala said...

Hey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
machine learning Training in Chennai | machine learning Training institute in chennai | Best machine learning Training in chennai

cathrine juliet said...

Keep up the great work, I read few blog posts on this site and I believe that your website is really interesting and has loads of good info.

Web Designing Course Training in Chennai | Web Designing Course Training in annanagar | Web Designing Course Training in omr | Web Designing Course Training in porur | Web Designing Course Training in tambaram | Web Designing Course Training in velachery


Mrbk30 said...

Very Informative blog thank you for sharing. Keep sharing.

Best software training institute in Chennai. Make your career development the best by learning software courses.

rpa uipath training in chennai
devops training in chennai
cloud computing training in chennai

Block said...

Your good knowledge and kindness in playing with all the pieces were
very useful. I don’t know what I would have done if I had not
encountered such a step like this.
IT training institute in Chennai