Friday, January 31, 2025

EXACS: Creating an 11g Database Home

 



Intro

Oracle Exadata Cloud Service (ExaCS) historically supported Oracle Database 11g, but with recent updates, Oracle has phased out support for older database versions like 11g in ExaCS. While existing Oracle Database 11g instances may continue to run, it is no longer possible to provision new Oracle 11g databases on Exadata Cloud Service through the Oracle Cloud Infrastructure (OCI) console. Oracle encourages users to upgrade to more recent supported versions, such as Oracle Database 19c or 23ai, to leverage enhanced features, security, and performance improvements.

Some customers continue to run Oracle 11g because they have not been able to schedule downtime due to mission-critical business applications. Additionally, Oracle 11.2.0.4 R2 is considered one of the most stable environments that Oracle has built. However, these customers face challenges in finding an efficient migration method, as their databases have grown to terabyte sizes.

Customers are still stuck on Oracle 11g for several key reasons:

Mission-Critical Applications: Many businesses run critical applications that require constant uptime, making it difficult to schedule downtime for upgrades or migrations.

Stable Environment: Oracle 11.2.0.4 R2 is considered a highly stable release. Some businesses prefer to stick with this known stability rather than risk issues with newer versions.

Cost and Complexity: Upgrading Oracle databases, especially from 11g, can be expensive and complex. It may involve re-architecting applications, testing, and retraining staff, which some companies may not have the resources to handle.

Large Databases: Over time, databases have grown to terabyte sizes, which makes migration and upgrade processes much more challenging in terms of time, performance, and storage.

Custom Solutions and Legacy Code: Many organizations have customized solutions that are tightly integrated with Oracle 11g, and updating these systems can require significant rework, leading to compatibility issues with newer versions.

Business Prioritization: In some cases, businesses prioritize operational stability over modernization, choosing to delay upgrades to focus on other initiatives.

In this article, I will show you how you can create the 11g database in exacs using dbaascli.

Note: You can create this only if you have upgrade support for 11g. Oracle ExaCS does not support running 11g in the ExaCS environment.

List db images in EXACS



[root@exadevdb-01 ~]# dbaascli cswlib showImages
DBAAS CLI version 24.3.1.0.0
Executing command cswlib showImages
Job id: 10706bde-2e70-42fe-a371-7cb9bd572f7c
Session log: /var/opt/oracle/log/cswLib/showImages/dbaastools_2024-09-06_05-54-57-PM_59941.log
Log file location: /var/opt/oracle/log/cswLib/showImages/dbaastools_2024-09-06_05-54-57-PM_59941.log

############ List of Available database Artifacts  #############

1.IMAGE_TAG=11.2.0.4.230418
  VERSION=11.2.0.4.230418
  DESCRIPTION=11.2 APR 2023 DB Image
2.IMAGE_TAG=12.2.0.1.230718
  VERSION=12.2.0.1.230718
  DESCRIPTION=12.2 JUL 2023 DB Image
3.IMAGE_TAG=18.23.0.0.0
  VERSION=18.23.0.0.0
  DESCRIPTION=18c JUL 2023 DB Image
4.IMAGE_TAG=19.22.0.0.0
  VERSION=19.22.0.0.0
  DESCRIPTION=19c JAN 2024 DB Image
5.IMAGE_TAG=12.1.0.2.231017
  VERSION=12.1.0.2.231017
  DESCRIPTION=12.1 OCT 2023 DB Image
6.IMAGE_TAG=23.4.0.24.05
  VERSION=23.4.0.24.05
  DESCRIPTION=23ai DB image 23.4.0.24.05
7.IMAGE_TAG=18.22.0.0.0
  VERSION=18.22.0.0.0
  DESCRIPTION=18c APR 2023 DB Image
8.IMAGE_TAG=11.2.0.4.231017
  VERSION=11.2.0.4.231017
  DESCRIPTION=11.2 OCT 2023 DB Image
9.IMAGE_TAG=12.1.0.2.230418
  VERSION=12.1.0.2.230418
  DESCRIPTION=12.1 APR 2023 DB Image
10.IMAGE_TAG=19.23.0.0.0
  VERSION=19.23.0.0.0
  DESCRIPTION=19c APR 2024 DB Image
