12c中的APEX,ORA-65346 The PDB version is lower and components
Tags: Oracle
Oracle APEX 在 12.1.0.2.0 中默认安装,而在 12.2.0.1.0 未默认安装,如果不进行 APEX 卸载,在 12.2.0.1.0 中 plug 12.1.0.2.0 版本的 pdb 将报如下 ORA-65346 错误:
1 | ERROR ``at` `line 1:``ORA-65346: The PDB version ``is` `lower` `and` `components (APEX) are missing ``in` `CDB.`` ` ` ``- APEX mismatch: PDB has installed common APEX. CDB has ``not` `installed APEX. |
解决:编辑xml 文件 /tmp/ pdbsample.xml , 删除以下行:
1 | <APEX>4.2.5.00.08:1</APEX> |
或者卸载APEX :
1 | select` `COMP_ID, STATUS ``from` `DBA_REGISTRY ``where` `COMP_ID=``'APEX'``;``SQL>@?/apex/apxremov_nocdb.sql |
11g 需要跑 apxremov.sql , 12.1.0.2 需要跑脚本 apxremov_con.sql ,其它版本需要跑 apxremov_nocdb.sql 或 apxremov_cdb.sql 进行卸载 APEX 组件。
19c中卸载APEX组件
#移除PDB中的APEX组件,在PDB中执行,在19c中会报错,我们可以将18c中的相应脚本拷贝到19c中的相应位置后再执行@?/apex/apxremov_nocdb.sql即可。
ORA-01435: User does not Exist, Removing APEX (Doc ID 2641217.1)
In this Document
Symptoms | |
---|---|
Changes | |
---|---|
Cause | |
---|---|
Solution | |
---|---|
APPLIES TO:
Oracle Application Express (APEX) - Version 3.2.1 and later
Information in this document applies to any platform.
SYMPTOMS
On : APEX 3.2.1 version, Administration
When attempting to remove APEX using script apxremov.sql found under the ORACLE_HOME of a 19c DB
the following error occurs.
ORA-01435: user does not exist
STEPS
-----------------------
\1. Take an RMAN backup from 11g (Database) DB and restore it in a 19c DB
\2. Try to remove APEX using apxremov.sql script
CHANGES
CAUSE
Using the wrong version of the script (for the version of APEX to be remove).
Per example: the script belong to APEX 5.0 and you want to remove APEX 3.2.
SOLUTION
You need to use the apxremov.sql script that belongs to the APEX version installed on the DB (i.e for APEX 3.2 you can find the correct script under the $ORACLE_HOME/apex but from 11g database) as the apex version changes with each DB version.
If your 19c DB is on another server, we suggest:
\1. Zip all of the apex directory from the 11g server.
\2. Unzip under /tmp on target machine.
\3. Then change directories (cd) to the new apex directory and connected as SYS run the script from here.
升级APEX 组件
从 18c 开始, Oracle 不会自动更新 APEX 组件,需要手动更新。
下载 APEX : http://www.oracle.com/technetwork/developer-tools/apex/all-archives-099381.html
要写切换到解压的 apex 所在的目录下再以 sysdba 身份登录数据库,执行脚本升级
[oracle@cndba apex]$ pwd
/software/apex
sqlplus / as sysdba
SQL > @apexins.sql SYSAUX SYSAUX TEMP /i/
检查 APEX 版本
COL COMP_NAME FORMAT A40
COL STATUS FORMAT A12
SELECT COMP_NAME, STATUS, VERSION
FROM DBA_REGISTRY
WHERE COMP_NAME='Oracle Application Express';
COMP_NAME STATUS VERSION
Oracle Application Express VALID 5.1.4.00.08