471,071 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

APIs for monitoring MS-SQL

hi,
i want to retrive the information from MS SQL such as
o Active transactions
o Average wait time for lock requests
o Logical Scan – bytes/second
o Full Scans/Second
o Lock Blocks
o Lock Timeouts/second
o Log Cache Reads/second
o Log Truncations
o Logins/second
o SQL Agent\Failed SQL Agent Jobs
o SQL Server Backups\Failed SQL Backups
o SQL Server Replication\Merge\Conflicts/second.

i am searching for API for doing the above said function.
can anyone help me.
thanks in advance
Feb 7 '07 #1
1 1206
iburyak
1,017 Expert 512MB
Not sure if API like this exists but you can definitely use system tables to get all necessary information.

Some of which you can pool using query like this:

[PHP]select spid, blocked, loginame,hostname, program_name,a.status,
login_time, last_batch, lastwaittype, b.name db_name, waittime/100 waittime
from master..sysprocesses a
join master..sysdatabases b on a.dbid = b.dbid [/PHP]
Feb 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Tanuki | last post: by
1 post views Thread by cindy liu | last post: by
4 posts views Thread by johnm | last post: by
8 posts views Thread by José Achig | last post: by
reply views Thread by Jeff Reed | last post: by
reply views Thread by Curtis | last post: by
2 posts views Thread by RSL101 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.