11.IMAGE_TAG=19.20.0.0.0
  VERSION=19.20.0.0.0
  DESCRIPTION=19c JUL 2023 DB Image
12.IMAGE_TAG=23.5.0.24.07
  VERSION=23.5.0.24.07
  DESCRIPTION=23ai DB image 23.5.0.24.07
13.IMAGE_TAG=12.2.0.1.230418
  VERSION=12.2.0.1.230418
  DESCRIPTION=12.2 APR 2023 DB Image
14.IMAGE_TAG=11.2.0.4.230718
  VERSION=11.2.0.4.230718
  DESCRIPTION=11.2 JUL 2023 DB Image
15.IMAGE_TAG=12.1.0.2.230718
  VERSION=12.1.0.2.230718
  DESCRIPTION=12.1 JUL 2023 DB Image
16.IMAGE_TAG=19.24.0.0.0
  VERSION=19.24.0.0.0
  DESCRIPTION=19c JUL 2024 DB Image
17.IMAGE_TAG=12.2.0.1.231017
  VERSION=12.2.0.1.231017
  DESCRIPTION=12.2 OCT 2023 DB Image
18.IMAGE_TAG=18.24.0.0.0
  VERSION=18.24.0.0.0
  DESCRIPTION=18c OCT 2023 DB Image
19.IMAGE_TAG=19.21.0.0.0
  VERSION=19.21.0.0.0
  DESCRIPTION=19c OCT 2023 DB Image
Images can be downloaded using their image tags. For details, see help using 'dbaascli cswlib download --help'.

dbaascli execution completed
[root@exadevdb-01 ~]#



Download the the 11204 Binary OCT2023 version.


dbaascli cswlib download --version 11204 --bp OCT2023 --bp_update no
Sample output


[root@exadevdb-01 ~]# dbaascli cswlib download --version 11204 --bp OCT2023 --bp_update no
DBAAS CLI version 24.3.2.0.0
Executing command cswlib download --version 11204 --bp OCT2023 --bp_update no
Job id: 8dab6933-9505-40a9-a398-c1ba46eae6e3
Session log: /var/opt/oracle/log/cswLib/download/dbaastools_2024-09-19_02-00-06-PM_166429.log
Loading PILOT...
Session ID of the current execution is: 40
Log file location: /var/opt/oracle/log/cswLib/download/pilot_2024-09-19_02-00-10-PM_166741
-----------------
Running initialize job
Completed initialize job
-----------------
Running validate_url_reachability job
Completed validate_url_reachability job
-----------------
Running validate_image_tag_existence job
Completed validate_image_tag_existence job
-----------------
Running validate_free_space job
Completed validate_free_space job
-----------------
Running validate_file_permissions job
Completed validate_file_permissions job
-----------------
Running download_image job
Image location=/var/opt/oracle/dbaas_acfs/dbnid/11.2.0.4.231017
Download succeeded
Completed download_image job
-----------------
Running decrypt job
Completed decrypt job
-----------------
Running post_download_update job
Completed post_download_update job
-----------------
Running verify_signature job
Skipping verifySignature check because the catalog contains signed property as false
Completed verify_signature job
-----------------
Running validate_sha256sum job
Skipping Sha256Sum check because the catalog does not contain sha256sum
Skipping Sha256Sum check because the catalog does not contain sha256sum
Completed validate_sha256sum job
-----------------
Running update_file_permissions job
Completed update_file_permissions job
{"11.2.0.4.231017":{"file_list":[{"file":"/var/opt/oracle/dbaas_acfs/dbnid/11.2.0.4.231017/db11204_bits_EXA.zip"},{"file":"/var/opt/oracle/dbaas_acfs/dbnid/11.2.0.4.231017/exadbf_11204.tar.gz"}]}}

dbaascli execution completed
[root@exadevdb-01 ~]#


List downloaded db images

After downloading the image you can list local database binary images using cswLib listlocal.


[opc@exadevdb-01 ~]$ sudo dbaascli cswLib listLocal
DBAAS CLI version 24.3.1.0.0
Executing command cswLib listLocal
Job id: 0405333f-04d5-4043-97f6-0fa0a9eca51b
Session log: /var/opt/oracle/log/cswLib/listLocal/dbaastools_2024-09-06_06-15-17-PM_154824.log
Log file location: /var/opt/oracle/log/cswLib/listLocal/dbaastools_2024-09-06_06-15-17-PM_154824.log

