- Shutdown (Normal)
- shutdown Immediate
- Shutdown Abort
As to which will be used among these three will depend upon your situation.
1. Shutdown (Normal)
This is used when you shutdown your database on normal condition. This might take long as this shutdown method will wait for all active users to disconnect their sessions before the oracle instance is shut down.
SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
2. Shutdown Immediate
With this shutdown method, all active users will be disconnected and oracle will rollback all active transaction. This method is used when database is already needed to be shut down immediately and cannot wait for active users to disconnect their session.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
3. Shutdown Abort
This shutdown method should only be used on emergency cases. This method will immediately disconnect users and end all transactions without rollback. Shutdown abort will then shut down Oracle instance. You may use this option when normal shutdown is not an option and shutdown immediate is not working.
SQL> shutdown abort
ORACLE instance shut down.
SQL>
To summarize, you may use these three methods on the following situations:
Shutdown (normal) - when you have ample time to wait for all the users to disconnect their sessions and for all transactions to be committed.
Shutdown Immediate - when you need to have the instance shut down but cannot wait for all the users to disconnect.
Shutdown Abort - used for emergency cases when the other two options are not working.
No comments:
Post a Comment