Showing posts with label OCI Oracle Cloud Infrastructure. Show all posts
Showing posts with label OCI Oracle Cloud Infrastructure. Show all posts

Wednesday, July 8, 2026

OEL Linux OS Patching on Oracle Cloud Infra OCI DB System

 Below is a typical Oracle Cloud Infrastructure OCI - DB System (DBCLI-managed) Oracle Enterprise Linux (OEL) OS patching procedure using DBCLI. This procedure assumes the system is managed by DBCLI and that the patch is available in Oracle's repository or Object Storage. (Update the DB System Resources Using dbcli)

Step 1: Pre-Patching Checks

1. Login to the database server

ssh opc@<dbserver>
sudo su -

2. Check current DBCLI version

dbcli -v

3. Verify current system components

dbcli describe-component

Example Output:

Component Name     Installed Version     Available Version
----------------------------------------------------------
OS                 8.x.x                 8.x.x
GI                 19.x                  19.x
DBHOME             19.x                  19.x

This identifies whether updates are available. 


4. Check available OS patches

dbcli get-availableospatches

Example:

Update Available     Reboot Required
------------------------------------
Yes                  Yes

If Reboot Required = Yes, plan a maintenance window. 


Step 2: Database Health Check

Check that databases are healthy.

srvctl status database -d <dbname>

or

crsctl stat res -t

Ensure there are no failed resources.


Step 3: Backup

Oracle recommends taking a backup before applying OS updates.

Examples:

  • RMAN backup

  • Storage snapshot

  • VM snapshot (if applicable)

This is a recommended prerequisite before OS patching. 


Step 4: Run OS Patch Precheck

Run the DBCLI precheck.

dbcli update-server -c os -p

Example output:

{
 "jobId":"7fc5cadd-d256-436a-be0d",
 "description":"OS Patching Prechecks"
}

Step 5: Monitor the Precheck Job

dbcli describe-job -i <JOB_ID>

Wait until:

Status : Success

If the precheck fails, resolve the reported issues before continuing. (Update the DB System Resources Using dbcli)


Step 6: Start OS Patching

Execute:

dbcli update-server -c os

Example:

{
 "jobId":"bee1c6d9-45fb-4e5b",
 "description":"OS Patching"
}

Step 7: Monitor Patch Progress

dbcli describe-job -i <JOB_ID>

or

watch dbcli describe-job -i <JOB_ID>

Monitor until:

Status : Success

Step 8: Reboot Server (If Required)

If the available OS patch indicated Reboot Required = Yes, reboot the server.

reboot

Oracle recommends rebooting after kernel updates. (Update the DB System Resources Using dbcli)


Step 9: Verify Cluster Services

After reboot:

crsctl check cluster
crsctl stat res -t

Verify:

  • CRS

  • ASM

  • LISTENER

  • VIP

  • SCAN

  • Database resources

are all ONLINE.


Step 10: Verify Database

srvctl status database -d <dbname>

or

SELECT INSTANCE_NAME, STATUS FROM V$INSTANCE;

Step 11: Verify OS Version

cat /etc/oracle-release

Check kernel:

uname -r

Step 12: Verify No Pending OS Updates

dbcli get-availableospatches

Expected output:

Update Available : No

Useful DBCLI Commands

PurposeCommand
Show componentsdbcli describe-component
Available OS patchesdbcli get-availableospatches
Run precheckdbcli update-server -c os -p
Apply OS patchdbcli update-server -c os
Monitor jobdbcli describe-job -i <jobid>
Show latest patchesdbcli describe-latestpatch
DBCLI versiondbcli -v

RAC (2-node) Best Practice

For a 2-node RAC environment, patch one node at a time to maintain service availability:

  1. Patch Node 1.

  2. Reboot Node 1 if required.

  3. Confirm CRS, ASM, and the database are healthy.

  4. Relocate services if needed.

  5. Patch Node 2.

  6. Reboot Node 2.

  7. Perform final cluster validation.

This rolling approach minimizes downtime and keeps nodes at consistent patch levels within the maintenance window. (Update the DB System Resources Using dbcli)

This procedure follows Oracle's documented DBCLI workflow: check for available OS updates, run the mandatory precheck (dbcli update-server -c os -p), apply the update (dbcli update-server -c os), monitor the job, reboot if required, and verify cluster and database health after patching. (Update the DB System Resources Using dbcli)

Wednesday, January 8, 2025