############ List of Available Database Images  #############

1.IMAGE_TAG=11.2.0.4.231017
  IMAGE_SIZE=3GB
  VERSION=11.2.0.4.231017
  DESCRIPTION=11.2 OCT 2023 DB Image
2.IMAGE_TAG=19.24.0.0.0
  IMAGE_SIZE=5GB
  VERSION=19.24.0.0.0
  DESCRIPTION=19c JUL 2024 DB Image

dbaascli execution completed
[opc@exadevdb-01 ~]$

Create a new database home using 11g binary

The next step is to create a database home 

[root@exadevdb-01 ~]# dbaascli dbhome create --version 11.2.0.4
DBAAS CLI version 24.3.2.0.0
Executing command dbhome create --version 11.2.0.4
Job id: 615dc2e8-af82-47c1-8612-526082b6e9bf
Session log: /var/opt/oracle/log/dbHome/create/dbaastools_2024-10-10_07-30-24-PM_99121.log
Loading PILOT...
Session ID of the current execution is: 34
Log file location: /var/opt/oracle/log/dbHome/create/pilot_2024-10-10_07-30-27-PM_99403
-----------------
Running Plugin_initialization job
Acquiring native write lock: _u02_app_oracle_product_11.2.0_dbhome_1
Acquiring native write lock: OraHome2
Completed Plugin_initialization job
-----------------
Running OH_image_validate job
Completed OH_image_validate job
-----------------
Running DB_home_version_check job
Completed DB_home_version_check job
-----------------
Running DB_home_environment_version_check job
Completed DB_home_environment_version_check job
-----------------
Running GI_version_check job
Completed GI_version_check job
-----------------
Running Validate_backup_location job
Completed Validate_backup_location job
-----------------
Running Cluster_nodes_check job
Completed Cluster_nodes_check job
-----------------
Running Validate_users_group job
Completed Validate_users_group job
-----------------
Running OH_image_download job
Completed OH_image_download job
-----------------
Running OH_image_version_check job
Completed OH_image_version_check job
-----------------
Running Disk_space_check job
Completed Disk_space_check job
Acquiring write lock: provisioning
-----------------
Running Pre_OH_creation_lock_manager job
Completed Pre_OH_creation_lock_manager job
-----------------
Running OH_pre_existence_check job
Completed OH_pre_existence_check job
-----------------
Running Local_node_oh_image_unzip job
Completed Local_node_oh_image_unzip job
-----------------
Running OH_creation_cvu_prechecks job
Completed OH_creation_cvu_prechecks job
-----------------
Running Local_node_oh_clone job

Completed Local_node_oh_clone job
-----------------
Running Update_dbnid_bits job
Skipping. Job is detected as not applicable.
-----------------
Running Local_node_oh_backup_creation job
Completed Local_node_oh_backup_creation job
-----------------
Running Remote_nodes_software_copy job

Completed Remote_nodes_software_copy job
-----------------
Running Remote_nodes_attach_home job
Completed Remote_nodes_attach_home job
-----------------
Running Remote_nodes_post_install_steps job
Skipping. Job is detected as not applicable.
-----------------
Running Inventory_nodes_list_update job
Completed Inventory_nodes_list_update job
-----------------
Running Root_script_run job
Completed Root_script_run job
-----------------
Running Post_OH_creation_lock_manager job
Completed Post_OH_creation_lock_manager job
Releasing lock: provisioning
-----------------
Running release_lock job
Releasing native lock: OraHome2
Releasing native lock: _u02_app_oracle_product_11.2.0_dbhome_1
Completed release_lock job
-----------------
Running Generate_dbhome_metadata job
Completed Generate_dbhome_metadata job
-----------------
Running Generate_dbhome_system_details job
Acquiring native write lock: global_dbsystem_details_generation
Releasing native lock: global_dbsystem_details_generation
Completed Generate_dbhome_system_details job
-----------------
Running Plugin_cleanup job

