Startup and Shutdown the Database

Startup

startup the database across the three different stage. There are Several Startup and Shut down option available. They are Used in Different Scenario’s

Startup the database step by step

  • instance started
  • BG process started
  • SGA allocated
  • Opening trace files and alert log files
  • Reads parameter file

Startup-step 1

SQL> startup nomount

Startup-step 1

Database Mount

Control file read its help to open the database To Mount stage

Startup-step 2

SQL> alter database mount

Startup-step 2

database open

Control file
data file and SCN
log file and LSN
other details
read the other file
Database opened.

Startup-step 2

SQL> alter database open

Startup-step 2

startup option

Startup option Description
Startup pfile Startup instance using parameterfile.
startup Startup stepby step all stage.
startup nomount Startup instance
startup force Shutabort and startup database normally
startup restrict Startup database andnever allow to connect any one.
startup open recover Startup thedatabase for recover processes
startup upgrade Startup the database for upgradataion(11g to 12c).

Shutdown the database step by step

The Database Close

Now database read/write stage.
Its wait until all user log out.
It close the database,
Then it goes to Mount stage

Startup-step 2

SQL> alter database close;

Startup-step 2

The Database Dismount

Now database is mount stage
Further we can dismount this

Startup-step 2

SQL> alter database dismount;

Startup-step 2

It goes to nomount stage

The Database Nomount

Now Database nomount stage
We can issue shut command

Startup-step 2

SQL> shut normal;

Startup-step 2

shutdown

Database shutdown also have different stage

Shut option Description
shut normal Allowthe database stop normally and wait for users to disconnect.
Shut transactional Allowthe database stop and all transaction safe
shut immediate Allow the database synchronizeand closed
shut abort Neverwait for any thing, directly terminated the database instance.

Database shutdown also have different stage

Option Shut Normal Shut transactional shut immediate shut abort
Check point Yes Yes Yes No
New User Connect Yes No No No
Transaction Yes Yes No No
Current Session Yes No No No
Consistency Yes Yes Yes No