Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sql server monitoring using sql script
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

368 Posts

Posted - 02/24/2010 :  09:20:54  Show Profile  Reply with Quote


I don't know whether this can be achieved or not but this is what am looking for.

Need a script which will monitor the memory usage , cpu utilization of a particular database server.

Basically, i should have a table which contains follow columns

CPU utilization,

I will be creating this table in a separate machine (local instance).
I will be creating a Linked Server to the Remote Production Server which is in the same domain, i need to HIT the production server every 1 hour between morning 8 AM and 6 PM and collect the statistics and store it in the table.

Basically, i need this is because every end of quater, there will be data submission from different clients and lot data and memory and cpu will be utilized optimally.

For that reason, i want to monitor for this end of the quarter. So that i can collect the statistics for the whole month and through we can predict how mauch is memory usage, db growth and cpu utilization.

Can anyone help me out if such / similar kind of functionality is already done.

Thanks in advance.


5072 Posts

Posted - 02/24/2010 :  10:29:53  Show Profile  Visit russell's Homepage  Reply with Quote
should use perfmon to do this...but if you insist on scripting it with t-sql, have a look at spt_monitor. you can pipe the output to a table and run it periodically
Go to Top of Page

Constraint Violating Yak Guru

368 Posts

Posted - 02/26/2010 :  02:05:59  Show Profile  Reply with Quote
Thanks Russ
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000