To revert to a previous Oracle Application Express release 4.2 in a CDB:
Make sure All PDB's Open at this stage.
alter pluggble database all open;
- If you altered your images directory, you must point the text alias
/i/
back to images directory for the release you want to revert to. See "Copying the Images Directory." - Change your working directory to
apex/core
in the 4.2 source. - Cd $OH_HOME/apex/core create below sqls.This your apex5 directory under OH_HOME
- Create a new text file in that directory named
apx42dgrd1.sql
consisting of the following:alter session set current_schema = SYS; @core_sys_views.sql grant select on sys.wwv_flow_gv$session to APEX_040200; @wwv_flow_val.sql @wwv_flow_val.plb @wwv_dbms_sql.sql @wwv_dbms_sql.plb begin dbms_utility.compile_schema('APEX_040200'); end; /
- Create a second new text file in that directory named
apx42dgrd.sql
consisting of the following:set define '^' whenever sqlerror exit column :xe_home new_value OH_HOME NOPRINT variable xe_home varchar2(255) set serverout on begin -- get oracle_home sys.dbms_system.get_env('ORACLE_HOME',:xe_home); if length(:xe_home) = 0 then sys.dbms_output.put_line(lpad('-',80,'-')); raise_application_error ( -20001, 'Oracle Home environment variable not set' ); end if; end; / whenever sqlerror continue set termout off select :xe_home from sys.dual; set termout on host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl -b apx42dgrd apx42dgrd1.sql
- Start SQL*Plus and connect to
CDB$ROOT
of the database where Oracle Application Express is installed asSYS
specifying theSYSDBA
role:On UNIX and Linux:
$ sqlplus /nolog SQL> SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
- Execute the following commands:
@apx42dgrd.sql
Once this is completed successful goto the next step.
- Change your working directory to
apex
in the 4.2 source. - cd $OH_HOME
- mv apex apex_5_old
- mv apex_old apex this your old apex4.2 directory and create below sqls under apex4.2 .
- Create a new text file in that directory name
apx42dgrd1.sql
with the following contents:set define '^' ALTER SESSION SET CURRENT_SCHEMA = SYS; @apexvalidate x x APEX_040200 ALTER SESSION SET CURRENT_SCHEMA = APEX_040200; exec apex_040200.wwv_flow_upgrade.switch_schemas('APEX_050000','APEX_040200'); ALTER SESSION SET CURRENT_SCHEMA = SYS; declare l_apex_version varchar2(30); begin l_apex_version := apex_040200.wwv_flows_release; dbms_registry.downgrading('APEX','Oracle Application Express','validate_apex','APEX_040200'); dbms_registry.downgraded('APEX',l_apex_version); validate_apex; end; /
- Create a second new text file in that directory named
apx42dgrd.sql
consisting of the following:set define '^' whenever sqlerror exit column :xe_home new_value OH_HOME NOPRINT variable xe_home varchar2(255) set serverout on begin -- get oracle_home sys.dbms_system.get_env('ORACLE_HOME',:xe_home); if length(:xe_home) = 0 then sys.dbms_output.put_line(lpad('-',80,'-')); raise_application_error ( -20001, 'Oracle Home environment variable not set' ); end if; end; / whenever sqlerror continue set termout off select :xe_home from sys.dual; set termout on host ^OH_HOME/perl/bin/perl -I ^OH_HOME/rdbms/admin ^OH_HOME/rdbms/admin/catcon.pl -b apx42dgrd apx42dgrd1.sql
- Start SQL*Plus and connect to
CDB$ROOT
of the database where Oracle Application Express is installed asSYS
specifying theSYSDBA
role:On UNIX and Linux:
$ sqlplus /nolog SQL> SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
- Execute the following:
@apx42dgrd.sql
SQL> @apx42dgrd.sql PL/SQL procedure successfully completed. catcon: ALL catcon-related output will be written to apx42dgrd_catcon_17261.lst catcon: See apx42dgrd*.log files for output generated by scripts catcon: See apx42dgrd_*.lst files for spool files, if any catcon.pl: completed successfully SQL> commit; Commit complete. SQL> select version from sys.dba_registry where comp_id = 'APEX'; VERSION ------------------------------ 4.2.5.00.08 SQL> show con_name CON_NAME ------------------------------ CDB$ROOT
Now you are done with reverting.
Thanks
Srini
No comments:
Post a Comment
No one has ever become poor by giving