SlideShare a Scribd company logo
Oracle shutdown
By Burleson Consulting

During a normal shutdown, it's my understanding that Oracle will close all sessions (see modes
below), close the database, un-mount the data files and then shut down the instance in two steps,
first issuing a "free" the SGA RAM heap and finally, terminating the background processes.
Oracle has three shutdown modes:
·

Normal (default) - waits for in-flight work to complete. This could take houes.

·

Immediate - terminates all sessions and does a rollback on all
uncommitted transactions.

·

Abort - aborts all sessions, leaving current DML in need of rollback, de-allocates the
SGA and terminates the background processes. Note that a shutdown abort is NOT evil
or dangerous. The "abort" simply means that Oracle will terminate all active work,
which is what most people want during a shutdown!

The "normal" and "immediate" modes can take a long time in you have in-flight transactions,
and many Oracle DBA's ensure a swift clean shutdown this way, aborting the sessions, restarting to allow warmstart rollback of the aborted transactions, and a shutdown immediate to
close cleanly:
SQL> shutdown abort
SQL> startup
SQL> shutdown immediate

Normal Shutdown
A normal shutdown of an Oracle database is actually rarely used. This is because the normal
shutdown waits for everyone to complete their work and then logoff in an orderly fashion. When
a normal shutdown occurs, the database is closed in a normal manner, and all changes made in
the database are flushed to the database datafiles . This is known as a “clean shutdown.”
Most of the time this is not practical… there always seems to be someone who has left for
vacation and who forgot to log out, or there are times that Oracle processes become “zombied”
(this is where Oracle thinks someone is connected to the database but they really are not). In
these cases, the database will never come down.
It will simply wait forever until you manually kill those sessions. Because of this, we often
recommend the shutdown immediate or shutdown abort commands, which we will discuss in the
next sections. Here is an example of the use of the normal shutdown command.
SQL> shutdown
When you execute a shutdown , Oracle will flush all the changes in memory out to the database
datafiles . This makes database startup quicker because the database is in a consistent state.
Think of it this way: if you jump into the air and land on your feet, you have landed in a way that
prepares you to make another jump. If, instead, you jump and land on your back, you are in no
position to make another jump; instead, you must perform a recovery by taking the actions
required to stand again. A clean shutdown is one that is prepared to come back up without
delay. A dirty shutdown is one that lands on its back; it can not come back up without first
recovering itself.

Shutdown Immediate
Perhaps the best way to initially shutdown the database is the shutdown immediate command.
This command will prevent any new logins, then rollback any uncommitted transactions, and
then bring down the database. In the process of bringing down the database, Oracle will flush all
the changes in memory out to the database datafiles too, just like a regular shutdown does. This
makes database startup quicker. Here is an example of shutting down a database with the
shutdown immediate command:
SQL> shutdown immediate
The shutdown immediate command will work most of the time, but there are times when it can
hang and fail to shutdown the database. In these cases, the shutdown abort command is called
for.

Shutdown Abort
The shutdown abort command is pretty much a guaranteed way to get your database to
shutdown. It’s a “hard crash” of the database, and this can result in a longer time to start the
database back up. Still, you can’t really hurt the database using the shutdown abort command,
and during your DBA years you will find more than a few occasions to use the shutdown abort
command.
A shutdown abort can be your first shutdown method of choice, since there may be times when
you must force the database down. Here is an example using the shutdown abort command:
SQL> shutdown abort

More Related Content

PDF
Startupandshutdown
PDF
Oracle 12cR2 Installation On Oracle Linux 7
PDF
Rhel asmlib to_udev
PDF
Presentation joelperez thailand2014
PDF
How to Install and Configure Cacti on Linux
PPT
Store programs
DOCX
Rman offline backup
PDF
Dba in 2 days unit no 9
Startupandshutdown
Oracle 12cR2 Installation On Oracle Linux 7
Rhel asmlib to_udev
Presentation joelperez thailand2014
How to Install and Configure Cacti on Linux
Store programs
Rman offline backup
Dba in 2 days unit no 9

Viewers also liked (7)

PDF
Dbms objective and subjective notes
PPT
PPT
PPT
1 plsql introduction1
PPT
PPT
5 backuprecoveryw imp
PPT
Tunning overview
Dbms objective and subjective notes
1 plsql introduction1
5 backuprecoveryw imp
Tunning overview
Ad

Similar to Oracle shutdown (20)

PPT
Less04 instance
PPT
Less04 Instance
PPT
Overview of Primary Components of the Oracle
PPT
Less04_Database_Instance.ppt
PDF
Oracle Database performance tuning using oratop
PPTX
Database_Instance Oracle database administration
PDF
Database decommission process
PDF
02 Oracle _Instance_Architecture_2.pdf
PDF
Performance Tuning Using oratop
PPTX
Oracle Database 19c New Features for DBAs and Developers.pptx
PPT
Toc d17090 gc30
PDF
Oracle database 12c 2 day + security guide
PDF
Database architectureby howard
PPTX
OpenWorld 2018 - 20 years of hints and tips
PPT
Database systems administration week 1
PPTX
Bilbao oracle12c keynote
PPTX
Some Oracle AWR observations
PDF
les04.pdf
PDF
Oracle Essentials Oracle Database 12c Fifth Edition Rick Greenwald download pdf
PDF
Oracle Essentials Oracle Database 12c Fifth Edition Rick Greenwald 2024 scrib...
Less04 instance
Less04 Instance
Overview of Primary Components of the Oracle
Less04_Database_Instance.ppt
Oracle Database performance tuning using oratop
Database_Instance Oracle database administration
Database decommission process
02 Oracle _Instance_Architecture_2.pdf
Performance Tuning Using oratop
Oracle Database 19c New Features for DBAs and Developers.pptx
Toc d17090 gc30
Oracle database 12c 2 day + security guide
Database architectureby howard
OpenWorld 2018 - 20 years of hints and tips
Database systems administration week 1
Bilbao oracle12c keynote
Some Oracle AWR observations
les04.pdf
Oracle Essentials Oracle Database 12c Fifth Edition Rick Greenwald download pdf
Oracle Essentials Oracle Database 12c Fifth Edition Rick Greenwald 2024 scrib...
Ad

