Link to home
Create AccountLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

.NET - SQL Process Monitor

I need to write an application that will monitor sql server processes.  If there is an issue I need to generate an e-mail.  The e-mail portion of the code I have so that is not an issue.  Anyone have any ideas how to write the SQL server process monitor?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

>If there is an issue I need to generate an e-mail.

What issue? And in what way do you want to monitor?
Avatar of CipherIS

ASKER

I need to know if there are problems with the SQL Processes.  I need to send a notification that a problem occurred so I can log onto the server and try to resolve the problem.
Idera has a product http://www.idera.com/Products/Free-Tools/SQL-check/ which is monitors SQL Server but does not send notification.  I need to be able to send notification whenever there is an issue.
which kind of processes you perform on sql server....... is that form of StorProc or DTS or  SSIS.

I found this solution, which looks like it is exactly what I need.

http://msdn.microsoft.com/en-us/library/ms162559(SQL.90).aspx 

The problem I am having is that when I run it I receve the following error:

Error 1 The type 'Microsoft.SqlServer.Management.Sdk.Sfc.ISfcValidate' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. C:\Applications\SQLProcessMonitor\SQLSrverProcessMonitor.cs 35 13 SQLProcessMonitor

I believe the reason is related to the DLL that I used was in

C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies

and not

C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies
 
The DLL is being referenced by another DLL that you are using in your project. Add referencd to the mentioned DLL and see if it helps.
ASKER CERTIFIED SOLUTION
Avatar of CipherIS
CipherIS
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account