What's the most auditable way to organize database maintenance scripting/scheduling?
Posted
by RenderIn
on Stack Overflow
See other posts from Stack Overflow
or by RenderIn
Published on 2010-06-02T14:01:32Z
Indexed on
2010/06/02
14:03 UTC
Read the original article
Hit count: 166
I'm using PHP, Oracle and crontab. Crontab is invoking a php script, which is going to synchronize some data between a local and remote database.
First I thought about putting this all in one large, anonymous inline PL/SQL block and executing it in PHP. The problem is that without creating a table to audit the procedure it's really opaque to my PHP code until it returns. And then when it does return, the best I can do is receive a string in an out parameter which I've concatenated together as an audit log.
Then I considered breaking it up into several SQL statements and have PHP do some intermediate auditing/logging and manipulation of the data between each of them.
I'm not really satisfied with either of these. How do you organize maintenance code that is called in a cronjob?
© Stack Overflow or respective owner