This is certainly possible either you call xp_cmdshell, which allows you to invoke an external program, or use sp_oacreate and sp_oamethod, which allow you to manipulate COM objects this is the case with MsSQL Server, in oracle we can use LoadJava with functions but i think there is some limitations with MySQL, i don't know if somebody know this pls let me know.
Some where it was mentioned that it is not a better idea or recommended to call trigger. A trigger holds open atransaction in your database. Any delay in releasing that transaction or any failure to release it can cause blocking of other processes. Also, if your external program accesses the database in any way then there is the
possibility of causing an undetectable deadlock.
It is better to poll the database to see if that change has happened and then invoke your code as required. That way transaction performance is unaffected.
i will suggest create a temp table, a trigger on the master table to dump the changes to the temp table and now poll temp table from any external java program or anything, so this way performance on the existing transaction/master table is not going to impact.
Some where it was mentioned that it is not a better idea or recommended to call trigger. A trigger holds open atransaction in your database. Any delay in releasing that transaction or any failure to release it can cause blocking of other processes. Also, if your external program accesses the database in any way then there is the
possibility of causing an undetectable deadlock.
It is better to poll the database to see if that change has happened and then invoke your code as required. That way transaction performance is unaffected.
i will suggest create a temp table, a trigger on the master table to dump the changes to the temp table and now poll temp table from any external java program or anything, so this way performance on the existing transaction/master table is not going to impact.
No comments:
Post a Comment