How to track changes in many MSSQL databases from .NET application?
- by Yauheni Sivukha
Problem:
There are a lot of different databases, which is populated by many different applications directly (without any common application layer). Data can be accessed only through SP (by policy)
Task:
Application needs to track changes in these databases and react in minimal time.
Possible solutions:
1) Create trigger for each table in each database, which will populate one table with events. Application will watch this table through SqlDependency.
2) Watch each table in each database through SqlDependency.
3) Create trigger for each table in each database, which will notify application using managed extension.
Which is the best way?