How to get Notifications in c# if Stored Procedure changes.


We have a big application in C# and SQL Server. The SQL Server team is doing the changes in the Stored Procedures which were not communicating to Application Development team. Perhaps It is causing the application break. Can someone please suggest me the possible ways,

1. How to write a C# programme to be notified of these changes?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
many years ago, I had a situation similar to yours. I developed an application that on a schedule (every night for me), scripts the database objects that have changed. You can surely start from it:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kanti PrasadCommented:

You can set up an auto email sending on the server in question instead of using c#

You need to query the sys.objects for modify_date to see what is modified and create_date to see what are the new SPs added.
----15 is the number of days
EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'SP changes in the last 15 days',
    @recipients = '',
    @query = 'SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 15' ,
    @subject = 'SP changes in the last 15 days',
    @attach_query_result_as_file = 1 ;
Vitor MontalvãoMSSQL Senior EngineerCommented:
How to write a C# programme to be notified of these changes?
This can only be made in the SQL Server side where the objects are stored. Best way to do that is with DDL trigger but you need to talk with the database guys to achieve that.
Good luck.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.