What are the shutdown process in oracle Database

 The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.


Summary: in this tutorial, you will learn how to shut down the Oracle database and various methods.


Shutdown Stages:

  1. Shutdown normal or shutdown
  2. Shut immediate or Shutdown immediate
  3. shut transactional or Shutdown Transactional
  4. Shut Abort or Shutdown abort 

  • Shutdown Normal or Shutdown
  • This Command won't allow the new connections 
  • It waits for all users Logged off 
  • The databases file are closed properly and the instance is shutdown
SQL> shutdown normal;
Database closed.
Database dismounted.
ORACLE instance shut down.

  • Shut immediate or Shutdown immediate
  • This Command won't allow the new connections 
  • It rolled back the uncommitted transactions 
  • its disconnect all the current user and won't wait for users to log off.
SQL> Shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

  • Shut Transactional or Shutdown Transactional
  • This Command also won't allow the new connections 
  • it's waiting for the user are allowed to complete which is either commit or terminate before shutdown.
SQL> Shut Transactional;
Database closed.
Database dismounted.
ORACLE instance shut down.

  • Shut Abort or Shutdown abort 
  • All current client SQL statements are immediately terminated 
  • uncommitted transactions are not rolled back
  • All users are disconnected immediately
  • it's like a power-off and is very harmful to the database, Don't use this command without senior dba knowledge. 

        SQL> Shut Abort;

ORACLE instance shut down.


                                         


                                                        Thanks for your time!


0 Comments

DELETE Statement in ORACLE DB— Step by Step Internal Flow with classroom example.

Imagine your Oracle database like a school, and you’re Teacher decides to remove a student (row) from the classroom(table). Let’s see how the journey works step by step: 1)Classroom = Oracle Table 2)Students = Rows (Records) 3)Class Teacher = Oracle Server Process 4)Attendance Register = Data Dictionary User fires DELETE statement: DELETE FROM students WHERE grade = 'D'; Internal Processing Steps: Client Process Sends DELETE Statement to Server Process The teacher receives a request to remove a student from the classroom. Syntax Check (Parsing) The teacher checks if the request is grammatically correct — proper command, keywords, and a semicolon. Semantic Check Teacher verifies if the classroom exists and whether the condition (like grade = 'D') makes sense. Object Resolution Teacher confirms that the ‘students’ classroom (table) exists in the school records (data dictionary). Optimization Decides the fastest way to find those students — by roll number, grade, or al...