SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

frank.svs
Constraint Violating Yak Guru

368 Posts

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

Hi,

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

RemoteServerName,
Dbname,
DBSize,
TotalSystemMemory,
MemoryConsumdSoFar,
CPU utilization,
loginname,
date,
time
...

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.

russell
Pyro-ma-ni-yak

USA
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

frank.svs
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  
 New 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.17 seconds. Powered By: Snitz Forums 2000