DR Plan Management in OCI Oracle Cloud Infrastructure

 Oracle Cloud Infrastructure (OCI) Full Stack Disaster Recovery has enhanced DR Plan management to automatically add and remove DR Plan Steps in existing DR Plans whenever DR Protection Groups member resources are changed. Full Stack DR now automatically modifies all DR plans in place, based on the members you add or remove from protection groups, preserving any custom steps you’ve added to plans.

Enhanced plan management requires approving modifications after updating members of protection groups.
Figure 1: Enhanced plan management requires approving modifications after updating members of protection groups.

As your business systems and application stack evolve, your disaster recovery plans need to remain in lockstep. With this new feature, Full Stack DR makes it easy to manage these ongoing changes.

Maintaining the integrity of your recovery plans is job number one for disaster recovery administrators, and changes to member resources in protection groups have a profound impact on recovery steps in DR Plans. So, we’ve introduced the following simple workflow to help ensure plan integrity whenever protection groups change:

  1. Refresh: Refreshing a DR Plan makes it easy to see what has changed by tagging steps that were added or removed.
  2. Verify: Verifying a DR Plan commits the changes and activates the plan.

Let’s explore how easy using this new capability is. Adding, removing, or changing member resources in either the primary or standby protection group triggers the plan refresh workflow.

Updating member resources begins the process

Nothing changes about the way you add a member resource. You still choose the resource type and provide the appropriate properties needed to inform Full Stack DR what you need done with the object during a recovery.

Imagine that you want to add two more moving Compute instances to the DR Protection Group in the primary region, which currently contains two virtual machines (VMs) and a single volume group, as shown in figure 2.

The current members of the DR protection group.
Figure 2: The current members of the DR protection group.

After adding the two Compute instances, the protection group looks like Figure 3. It looks exactly like it has always looked after adding or removing member resources – nothing is different here.

Two more Compute instances have been added as members of the protection group.
Figure 3: Two more Compute instances have been added as members of the protection group.

Exploring the new workflow

Now you can begin to see the changes introduced with the enhanced plan management scheme. The state of all plans in the standby protection group changes to Needs attention (Needs refresh), while the plans in the primary protection group change to Inactive (Needs refresh).

The state of all plans changes to “Needs attention” after updating members of protection groups.
Figure 4: The state of all plans changes to “Needs attention” after updating members of protection groups.

None of the plans can run in this state, so your ability to recover is completely offline until the plan refresh workflow is completed in the standby protection group. You must select each DR Plan and then select the Refresh button, as shown in Figure 5. This selection forces Full Stack DR to inspect the members in both the primary and standby regions and update the plan in the standby protection group.

A Refresh action button appears at the top of all plans in a “Needs attention” state.
Figure 5: A Refresh action button appears at the top of all plans in a “Needs attention” state.

The refresh operation tags any plan steps that have been added or removed so you can see all the changes that will be made before the plan is updated permanently in the next step.

Refreshed plans show all plan groups and steps that were changed, added, or removed.
Figure 6: Refreshed plans show all plan groups and steps that were changed, added, or removed.

To accept and make changes permanent, select Verify.

A Verify action button appears at the top of all DR Plans that have been refreshed.
Figure 7: A Verify action button appears at the top of all DR Plans that have been refreshed.

The verify operation commits the changes, updates the plan, and removes the tags so everything appears as normal.

Steps have been added after the verify operation is completed.
Figure 8: Steps have been added after the verify operation is completed.

You must refresh all existing DR Plans contained in the standby protrection group. The resource list page for plans in the Oracle Cloud Console shows the state of all the plans, which can help you track your progress.

Use the plans resource list in the Oracle Cloud Console to track your progress.
Figure 9: Use the plans resource list in the Oracle Cloud Console to track your progress.

When all the plans in the standby protection group are active, you’re ready to go. You still must refresh the DR Plans in the peer region, but you can recover from outages in the primary OCI region at this point in the process. Plans always run from the standby protection group.

Ensure that all DR Plans have been refreshed and verified in the standby region.
Figure 10: Ensure that all DR Plans have been refreshed and verified in the standby region.

Refreshing plans in the primary protection group

The DR Plans in the primary protection group are still in an Inactive (Needs refresh) state and also need refreshing.  However, you can’t modify recovery plans contained in protection groups with the primary role, including refreshing, and verifying. So, you must perform a switchover so that you can refresh the plans in peer region.

Plans must be refreshed in primary DR Protection Group after switchover.
Figure 11: Plans must be refreshed in primary DR Protection Group after switchover.

