Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Kenneth.

Asked: August 31, 2000 - 1:00 am UTC

Last updated: August 31, 2000 - 1:00 am UTC

Version: 8.0.5

Viewed 1000+ times

You Asked

Dear Tom,

While shutting down there are 3 modes
1. shutdown
will wait for all user to exit
no new users allowed to connect
meaning that all trasactions will get commited

2. shutdowm immediate
will not wait for all user to exit. Kill their sessions
no new users allowed to connect
on going trasactions will get rollbacked.

3. shutdown abort
will not wait for all user to exit. Kill their sessions
no new users allowed to connect
on going trasactions will not be rollbacked.

In oracle8 onwards
shutdown transactional is also available
Documentation says
it will wait for all on going transactions to complete.
my query is if these transactions get completed then will they be comitted or rollbacked.
If they get comitted then it is same as a normal shutdown
else if they get rollbacked then it is same as shutdown immediate. ( only that it will not wait for the transaction to complete

So what is the thin line betwen shutdown immediate or shutdown transactional.


Thanks In Advance,
Kenneth


and Tom said...



They will be committed (if the client commits that is, the client can still issue rollback itself).

Shutdown immediate does a clean shutdown after killing (all sessions) and rolling back all in process transactions (things that are modifying the database).

Shutdown transactional allows the in process transactions to finish to completion and prevents all existing sessions from starting any new work. As the in process transactions complete -- they too are prevented from starting new transactions. When no outstanding transactions remain -- the database is shutdown.


The thin line: immediate kills everything right away and rolls them back. Transactional waits for no work to be in progress and then shuts down cleanly.

In my opinion, transactional is close to NORMAL then to immediate....


Is this answer out of date? If it is, please let us know via a Comment