oracle11gr2 - Explicit table locking to disable DELETES? -


using oracle 11gr2:

we have process cleans particular tables deleting records them past specified retention date (based on comparison between timestamp when record finished processing , retention date). writing code alert team if process fails. way can see process possibly failing if deletes disabled on particular table trying clean up.

i want test alerts make sure work , correct having process fail. if temporarily exclusively lock table, disable deletes , cause procedure deletes records fail? or disable ddl operations? there better way this?

assuming "fail" means "throw error" rather than, say, exceeding performance bound, locking table won't accomplish want. if locked every row via select update in 1 session, delete job block forever waiting first session release lock. wouldn't throw error , wouldn't cause process fail definitions. if monitoring includes alerts jobs running longer expected, however, work well.

if monitoring process looks see if process ran , encountered error, easiest option put trigger on table throws error when there delete. create child table foreign key constraint generate error if delete tried delete parent row while child row exists. depending on how delete process implemented, engineer second process produce ora-00060 deadlock process monitoring harder implement trigger or child table.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

apache - setting document root in antoher partition on ubuntu -