Oracle database transaction restart

338 views Asked by At

So let's suppose that the system has pending transactions and finished ones. How does the system know during restart which transaction must restart or resume ?

1

There are 1 answers

0
Special Sauce On

Some Oracle database shutdown modes wait for certain events to occur (such as transactions completing or users disconnecting) before actually bringing down the database. There is a one-hour timeout period for these events. You can see details on the four different shutdown modes (NORMAL, IMMEDIATE, TRANSACTIONAL, ABORT) here: http://docs.oracle.com/cd/B19306_01/server.102/b14231/start.htm#i1006543

Ultimately every transaction either ends in a commit or a roll-back. So if, for example, the server powered down unexpectedly, the database manager process (or service) would handle any uncompleted transactions when the server is restarted (generally by performing a roll-back on them). The details of intermediate progress made on transactions currently in process is stored in database log files (which can generally survive a sudden shutdown). Without these database logs, the database manager would not be able to perform a proper roll-back.