Sunday, 12 January 2025

Oracle 19C RAC Shutdown sequence step by step

 Dear All,

In this post i am going to show you how to shut down oracle 19C rac step by step.

>> by using ./crsctl stop crs   command we can stop the cluster and database services.

Step1 :: check the status of the cluster local and Cluster resources using below command .





below is the log in text format :

================================

[root@racslab1 bin]# ./crsctl stat res -t

--------------------------------------------------------------------------------

Name           Target  State        Server                   State details

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.LISTENER.lsnr

               ONLINE  OFFLINE      racslab1                 STABLE

ora.LISTENER_RACSDB.lsnr

               ONLINE  OFFLINE      racslab1                 STABLE

ora.chad

               ONLINE  ONLINE       racslab1                 STABLE

ora.net1.network

               ONLINE  ONLINE       racslab1                 STABLE

ora.ons

               ONLINE  ONLINE       racslab1                 STABLE

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.ARCH.dg(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 STABLE

      2        OFFLINE OFFLINE                               STABLE

      3        OFFLINE OFFLINE                               STABLE

ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 STABLE

      2        ONLINE  OFFLINE                               STABLE

      3        ONLINE  OFFLINE                               STABLE

ora.DATA.dg(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 STABLE

      2        OFFLINE OFFLINE                               STABLE

      3        OFFLINE OFFLINE                               STABLE

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.LISTENER_SCAN2.lsnr

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.LISTENER_SCAN3.lsnr

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.OCR.dg(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 STABLE

      2        OFFLINE OFFLINE                               STABLE

      3        OFFLINE OFFLINE                               STABLE

ora.asm(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 Started,STABLE

      2        ONLINE  OFFLINE                               STABLE

      3        OFFLINE OFFLINE                               STABLE

ora.asmnet1.asmnetwork(ora.asmgroup)

      1        ONLINE  ONLINE       racslab1                 STABLE

      2        ONLINE  OFFLINE                               STABLE

      3        OFFLINE OFFLINE                               STABLE

ora.cvu

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.qosmserver

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.racsdb.db

      1        ONLINE  ONLINE       racslab1                 Open,HOME=/u01/app/o

                                                             racle/product/19.0.0

                                                             /dbhome_1,STABLE

      2        ONLINE  OFFLINE                               STABLE

ora.racslab1.vip

      1        ONLINE  OFFLINE                               STABLE

ora.racslab2.vip

      1        ONLINE  OFFLINE                               STABLE

ora.scan1.vip

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.scan2.vip

      1        ONLINE  ONLINE       racslab1                 STABLE

ora.scan3.vip

      1        ONLINE  ONLINE       racslab1                 STABLE

--------------------------------------------------------------------------------

[root@racslab1 bin]# 


step 2 : stop the cluster and database services using below command 



Uploading: 101425 of 101425 bytes uploaded.





Below is the log for cluster stop details :
================================
[root@racslab1 bin]# ./crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'racslab1'
CRS-2673: Attempting to stop 'ora.crsd' on 'racslab1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'racslab1'
CRS-2673: Attempting to stop 'ora.chad' on 'racslab1'
CRS-2673: Attempting to stop 'ora.racsdb.racsdbs.svc' on 'racslab1'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'racslab1'
CRS-2677: Stop of 'ora.racsdb.racsdbs.svc' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.racsdb.db' on 'racslab1'
CRS-2677: Stop of 'ora.racsdb.db' on 'racslab1' succeeded
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'racslab1'
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'racslab1'
CRS-2673: Attempting to stop 'ora.ARCH.dg' on 'racslab1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'racslab1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'racslab1'
CRS-2673: Attempting to stop 'ora.LISTENER_RACSDB.lsnr' on 'racslab1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'racslab1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'racslab1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'racslab1'
CRS-2673: Attempting to stop 'ora.cvu' on 'racslab1'
CRS-2677: Stop of 'ora.ARCH.dg' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.OCR.dg' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'racslab1'
CRS-2677: Stop of 'ora.qosmserver' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.cvu' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.LISTENER_RACSDB.lsnr' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.racslab1.vip' on 'racslab1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'racslab1'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'racslab1'
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'racslab1'
CRS-2677: Stop of 'ora.scan1.vip' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.racslab1.vip' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.scan2.vip' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.scan3.vip' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.asm' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'racslab1'
CRS-2677: Stop of 'ora.chad' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'racslab1'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'racslab1' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'racslab1' succeeded.
CRS-2673: Attempting to stop 'ora.ons' on 'racslab1'
CRS-2677: Stop of 'ora.ons' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'racslab1'
CRS-2677: Stop of 'ora.net1.network' on 'racslab1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'racslab1' has completed
CRS-2677: Stop of 'ora.crsd' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'racslab1'
CRS-2673: Attempting to stop 'ora.crf' on 'racslab1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'racslab1'
CRS-2677: Stop of 'ora.crf' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.storage' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'racslab1'
CRS-2677: Stop of 'ora.mdnsd' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.asm' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'racslab1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'racslab1'
CRS-2673: Attempting to stop 'ora.evmd' on 'racslab1'
CRS-2677: Stop of 'ora.ctssd' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'racslab1'
CRS-2677: Stop of 'ora.cssd' on 'racslab1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'racslab1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'racslab1'
CRS-2677: Stop of 'ora.gipcd' on 'racslab1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'racslab1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'racslab1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@racslab1 bin]#

step 3 : check the status of the cluster 



Its not running , we need to start the services using crsctl start crs , check my preview post for start up the oracle 19c rac services .. 

https://anjaniappsdba.blogspot.com/2025/01/


Thanks,
Srini

Oracle 19C RAC Startup sequence step by step process

 Dear All,


In this post i have explained the step-by-step oracle 19C RAC startup sequence.

The startup sequence in Oracle 19c RAC is complex due to the multi-instance, multi-node nature of RAC.

 

1.  Start Oracle Grid Infrastructure (Clusterware) – crsctl

2.  Start Oracle ASM (Automatic Storage Management)  - srvctl / as part of cluster start

3.  Start Oracle RAC Database Instances using srvctl

4.  Start Oracle Net Listener

5.  Start Oracle Services (optional)

6.  Start ASM (if not already done)

This process ensures that all instances across nodes are properly synchronized, ensuring high availability and data consistency in a shared-disk environment like Oracle RAC. Proper startup ensures that all Oracle processes, database services, and storage are correctly initialized, providing a stable environment for your applications and database users.

 

Oracle 19c RAC Startup Sequence: Detailed Explanation

In Oracle 19c Real Application Clusters (RAC), the startup sequence refers to the steps Oracle follows to bring the database and its associated services into an operational state. The startup process is different in a RAC environment compared to a single-instance Oracle database because it involves starting and coordinating multiple instances across several nodes, ensuring they can work together in a shared-disk environment.

The startup sequence in Oracle RAC is divided into the following stages:


1. Starting Oracle Grid Infrastructure (CRS) and Cluster ware

Before any Oracle RAC database instance starts, Oracle Cluster ware (Grid Infrastructure) must be started on all nodes in the cluster.

1: Start the Cluster ware Stack (CRS) 

Oracle Cluster ware manages the nodes in the cluster and ensures they function as a single logical unit. This includes monitoring the health of all instances, providing failover mechanisms, and managing resources like voting disks and OCR (Oracle Cluster Registry).

> Cluster ware services (CRS) must be running on each node to manage the cluster's health.

Commands:

$ crsctl start crs        # Start Oracle Clusterware (CRS) on all nodes

When you issue this command, the following services are started:

Clusterware Daemons: These include crsd, evmd, and cssd.

crsd (Cluster Ready Services Daemon): Manages Oracle Clusterware resources.

evmd (Event Manager Daemon): Collects and processes events in the cluster

cssd (Cluster Synchronization Services Daemon): Manages cluster membership and coordinates node status and interconnect activity.




Start Oracle Clusterware (Oracle ASM) 

>     If you're using Oracle ASM (Automatic Storage Management) for your RAC database, it must also be started as part of the Clusterware stack.

ASM is responsible for managing the storage for Oracle databases in a RAC environment. ASM organizes data into disk groups and provides striping and mirroring for high availability.

Commands:

$ crsctl start asm



This command starts the ASM instance, and it will mount the ASM disk groups that contain the Oracle database files, including voting disks and OCR (Oracle Cluster Registry).


 Starting Oracle RAC Database Instances

Once Clusterware is up and running, the next step is to start the Oracle RAC database instances. This step starts each instance of the RAC database on each node in the cluster.

>> Start the Database Instances Using srvctl

To start a database in Oracle RAC, you typically use the srvctl command. This command ensures that all instances of the RAC database are properly started, ensuring correct inter-node communication and Cache Fusion functionality.

srvctl automatically starts all required Oracle background processes, including LGWR (Log Writer), DBWn (Database Writer), and PMON (Process Monitor), and ensures proper interconnect activity between nodes.

Commands:

$ srvctl start database -d <dbname>

ex: <dbname> is the name of the RAC database that you want to start.

$srvctl start database -d racsdb

2. Oracle Instance Startup Sequence

Once the srvctl command is issued, Oracle begins the following instance startup sequence for each node in the cluster:

Process Initialization:

        > The instance processes like SMON, PMON, and others are started. These processes ensure the instance runs in a healthy state.

Instance Registration with the Listener:

> Each instance registers itself with the Oracle Net Listener for client connections. It ensures that the listener knows which instance is available to service requests for that particular instance.

Shared Memory Allocation

       >SGA (System Global Area) and PGA (Program Global Area) are allocated for each instance ,  SGA is a shared memory region that contains data and control information for the database. 

     > PGA is a private memory region used by Oracle background processes and user sessions.

Global Enqueue Initialization:

Oracle RAC uses a shared global cache to manage locks and latches on data blocks across all nodes. The instances communicate and synchronize via Global Enqueue Services (GES) and Global Cache Services (GCS)

The Global Cache layer ensures consistency of data across RAC nodes.

Database Opening:  After the instance processes and memory structures are initialized, the Database itself is opened. Oracle opens the database in READ ONLY mode to ensure that it can be accessed by all instances of the RAC database, and parallel execution is available across nodes. 

  >The redo log files are opened to allow transaction processing.

Cache Fusion Initialization

Cache Fusion ensures that data blocks are shared across instances. Oracle will initiate Global Cache Synchronization to synchronize the shared memory structures and data blocks between instances.

This is key in Oracle RAC to ensure all nodes are consistent with the data they share.

Database Processes StartDatabase processes, such as LGWR (Log Writer), DBWn (Database Writer), SMON (System Monitor), and PMON (Process Monitor), are started. These processes are responsible for maintaining the health of the database and managing transactional and background operations.

 Verify Database Instance Startup

You can verify the status of your RAC database instances and ensure that they are up and running with the following command:

$ srvctl status database -d <dbname>



The output will indicate which instances are running and their status across all RAC nodes.


3. Starting Oracle Net Listener

The Oracle Net Listener is a process that listens for incoming client connection requests and directs those requests to the appropriate database instance in the cluster.

Start Oracle Listener

Use the srvctl utility to start the listener for Oracle RAC:

Commands:

$ srvctl start listener -l <listener name>

This command starts the listener for your Oracle RAC database, allowing client connections to be established.

 


4. Start Oracle Services -- Optional

Oracle services allow you to manage the load balancing and high availability of the database in a RAC environment. For example, Oracle can use Service Names to direct clients to the appropriate instance based on load or availability.

 Start Oracle Services Using srvctl

$ srvctl start service -d <dbname> -s <service_name>


This command starts the specified service on the available instances. In a RAC setup, Oracle can configure services to run on specific nodes or across all nodes in the cluster.

Verify Service Status

To check the status of the services, you can use the following command:

$ srvctl status service -d <dbname> -s <service_name>

 




5. Starting Oracle Automatic Storage Management (ASM)

ASM (Automatic Storage Management) is responsible for managing database storage in RAC environments. It needs to be started to manage disk groups and handle file operations.

Step 1: Start ASM Using srvctl

You can start ASM using the srvctl command as follows:

$ srvctl start/status/stop asm

 


6. Database and Instance Synchronization in RAC

Once all instances are up, and the Oracle Grid Infrastructure is running, Oracle RAC ensures that all instances are synchronized via Cache Fusion. This synchronization allows multiple instances to access the same set of database files (e.g., data files, control files, and redo log files) in a shared storage configuration.

Monitor Cluster Synchronization

You can monitor Cache Fusion performance using the v$gc_stats view:

crsctl check ctss

crsctl check css

crsctl check cluster

 



ways to check cache fusion in Oracle RAC:

GCS statistics: GCS statistics for current and cr blocks, such as gc current blocks received and gc cr blocks received, can be used to analyze the effect of cache fusion. 

GCS wait events: GCS wait events, such as gc current block 3-way and gc cr grant 2-way, can be used to analyze the effect of cache fusion. 

V$SYSSTAT view: The V$SYSSTAT view can be queried to monitor global cache statistics. 

Cache Fusion is a feature in Oracle RAC that allows multiple instances to share and read the same data block concurrently. It uses the Global Cache Service (GCS) to check if another instance has a copy of a data block before accessing it. If another instance has the block, Cache Fusion transfers it directly between the instances without writing it to disk


Thanks,
Srini