July 24th, 2012, 12:50 AM
Is it possible to track the changes happen on Database ?
I'm looking for the concept to track the changes or modification taken place on Database after execution of a executable(*.EXE) file..
Is there any specific technique available in delphi ?
Thanks in advance.....
July 24th, 2012, 11:58 AM
It really depends on how your application is structured and how your connecting to your database, but there's more to the story than can be gleaned from your application.
If your application is running as a server and all updates/deletes/inserts from client machines are passed through your server, then you can capture those changes in one place. If your application accesses the database from each individual user that is running the app, then you can capture it at the app level, but you'd have to consolidate each and every user's logs to see the full changes. You can look at this component: ZEOS; as a means to connect to your database, they have a component called TSQLMonitor. Connect it to the ZConnection component and tell it the name of the log file, and it will log all database activity for you automatically.
However, that being said, that does not really completely solve the problem. The database itself can have triggers defined that make further changes to your database that can never be tracked from your application.
July 24th, 2012, 01:51 PM
Except in a one user local embedded database or, as mentioned, possibly a single middleware server gatekeeper,
the only sure way of capturing all changes to a SQL database is through after insert,update and delete triggers.
Some databases (e.g. Oracle) do offer built in "time machine" features also.
July 25th, 2012, 12:32 AM
Thanks for the suggestions....
Originally Posted by clivew