Completed Plugin_cleanup job
---------- START OF PLUGIN RESULT ----------
{"ORACLE_HOME_NAME":"OraHome2","ORACLE_HOME":"/u02/app/oracle/product/11.2.0/dbhome_1"}
---------- END OF PLUGIN RESULT ----------

dbaascli execution completed

Conclusion


While Oracle Exadata Cloud Service (ExaCS) no longer officially supports provisioning new Oracle Database 11g instances through the OCI console, it is still possible to create and manage these databases using tools like dbaascli. This approach provides a practical solution for customers who rely on the stability and performance of Oracle 11g for mission-critical applications but face challenges in scheduling downtime or migrating to newer database versions. 

However, it’s essential to recognize the limitations of continuing to use an unsupported version, such as missing out on critical security updates, performance enhancements, and new features offered by modern versions like Oracle Database 19c or 23c AI. Organizations are encouraged to develop a long-term migration strategy to align with Oracle's support roadmap and ensure the sustainability of their database operations.

EXACS: Resolving PDB Console Issue

 





Intro 


The roles of DBAs and architects are continually evolving, becoming more technical and requiring broader expertise. For Oracle DBAs, it's no longer just about managing databases; there's a growing need to understand and work with the OCI (Oracle Cloud Infrastructure) GUI as well. This is because many OCI services depend on the database being properly visible in the OCI console to function correctly.

Recently, I faced an issue after migrating a database from on-premises to the cloud in an Exadata Cloud@Customer (ExaCS) deployment. The pluggable database (PDB) did not appear in the OCI console.

Steps I followed the below-mentioned steps to migration.

  • Created a dummy database directly from the OCI console.
  • Deleted this dummy database at the backend.
  • Used RMAN to perform a duplicate operation.

  • After the RMAN duplicate, the PDB (pluggable database) was correctly visible under the CDB (container database). However, the status in the OCI console is still displayed as "failed."

    This highlights the importance of understanding the OCI console and ensuring proper configuration post-migration to avoid operational disruptions.


    As per Figure 1, the OCI console shows pdb state from console shows as "failed".

                                                        Figure 1 : PDB state from OCI console.

    Troubleshooting steps 


    If a Pluggable Database (PDB) resource appears in a Failed status in the Cloud Console but remains available in the VM, refer to the following Oracle Meta Link note for details on this known issue:

    • Meta Link Note: Pluggable Database (PDB) Resource Shows Failed Status in Cloud Console While It Is Available in VM (Doc ID 2855062.1).

    Step 1: Validate the CON_UID

    Log in to the database and run the following query to verify the Container UID (CON_UID)

    SELECT CON_UID, NAME FROM V$PDBS;

    
    
    SQL> l
      1* select  CON_UID, NAME from V$PDBS
    SQL> /
    
       CON_UID NAME
    ---------- --------------------------------------------------------------------------------------------------------------------------------
    2368539052 PDB$SEED
    1479666877 EGDEV_PDB1
    2175707955 EGQA_PDB1
    
    SQL>
    
    

    Step 2: Confirm the PDB Details

    
    
    dbaascli pdb getDetails --dbname EGPRD --pdbUID 2297085946
    
    

    Step 3: Handle Orphaned PDB Records

  • If the above command returns a valid result, the PDB entry still exists in the backend.
  • In such a case, you may need to delete the orphaned database entry manually.

  • Step 4: Delete Manually 


    To manually delete the PDB using dbaascli, run the following command:

    
    dbaascli pdb delete --dbName  --pdbUID 2297085946
    

    Important Note:

    🚨 Before deleting any PDB, always verify the CON_UID returned from the database.

    • If the CON_UID from V$PDBS matches the one being checked, you are dealing with a live PDB.
    • Do NOT delete the database in this case, as it is currently active.

    If the CON_UID in the Cloud Console is different from the one in the database, you can safely delete the PDB from the console.

    Once deleted, wait 15-20 minutes, and the correct PDB will be reflected in the Cloud Console.




                                                      Figure 2: This is the same figure highlighting the con_uid.

    Protecting Your Encryption Keys: (OKV - Part 2 )

      Intro  The Role of Oracle Key Vault in Securing Encryption Keys One of the fundamental aspects of database security is e...