views:

458

answers:

2

If we disable the 'redo logs' of a tablespace in Oracle, will they impact Hibernate's transactions? These are the options present in the Oracle EM on a tablespace level:

Enable logging Yes Generate redo logs for creation of tables, indexes and partitions, and for subsequent inserts. Recoverable No Redo log entries are smaller, the above operations are not logged and not recoverable.

Also, is Oracle's commit/rollback functionality dependent upon these redo logs?

+6  A: 

Redo logs have nothing to do with transactions. They are there for recovering your database in the event of a crash or an OS file corruption. If you don't have redo logging on, then if anything goes wrong with the database your users will lose all their work since the last good back up.

Normally we would only want to disable logging on a tablespace prior to a bulk data load. The first action after that load would be to take a backup and then re-enable logging. Not logging in a transactional system is a very bad idea.

APC
ok, but how do we disable the transaction logging?
Monis Iqbal
Why do you want to disable the transaction logging?
APC
I don't want to, but it's good to know the option. And besides I doubted that they could be disabled separately :)
Monis Iqbal
You're correct, we cannot isolate redo logging at the transaction level. It would make a mockery of the recovery process.
APC
+5  A: 

Hi Monis,

Redo logs are an integrated part of the Oracle RDBMS, you can disable them in only a few special cases:

  • bulk load of data,
  • creating/recreating of indexes

If you disable the generation of redo logs for one of these operations, you will lose the ability to recover your database fully after this point (ie: you should immediately backup your database after those batch jobs are complete).

You can not disable the generation of redo for simple transactions. You wouldn't want to anyway, since they allow the database to recover after a crashed instance (online redo log, even if you are in NOARCHIVELOG) and allow media recovery after a crashed disk for example (archived redo log, only in ARCHIVELOG).

Vincent Malgrat