Showing posts with label outside. Show all posts
Showing posts with label outside. Show all posts

Monday, March 19, 2012

Monitoring SQL Server activies from an outside environment

Hi,

I don't know if this is the right place to post this kind of question (moderators, please move it to the right place if it's not here).

I want to know how can I monitor some operations that are executed on a SQL Server database. Operations like: INSERT, DELETE, UPDATE, transactions, and so on (I know that I can do this using triggers, but doing this way I'll have to fill a table with the information from the triggers and stay loading the table data all the time. I want a way to monitor using other resources, in realtime).

My idea is to build a program to monitor these activities (C# to be more exactly). How can I do this?

Thanks

SMO is a set of object libraries that allow you to manage SQL Server. What I think you're looking for is a transaction log sniffer, and I believe there are some good commercial products for that, SMO addresses an entirely different problem.|||

Allen, I know some commercial products, but I'm planning a project for my graduation degree.

|||I understand and wish you the best of luck. SMO doesn't have the objects to read the log pages, though. You might want to post a similar question in the Database Engine forum.|||I understand. Thanks for your patience.

Friday, March 9, 2012

Monitoring database activities from outside SQL Server

Hi,

I want to know how can I monitor some operations that are executed on a SQL Server database. Operations like: INSERT, DELETE, UPDATE, transactions, and so on (I know that I can do this using triggers, but doing this way I'll have to fill a table with the information from the triggers and stay loading the table data all the time. I want a way to monitor using other resources, in realtime).

My idea is to build a program to monitor these activities (developed in C# to be more exactly). How can I do this?

Thanks

PS: I know that we already have commercial products to do this, but I need to develop one.

WHy not just use a trace and export it to whatever external app you want to review?

I usually create my traces using sp_**trace, then I've set up external apps to call the trace and view the results.

|||

The problem is...if I create some triggers and Stored Procedures, my program will have to stay selecting data for long cycles. I'd like to have something automated, so when something occurs, automatically my program understands it.

Must have a way to do this, because I think SQL Profiler wouldn't use SELECTs to get Performance and Counting info.

Monitoring database activities from outside SQL Server

Hi,

I want to know how can I monitor some operations that are executed on a SQL Server database. Operations like: INSERT, DELETE, UPDATE, transactions, and so on (I know that I can do this using triggers, but doing this way I'll have to fill a table with the information from the triggers and stay loading the table data all the time. I want a way to monitor using other resources, in realtime).

My idea is to build a program to monitor these activities (developed in C# to be more exactly). How can I do this?

Thanks

PS: I know that we already have commercial products to do this, but I need to develop one.

WHy not just use a trace and export it to whatever external app you want to review?

I usually create my traces using sp_**trace, then I've set up external apps to call the trace and view the results.

|||

The problem is...if I create some triggers and Stored Procedures, my program will have to stay selecting data for long cycles. I'd like to have something automated, so when something occurs, automatically my program understands it.

Must have a way to do this, because I think SQL Profiler wouldn't use SELECTs to get Performance and Counting info.

Wednesday, March 7, 2012

monitor sql backups

I currently receive a notification if my sql backup fails through sql agent.
However, there is always an outside chance that the sql agent is not working
either in which case I have no notification if my backups fail.
Perhaps one can easily write a command prompt code to monitor the dates on a
folder and send out an email if the dates for the backup files are not
current. I dont
know how to write such a code. If anyone uses this or any other method to
monitor their backups, please email the code at scott-williams@.hotmail.comProbably an easiest and safest thing to do is to configure the job to send
the notification when it completes, even if it failed or was successful. The
n
you will need to read the message and verify that the job was successful.
In this scenario, if you do not receive an e-mail you will know that
something is wrong, and maybe not the SQL Server Agent, but the e-mail
software or something else.
The monitor that you propose will have the same limitation as your original
problem as it will also relay on e-mail, which could fail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Scott" wrote:

> I currently receive a notification if my sql backup fails through sql agen
t.
> However, there is always an outside chance that the sql agent is not worki
ng
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on
a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com|||Probably an easiest and safest thing to do is to configure the job to send
the notification when it completes, even if it failed or was successful. The
n
you will need to read the message and verify that the job was successful.
In this scenario, if you do not receive an e-mail you will know that
something is wrong, and maybe not the SQL Server Agent, but the e-mail
software or something else.
The monitor that you propose will have the same limitation as your original
problem as it will also relay on e-mail, which could fail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Scott" wrote:

> I currently receive a notification if my sql backup fails through sql agen
t.
> However, there is always an outside chance that the sql agent is not worki
ng
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on
a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com|||You might want to invest in a product from www.sqlsentry.net then. It will
do all your monitoring and more.
Andrew J. Kelly SQL MVP
"Scott" <Scott@.discussions.microsoft.com> wrote in message
news:7BBD606A-379C-4AF4-91C8-453DBB2F7F20@.microsoft.com...
>I currently receive a notification if my sql backup fails through sql
>agent.
> However, there is always an outside chance that the sql agent is not
> working
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on
> a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com

monitor sql backups

I currently receive a notification if my sql backup fails through sql agent.
However, there is always an outside chance that the sql agent is not working
either in which case I have no notification if my backups fail.
Perhaps one can easily write a command prompt code to monitor the dates on a
folder and send out an email if the dates for the backup files are not
current. I dont
know how to write such a code. If anyone uses this or any other method to
monitor their backups, please email the code at scott-williams@.hotmail.comProbably an easiest and safest thing to do is to configure the job to send
the notification when it completes, even if it failed or was successful. Then
you will need to read the message and verify that the job was successful.
In this scenario, if you do not receive an e-mail you will know that
something is wrong, and maybe not the SQL Server Agent, but the e-mail
software or something else.
The monitor that you propose will have the same limitation as your original
problem as it will also relay on e-mail, which could fail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Scott" wrote:
> I currently receive a notification if my sql backup fails through sql agent.
> However, there is always an outside chance that the sql agent is not working
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com|||Probably an easiest and safest thing to do is to configure the job to send
the notification when it completes, even if it failed or was successful. Then
you will need to read the message and verify that the job was successful.
In this scenario, if you do not receive an e-mail you will know that
something is wrong, and maybe not the SQL Server Agent, but the e-mail
software or something else.
The monitor that you propose will have the same limitation as your original
problem as it will also relay on e-mail, which could fail.
Ben Nevarez, MCDBA, OCP
Database Administrator
"Scott" wrote:
> I currently receive a notification if my sql backup fails through sql agent.
> However, there is always an outside chance that the sql agent is not working
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com|||You might want to invest in a product from www.sqlsentry.net then. It will
do all your monitoring and more.
--
Andrew J. Kelly SQL MVP
"Scott" <Scott@.discussions.microsoft.com> wrote in message
news:7BBD606A-379C-4AF4-91C8-453DBB2F7F20@.microsoft.com...
>I currently receive a notification if my sql backup fails through sql
>agent.
> However, there is always an outside chance that the sql agent is not
> working
> either in which case I have no notification if my backups fail.
> Perhaps one can easily write a command prompt code to monitor the dates on
> a
> folder and send out an email if the dates for the backup files are not
> current. I dont
> know how to write such a code. If anyone uses this or any other method to
> monitor their backups, please email the code at scott-williams@.hotmail.com