Conclusion

Keeping up with change can be complex, but Full Stack DR has made the job of managing change just a little simpler with this new enhancement. The new DR Plan refresh feature automatically rebuilds plans, while protecting the user-defined steps that you have taken so much time to perfect.


References:

Add Members to a Disaster Recovery Protection Group

Enhanced Disaster Recovery Plan Management with OCI Full Stack Disaster Recovery

Orchestrate Disaster Recovery with a Single Click | Oracle

Thursday, September 5, 2024

Top Oracle Commands & Utilities

1. Oracle Database Commands and Tools:

- SQL*Plus: A command-line tool used for running SQL and PL/SQL commands and scripts against Oracle databases.
- expdp (Export Data Pump): Used to export data and metadata from an Oracle database into a set of dump files.
- impdp (Import Data Pump): Used to import data and metadata from dump files into an Oracle database.
- DBCA (Database Configuration Assistant): DBCA is a utility provided by Oracle to simplify the creation, configuration, and management of Oracle databases.
- DBUA (Database Upgrade Assistant): DBUA is a utility provided by Oracle to automate the process of upgrading an existing Oracle database to a newer version.
- NETCA (Network Configuration Assistant): is a GUI utility that simplifies the configuration of Oracle network components.
- NETMGR (Oracle Net Manager): is a more advanced and flexible tool compared to NETCA, providing a graphical interface for detailed configuration of Oracle Net Services.
- RMAN (Recovery Manager): A command-line interface for performing backup and recovery operations in Oracle databases.

2. Golden Gate Commands:
- GGSCI (GoldenGate Software Command Interface): Used for managing, configuring, and monitoring Oracle GoldenGate processes.
- OGGCA (Oracle GoldenGate Configuration Assistant): A command-line tool for configuring Oracle GoldenGate instances.
- Logdump: A utility for viewing and analyzing trail files generated by Oracle GoldenGate.
- DEFGEN (Definition File Generator): A command-line tool used to generate definition files in heterogeneous environments.

3. Oracle Grid Infra Commands:
- CRSCTL (Cluster Ready Services Control Utility): Used to manage Oracle Clusterware components.
- SRVCTL (Service Control): Used for managing Oracle RAC databases and other resources within the cluster.
- ASMCMD (ASM Command Line Utility): A command-line tool for managing Oracle ASM instances and disks.
- CLUVFY (Cluster Verification Utility): A tool for verifying the integrity and proper configuration of Oracle RAC and Oracle Grid Infrastructure.
- CRSSTAT: A utility that provides a summary of the current status of all cluster resources.
- OCRCONFIG: Used to manage the Oracle Cluster Registry (OCR).

4. Additional commands:
-dbcli (Database Command Line Interface): Used on Oracle OCI Cloud to apply patches and upgrade oracle software like database oracle home.
- EMCLI (Oracle Enterprise Manager CLI): Used to manage and automate Oracle Enterprise Manager operations via scripts.
- OPatch: A tool for applying and rolling back patches in Oracle software installations.
- ADRCI (Automatic Diagnostic Repository Command Interpreter): Used for managing diagnostic data such as alert logs, trace files, and incidents.
- ORAPWD (Oracle Password Utility): Used for creating and managing password files for Oracle databases.
- ORAPKI (Oracle Public Key Infrastructure): is a command-line utility provided by Oracle for managing security credentials.
- DGMGRL (Data Guard Manager Command-Line Interface): is the primary command-line interface for managing Oracle Data Guard configurations.



Saturday, June 1, 2024

Change Instance Hostname Permanently on OCI Oracle Cloud

I noticed that when I changed the hostname in OCI compute instance and when the server was rebooted  the instance hostname changed back to the default hostname.

Followed below steps to permanently preserve the hostname even after the server got rebooted.

Do all the below steps as root user. 

Step 1. Update this file /etc/oci-hostname.conf set the value of PRESERVE_HOSTINFO to 2.

$ vi /etc/oci-hostname.conf

PRESERVE_HOSTINFO=2

This change will be persistent across reboots.

Step 2.Edit /etc/sysconfig/network Here in this file change the parameter value for "hostname"

# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=<new_hostname> ← — — — — Update this value and set the name of server to be preserved. 

Step 3.Update the /etc/hostname file with the below command.

$ hostnamectl set-hostname <new_hostname>

This way even after the server is rebooted it will preserve the new hostname and will not revert back.