ExaCC : How to Understand OCPU and How Many Databases can be Created ?

A client created an VM Cluster with four RAC nodes and eight ( 8 ) OCPU assigned in one of VM Clusters  Compartment.

So questions are how many CPUs each RAC node has ? and How many databases can be created in this RAC environment based on current available OCPUs?

Subscribe to get access

Read more of this content when you subscribe today.

ORA-65054: Cannot open a pluggable database in the desired mode

In RAC environment, we cannot open PDB with the following messages:

SQL> alter pluggable database open instances=all;

*
ERROR at line 1:
ORA-65054: Cannot open a pluggable database in the desired mode.

Check CDB still in Mount status:

SQL> alter session set container=CDB$ROOT;

Session altered.

SQL> show con_name

CON_NAME
——————————
CDB$ROOT

QL> select name,open_mode from v$database;

NAME    OPEN_MODE
------  ---------
TESTDB  MOUNTED


SQL> alter database open ;

*
ERROR at line 1:
ORA-65054: Cannot open a pluggable database in the desired mode.

CAUSE and SOLUTION

Subscribe to get access

Read more of this content when you subscribe today.

ExaCC: How to Register a Database in OCI

Registering a Replacement Database

  • Create a database by using Oracle Database ExaCC console with the same database name, software version and character set.
  • Shutdown the newly created database.
  • Remove the database files and replace them with the replacement database. The replacement database files must be moved into the same location as the database you are replaced. You can manually copy the replacement database files into place from a cold backup, or you can restore from a backup using Oracle Recovery Manager (RMAN).
  • Start the replacement database.
  • Perform the registration prerequisite check and resolve any issues from the following command:

    # dbaascli registerdb prereqs –dbname dbname [ –db_unique_name dbuniquename ]

    The following are the common issues from the above prerequisite check:
    1) Required database attributes such as the database name, software version, or character set do not match the original database.
    2) The database is not in READ WRITE mode.
    3) Flashback, archive log mode and block change tracking are not enabled.
    4) Transparent Database Encryption (TDE) is not configured, or is not properly configured. For example, the TDE keystore is not the expected location, or the TDE keystore type is not AUTOLOGIN.
  • Register the database by running the following command as the root user on one of the database servers:
# dbaascli registerdb begin --dbname dbname [ --db_unique_name dbuniquename ]

Register a Manually Created or Migrated Database

  1. Manually create or migrate the database. Ensure that the database meets the following requirements:
    • The /etc/oratab file contains an entry for the database.
    • Oracle Transparent Database Encryption (TDE) is configured on the database.
    • The database is in READ WRITE mode.
    • Archive log mode and block change tracking are enabled.
  2. Generate a cloud registration file (creg.ini) by running the following command as the root user on one of the database servers:
# dbaascli registerdb registry --action initialize --db dbname [ --udb dbuniquename ]

3. Perform the registration prerequisite check and resolve any issues.

# dbaascli registerdb prereqs --dbname dbname [ --db_unique_name dbuniquename ]

4. Register the database by running the following command as the root user on one of the database servers:

# dbaascli registerdb begin --dbname dbname [ --db_unique_name dbuniquename 

ExaCC : Can We Change Oracle and Grid User Password?

In ExaCC environment, you should not change any default setting for default users.

So changing password of grid infrastructure user ( gird ) and Oracle RAC database user ( oracle) is not allowed in ExaCC environment.

How To Manually Failover to Standby Database When Primary Database Got Issues

In normal situation, DBA can use Data Guard utility to switchover or failover database roles. DBA can also use SQL command to switchover or failver database roles.

This post demonstrate how to failover to standby database in 12c or 19c when Primary Databases is lost due to various reasons.

Switch Logfile and Checkpoint

On Primary:


SQL> alter system switch all logfile;

SQL> alter system checkpoint;

Check Database Role

On Standby:

SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;

OPEN_MODE PROTECTION_MODE DATABASE_ROLE
-------------------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY

Stop Standby Database Recovery

SQL> alter database recover managed standby database cancel;
Database altered.

Complete Recovery and Transit Current Standby as Primary

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Database altered.

After this command, this standby database will NOT be able to go back to standby database any more.

Activate the Standby Database

SQL>alter database activate standby database;
Database altered.

Open the Database

SQL>alter database open;


SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;

OPEN_MODE  PROTECTION_MODE      DATABASE_ROLE
---------- -------------------- ----------------
MOUNTED    MAXIMUM PERFORMANCE   PRIMARY

The Last and Not the Least

  • Backup new primary database ASAP.
  • Reinstate the old primary as new standby database, if flashback on. Otherwise rebuild the standby database as per normal processes.