Monday , September 25 2017
Home / Oracle DBA / Database Startup and Shutdown

Database Startup and Shutdown

1)STARTUP NO MOUNT:
In the NO MOUNT level, only the Oracle INSTANCE is started. To do so Oracle looks for the Instance parameter file and starts all Processes and Memory Structures.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 732352512 bytes
Fixed Size 1339036 bytes
Variable Size 440402276 bytes
Database Buffers 285212672 bytes
Redo Buffers 5398528 bytes

—-Checking running processes:

oracle@vmoratest1:/home/oracle/ [TEST] ps -ef |grep TEST
oracle 3999 1 0 09:12 ? 00:00:00 ora_pmon_TEST
oracle 4023 1 0 09:12 ? 00:00:00 ora_smon_TEST
oracle 4025 1 0 09:12 ? 00:00:00 ora_reco_TEST
oracle 4027 1 0 09:12 ? 00:00:00 ora_mmon_TEST
oracle 4029 1 0 09:12 ? 00:00:00 ora_mmnl_TEST

2)STARTUP MOUNT:
Once taking the database server from NO MOUNT to MOUNT, Oracle access the control files, as declared in the parameter file, and mount the database.

SQL> alter database mount;
Database altered.

—– Check the new status

SQL> select INSTANCE_NAME,HOST_NAME,STATUS from v$instance;

INSTANCE_NAME                 HOST_NAME               STATUS
—————– ———————————   ————
TEST                 institute_of_dba_learning.com     MOUNTED

3)OPEN:
The last step is to open the database, which means accessing the data files and redo logs. Once the database is OPEN, all users can log on again and go ahead with their normal activities.

SQL> alter database open;
Database altered.

SQL> select status,open_mode from v$instance,v$database;
STATUS            OPEN_MODE
————– ——————–
OPEN               READ WRITE

4)STARTUP RESTRICT:
For some maintenance or administration activities, it may be necessary to open the database but to avoid any user to access it. The best solution is then to open the database in RESTRICT mode. This means that only SYSDBA users will be allowed to log in.

SQL>startup restrict;

5)STARTUP FORCE:
If an instance is running, STARTUP FORCE shuts it down with mode ABORT before restarting it.

SQL>startup force;

  • SHUTDOWN PROCESS DESCRIPTION

Basically in a “clean” shutdown process (Normal, Transactionnal or Immediate), the process will be the reverse of startup. During an orderly shutdown, the database is first be closed, then dismounted, and finally the instance is stopped.

  1. shutdown normal (default mode with shutdown command) =>shutdown
  2. shutdown transactional =>shutdown transactional
  3. shutdown immediate =>shutdown immediate
  4. shutdown abort =>shutdown abort

6)SHUTDOWN NORMAL:
This is the default. No new user connections will be allowed, but all current connections continue normaly. Once all users have logged off, the database will finally be allowed to shutdown.

SQL>shutdown;

7)SHUTDOWN TRANSACTIONAL:
No new user connections are permitted and existing sessions that are not involved in active transactions will be terminated. However sessions currently involved in a transaction are allowed to complete the transaction and will then be terminated. Once all sessions are terminated, the database will shutdown.

SQL> shutdown TRANSACTIONAL;

8)SHUTDOWN IMMEDIATE:
No new sessions are permitted, all currently connected sessions are terminated an any active transactions are rolled back. Then the database will go down.

SQL> shutdown IMMEDIATE;

 9)SHUTDOWN ABORT:
As far as Oracle is concerned, this is the equivalent of a power failure. The instance terminates immediately (instance “crash”). Nothing is written to disk, no file handles are closed and there is no transactions are terminated, even not in a orderly way. A shutdown abort will not damage the database, but some operations like backups are not advisable after an abort.

SQL> SHUTDOWN ABORT;

Read More:
ASM DISK Creations
Disk Group Administration
RAC Administration

Comments

comments

Check Also

How to switch on primary database to physical standby database

After configuration data guard then data is switching  into primary database  to standby database : …

Leave a Reply

Your email address will not be published. Required fields are marked *