Unanswered: Best practice for Live Database Maintenance
I am working on a project in Oracle 10g/Java-JSP combination. Very frequently we need to execute DML statements directly from SQL prompt as the system is quite buggy and we have to update/delete data in order to run the system. Although we are trying to streamline the application but it will take some time. Meanwhile I need to control direct data updation acitivity as much as possible.
Is there any best practice guide available in the net ?
Or else can any experienced folk guide me in this regard ?
This is exactly what is done in application code(most of DMLs are placed in procedures). But in some cases we have to pass direct DML statement from SQL to rectify some data problem. I want to implement a best practice to be followed at the time of this ad-hoc DML statement execution.
That's a difficult call to make --- but I would ensure that only a few people are responsible for the ad-hoc work so the env is controlled a bit --
You could consider using the flashback query functionality for the keytables that you delete/update from -- In this way , you can snap back in-time for faulty/mistaken delete/updates and rectify without having to restore your database from a backup (hot/cold/exp)
select * from client where clue > 0;
0 rows returned