More from Hitesh Kumar Markam (9)

PPTX
Concepts of Distributed Computing & Cloud Computing
PPTX
Log miner in oracle.ppt
PPT
Oracle archi ppt
PPT
Lecture2 oracle ppt
PDF
Dba in 2 days
PPT
Creating database
DOCX
javascript code for mysql database connection
PPTX
Advanced Planning And Optimization
Concepts of Distributed Computing & Cloud Computing
Log miner in oracle.ppt
Oracle archi ppt
Lecture2 oracle ppt
Dba in 2 days
Creating database
javascript code for mysql database connection
Advanced Planning And Optimization

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
RMMM.pdf make it easy to upload and study
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharma ospi slides which help in ospi learning
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Computing-Curriculum for Schools in Ghana
PDF
01-Introduction-to-Information-Management.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Complications of Minimal Access Surgery at WLH
Microbial disease of the cardiovascular and lymphatic systems
RMMM.pdf make it easy to upload and study
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPH.pptx obstetrics and gynecology in nursing
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Microbial diseases, their pathogenesis and prophylaxis
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Basic Mud Logging Guide for educational purpose
Pharma ospi slides which help in ospi learning
GDM (1) (1).pptx small presentation for students
Computing-Curriculum for Schools in Ghana
01-Introduction-to-Information-Management.pdf
Anesthesia in Laparoscopic Surgery in India
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Complications of Minimal Access Surgery at WLH

Oracle shutdown

  • 1. Oracle shutdown By Burleson Consulting During a normal shutdown, it's my understanding that Oracle will close all sessions (see modes below), close the database, un-mount the data files and then shut down the instance in two steps, first issuing a "free" the SGA RAM heap and finally, terminating the background processes. Oracle has three shutdown modes: · Normal (default) - waits for in-flight work to complete. This could take houes. · Immediate - terminates all sessions and does a rollback on all uncommitted transactions. · Abort - aborts all sessions, leaving current DML in need of rollback, de-allocates the SGA and terminates the background processes. Note that a shutdown abort is NOT evil or dangerous. The "abort" simply means that Oracle will terminate all active work, which is what most people want during a shutdown! The "normal" and "immediate" modes can take a long time in you have in-flight transactions, and many Oracle DBA's ensure a swift clean shutdown this way, aborting the sessions, restarting to allow warmstart rollback of the aborted transactions, and a shutdown immediate to close cleanly: SQL> shutdown abort SQL> startup SQL> shutdown immediate Normal Shutdown A normal shutdown of an Oracle database is actually rarely used. This is because the normal shutdown waits for everyone to complete their work and then logoff in an orderly fashion. When a normal shutdown occurs, the database is closed in a normal manner, and all changes made in the database are flushed to the database datafiles . This is known as a “clean shutdown.” Most of the time this is not practical… there always seems to be someone who has left for vacation and who forgot to log out, or there are times that Oracle processes become “zombied” (this is where Oracle thinks someone is connected to the database but they really are not). In these cases, the database will never come down.
  • 2. It will simply wait forever until you manually kill those sessions. Because of this, we often recommend the shutdown immediate or shutdown abort commands, which we will discuss in the next sections. Here is an example of the use of the normal shutdown command. SQL> shutdown When you execute a shutdown , Oracle will flush all the changes in memory out to the database datafiles . This makes database startup quicker because the database is in a consistent state. Think of it this way: if you jump into the air and land on your feet, you have landed in a way that prepares you to make another jump. If, instead, you jump and land on your back, you are in no position to make another jump; instead, you must perform a recovery by taking the actions required to stand again. A clean shutdown is one that is prepared to come back up without delay. A dirty shutdown is one that lands on its back; it can not come back up without first recovering itself. Shutdown Immediate Perhaps the best way to initially shutdown the database is the shutdown immediate command. This command will prevent any new logins, then rollback any uncommitted transactions, and then bring down the database. In the process of bringing down the database, Oracle will flush all the changes in memory out to the database datafiles too, just like a regular shutdown does. This makes database startup quicker. Here is an example of shutting down a database with the shutdown immediate command: SQL> shutdown immediate The shutdown immediate command will work most of the time, but there are times when it can hang and fail to shutdown the database. In these cases, the shutdown abort command is called for. Shutdown Abort The shutdown abort command is pretty much a guaranteed way to get your database to shutdown. It’s a “hard crash” of the database, and this can result in a longer time to start the database back up. Still, you can’t really hurt the database using the shutdown abort command, and during your DBA years you will find more than a few occasions to use the shutdown abort command. A shutdown abort can be your first shutdown method of choice, since there may be times when you must force the database down. Here is an example using the shutdown abort command: SQL> shutdown abort