Lin Hong's TECH Blog! 刀不磨要生锈,人不学习要落后 - Thinking ahead

Oracle dbca ORA-04062 Tips

2022-01-20

DBCA fails with the following error.

ERROR=ORA-04062: signature of package "SYS.DBMS_BACKUP_RESTORE" has been changed

Env

SQL> select banner from v$version;

BANNER
----------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

SQL> select banner_full from v$version;

BANNER_FULL
-----------------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0


SQL> !cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

SQL> !uname -r
5.4.17-2102.201.3.el8uek.x86_64

SQL>

ORA-04062 error

DBCA fails with Error: ORA-04062: signature of package “SYS.DBMS_BACKUP_RESTORE” has been changed

[oracle@ol8-19c dbhome_1]$ cat /u01/app/oracle/cfgtoollogs/dbca/cdb2/cdb21.log
[ 2022-01-21 10:00:18.615 CST ] [WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
[ 2022-01-21 10:00:18.615 CST ] [WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
[ 2022-01-21 10:00:20.143 CST ] Prepare for db operation
DBCA_PROGRESS : 8%
[ 2022-01-21 10:00:20.313 CST ] Copying database files
DBCA_PROGRESS : 31%
[ 2022-01-21 10:02:19.050 CST ] Creating and starting Oracle instance
DBCA_PROGRESS : 32%
DBCA_PROGRESS : 36%
DBCA_PROGRESS : 46%
DBCA_PROGRESS : 100%
[ 2022-01-21 10:03:07.024 CST ] [FATAL] Error while restoring PDB backup piece
DBCA_PROGRESS : 31%
DBCA_PROGRESS : 8%
DBCA_PROGRESS : 0%
[oracle@ol8-19c dbhome_1]$

The trace log in /u01/app/oracle/cfgtoollogs/dbca are as below.

[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=channel ORA_DISK_1: SID=29 device type=DISK
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=RMAN-00571: ===================================================
========
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =======
========
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=RMAN-00571: ===================================================
========
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=RMAN-03002: failure of restore command at 01/21/2022 10:43:50
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=ORA-04062: signature of package "SYS.DBMS_BACKUP_RESTORE" has b
een changed
[Thread-68] [ 2022-01-21 10:43:50.874 CST ] [RMANUtil$RMANUtilErrorListener.handleError:1386]  ERROR=RMAN>

Reason

ORA-04062: signature of package “SYS.DBMS_BACKUP_RESTORE” has been changed when using DBCA on 19c (Doc ID 2741745.1)

Note: The cause is known, But seems there is a conflict between the rman version packages that is coming from the patch vs rman version packages used by DBCA Template.

1-. Create a fresh Installed for 19.03.00.00 or rollback 19C PSU
2-. Run DBCA to create CDB
3-. Re-apply 19C RU and run datapatch


Once the Database is created and/or upgraded, if still receiving

SYS.DBMS_BACKUP_RESTORE version is not current

Then follow steps from: 2741760.1 - PL/SQL package SYS.DBMS_BACKUP_RESTORE version is not current

Recompile the RMAN packages and procedures by connecting to the target database as SYSDBA and execute: 

$ sqlplus / as sysdba

SQL> @$ORACLE_HOME/rdbms/admin/dbmsrman.sql
SQL> @$ORACLE_HOME/rdbms/admin/dbmsbkrs.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtrmns.plb
SQL> @$ORACLE_HOME/rdbms/admin/prvtbkrs.plb

 
Note: The cause is known, But seems there is a conflict between the rman version packages that is coming from the patch vs rman version packages used by DBCA Template.

This note only applied when creating a Database using DBCA  and Patch has been applied before database as been created.

Re-Install Database

ReInstall Database.

There is a conflict between the rman version packages that is coming from the patch vs rman version packages used by DBCA Template.

[oracle@ol8-19c software]$ ls -tlr LINUX.X64_193000_db_home.zip
-rwxrwx--- 1 root vboxsf 3059705302 Jul  7  2021 LINUX.X64_193000_db_home.zip
[oracle@ol8-19c software]$ pwd
/software
[oracle@ol8-19c software]$ cd $ORACLE_HOME
[oracle@ol8-19c dbhome_2]$ cd ../dbhome_1/
[oracle@ol8-19c dbhome_1]$ unzip -oq /software/LINUX.X64_193000_db_home.zip
[oracle@ol8-19c dbhome_1]$ export CV_ASSUME_DISTID=OEL7.6
[oracle@ol8-19c dbhome_1]$ pwd
/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@ol8-19c dbhome_1]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@ol8-19c dbhome_1]$ ./runInstaller -ignorePrereq -waitforcompletion -silent                        \
>     -responseFile ${ORACLE_HOME}/install/response/db_install.rsp               \
>     oracle.install.option=INSTALL_DB_SWONLY                                    \
>     ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                                         \
>     UNIX_GROUP_NAME=oinstall                                                   \
>     INVENTORY_LOCATION=${ORA_INVENTORY}                                        \
>     SELECTED_LANGUAGES=en,en_GB                                                \
>     ORACLE_HOME=${ORACLE_HOME}                                                 \
>     ORACLE_BASE=${ORACLE_BASE}                                                 \
>     oracle.install.db.InstallEdition=EE                                        \
>     oracle.install.db.OSDBA_GROUP=dba                                          \
>     oracle.install.db.OSBACKUPDBA_GROUP=dba                                    \
>     oracle.install.db.OSDGDBA_GROUP=dba                                        \
>     oracle.install.db.OSKMDBA_GROUP=dba                                        \
>     oracle.install.db.OSRACDBA_GROUP=dba                                       \
>     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                                 \
>     DECLINE_SECURITY_UPDATES=true
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2022-01-21_11-54-20AM/installActions2022-01-21_11-54-20AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2022-01-21_11-54-20AM/installActions2022-01-21_11-54-20AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/oracle/product/19.0.0/dbhome_1/install/response/db_2022-01-21_11-54-20AM.rsp

You can find the log of this install session at:
 /u01/app/oraInventory/logs/InstallActions2022-01-21_11-54-20AM/installActions2022-01-21_11-54-20AM.log

As a root user, execute the following script(s):
	1. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh

Execute /u01/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes:
[ol8-19c]
[oracle@ol8-19c dbhome_1]$ su -
Password:
[root@ol8-19c ~]# /u01/app/oraInventory/orainstRoot.sh
-bash: /u01/app/oraInventory/orainstRoot.sh: No such file or directory
[root@ol8-19c ~]# /u01/app/oracle/product/19.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/19.0.0/dbhome_1/install/root_ol8-19c_2022-01-21_11-56-47-912597304.log for the output of root script
[root@ol8-19c ~]# cat /u01/app/oracle/product/19.0.0/dbhome_1/install/root_ol8-19c_2022-01-21_11-56-47-912597304.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/dbhome_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA) is available at : /u01/app/oracle/product/19.0.0/dbhome_1/bin/tfactl
[root@ol8-19c ~]# exit
logout
[oracle@ol8-19c dbhome_1]$

recreate cdb/pdb use as below command.

dbca create cdb as silent mode.

dbca -silent -createDatabase -templateName General_Purpose.dbc -createAsContainerDatabase true -numberOfPDBs 1 -pdbName orclpdb -gdbname oradb.example.com -sid oradb -sysPassword oracle -systemPassword oracle -pdbAdminPassword oracle -characterSet AL32UTF8 -memoryPercentage 50 -responseFile NO_VALUE -emConfiguration LOCAL

43% complete
46% complete
Completing Database Creation
51% complete
53% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/oradb.
Database Information:
Global Database Name:oradb.example.com
System Identifier(SID):oradb
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/oradb/oradb0.log" for further details.
[oracle@ol8-19c dbhome_1]$ ps -ef | grep smon
oracle     14029       1  0 12:10 ?        00:00:00 ora_smon_oradb
oracle     14869    2637  0 13:08 pts/1    00:00:00 grep --color=auto smon
[oracle@ol8-19c dbhome_1]$

Reference

dbca sample for creating cdb/pdb.

dbca -silent -createDatabase \
 -templateName General_Purpose.dbc \
 -gdbname cdb3 -sid cdb3 -responseFile NO_VALUE \
 -characterSet AL32UTF8 \
 -sysPassword Oracle123 \
 -systemPassword Oracle123 \
 -createAsContainerDatabase true \
 -numberOfPDBs 1 \
 -pdbName pdb1 \
 -pdbAdminPassword Oracle123 \
 -databaseType MULTIPURPOSE \
 -memoryMgmtType auto_sga \
 -totalMemory 2000 \
 -storageType FS \
 -datafileDestination "/u02/oradata/" \
 -redoLogFileSize 50 \
 -emConfiguration NONE \
 -ignorePreReqs

Error in DBCA (create a CDB) - “Error while restoring PDB backup piece” is met during the “Creating and starting Oracle Instance” step (Doc ID 2831203.1)

CAUSE
Upon running "opatch lsinventory -detail", it was found that opatch lsinventory is not running. When checking the physical path of file, the inventory file was not present.
 
SOLUTION
Recreate the central inventory and registered the Oracle database home. Then run DBCA once again.
This should resolve this issue.

Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes (Doc ID 556834.1)

Have a good work&life! 2022/01 via LinHong


Similar Posts

Comments