Visit Counter

Thursday, January 7, 2021

Oracle 19c Database Upgrade From 11.2.0.4 to 19.2.0.0 Using DBUA

 

Oracle 19c Database Upgrade From 11.2.0.4 to 19.3.0.0 Using DBUA


Description:-
There are different ways of upgrading to the latest release of Oracle database and Oracle provides multiple methods to upgrade. Few are listed below:
* Database Upgrade Assistant (DBUA)
* Manual Upgrade
* Transportable Table spaces
* Data pump export/import
* Oracle Streams
* Oracle Golden Gate
Here I am going to choose DBUA to upgrade my database,
DBUA provides a graphical user interface to guide you through the upgrade of Oracle Database.
Oracle Database Releases That Support Direct Upgrade
Review the supported options for direct upgrades to the latest Oracle Database release.
You can perform a direct upgrade to the new release from the following releases:
• 11.2.0.4
• 12.1.0.1 and 12.1.0.2
• 12.2.0.1
Steps for upgrade from 11.2.0.4 to 19.3.0.0 using DBUA :-
Pre-steps for DB upgrade :-
rman target / 
run {
allocate channel test_backup_disk1 type disk format '/u01/backup/%d_%U';
backup incremental level 0 tag 'ORCL_BEFORE_UPG'  database;
backup format  tag 'ORCL_CONTROL_FILE' current controlfile;
release channel test_backup_disk1;
}
Take RMAN full backups before upgrade.



Ensure backup is complete before upgrade.
SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';

no rows selected
Empty Recycle bin.

SQL> PURGE DBA_RECYCLEBIN ;

DBA Recycle bin purged.
Run Gather statistics to finish upgrade soon.

SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

PL/SQL procedure successfully completed.




Remove EM Database Control :-

Copy the $ORACLE_HOME/rdbms/admin/emremove.sql script from the target 19.3.0.0.0 ORACLE_HOME into the source 11.2.0.4.0 ORACLE_HOME.

[oracle@19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 14 20:56:29 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> @$ORACLE_HOME/emremove.sql

old 70: IF (upper('&LOGGING') = 'VERBOSE')
new 70: IF (upper('VERBOSE') = 'VERBOSE')

PL/SQL procedure successfully completed.


Remove OLAP Catalog :-

[oracle@19c ~]$ cd $ORACLE_HOME/olap/admin/
SQL> @catnoamd.sql
Synonym dropped.
……
Type dropped.
……
View dropped.
PL/SQL Procedure successfully completed.


Purge Recyclebin :-
SQL> purge recyclebin;
Recyclebin purged.


Run the preupgrade tool.

The preupgrade.jar Pre-Upgrade Information Tool is supplied with Oracle Database 19c.
This tool has reside in new oracle home.
/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar

oracle@19c ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar FILE DIR /u01/preupgrade/
==================
PREUPGRADE SUMMARY
==================
/u02/preupgrade/preupgrade.log
/u02/preupgrade/preupgrade_fixups.sql
/u02/preupgrade/postupgrade_fixups.sql
 
Execute fixup scripts as indicated below:
Before upgrade:
Log into the database and execute the preupgrade fixups
@/u01/preupgrade/preupgrade_fixups.sql
After the upgrade:
Log into the database and execute the postupgrade fixups
@/u01/preupgrade/postupgrade_fixups.sql
Preupgrade complete: 2019-03-14T21:28:55


[oracle@oraerptest19c bin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 17 08:43:28 2021
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> @/u02/preupgrade/preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script
Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2021-01-16 13:24:46
For Source Database:     PROD
Source Database Version: 11.2.0.4.0
For Upgrade to Version:  19.0.0.0.0
Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  purge_recyclebin          YES         None.
    2.  parameter_min_val         NO          Manual fixup recommended.
    3.  invalid_objects_exist     NO          Manual fixup recommended.
    4.  apex_manual_upgrade       NO          Manual fixup recommended.
    5.  case_insensitive_auth     NO          Manual fixup recommended.
    6.  mv_refresh                NO          Informational only.
                                              Further action is optional.
    7.  mv_refresh                NO          Informational only.
                                              Further action is optional.
    8.  pre_fixed_objects         YES         None.
    9.  tablespaces_info          NO          Informational only.
                                              Further action is optional.
   10.  parameter_deprecated      NO          Informational only.
                                              Further action is optional.
   11.  exf_rul_exists            NO          Informational only.
                                              Further action is optional.
   12.  min_archive_dest_size     NO          Informational only.
                                              Further action is optional.
   13.  rman_recovery_version     NO          Informational only.
                                              Further action is optional.


The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database is not ready
for upgrade.  To resolve the outstanding issues, start by reviewing

the preupgrade_fixups.sql and searching it for the name of

the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.
PL/SQL procedure successfully completed.
SQL> 


Now have to fix all recommendation
     1. parameter_min_val         NO          Manual fixup recommended.
     2. invalid_objects_exist     NO          Manual fixup recommended.
     3. apex_manual_upgrade       NO          Manual fixup recommended.
     4. case_insensitive_auth     NO          Manual fixup recommended.


1. parameter_min_val 

1.Parameter_min_val parameter value was 250 recommendation is 300

=========================

4. case_insensitive_auth

=========================

4.case_insensitive_auth parameter value was false recommendation is TURE

=======================

3. apex_manual_upgrade

========================

To upgrade to latest Application Express, download the latest version from the below link here..

https://www.oracle.com/tools/downloads/apex-downloads.html


Upgrading APEX Check the current APEX Version SQL> Select Comp_name, status, Version From Dba_Registry where comp_id='APEX'; COMP_NAME STATUS VERSION ---------------------------------------- ------------ ------------------------------ Oracle Application Express VALID 3.2.1.00.12


From the directory which holds the APEX unzipped software, connect to sqlplus as SYS user and run apexins.sql $ cd /tmp/apex $ sqlplus / as sysdba
SQL>@apexins.sql sysaux sysaux temp /i/

Thank you for installing Oracle Application Express 20.2.0.00.20 Oracle Application Express is installed in the APEX_200200 schema. The structure of the link to the Application Express administration services is as follows: http://host:port/ords/apex_admin The structure of the link to the Application Express development interface is as follows: http://host:port/ords timing for: Phase 3 (Switch) Elapsed: 00:01:01.77 timing for: Complete Installation Elapsed: 00:12:14.02 PL/SQL procedure successfully completed. [oracle@oraerptest19c apex]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Jan 26 06:36:45 2021 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select comp_name,status,version from dba_registry where comp_id='APEX'; COMP_NAME -------------------------------------------------------------------------------- STATUS VERSION ----------- ------------------------------ Oracle Application Express VALID 20.2.0.00.20 SQL>

=================================
2. invalid_objects_exist 
==========================
SQL> select substr(comp_name,1,30) comp_name,substr(comp_id,1,10) comp_id,substr(version,1,12) version, status from dba_registry;

COMP_NAME COMP_ID VERSION STATUS ------------------------------ ---------- ------------ ----------- OWB OWB 11.2.0.4.0 VALID Oracle Application Express APEX 3.2.1.00.12 VALID Spatial SDO 11.2.0.4.0 VALID Oracle Multimedia ORDIM 11.2.0.4.0 VALID Oracle XML Database XDB 11.2.0.4.0 VALID Oracle Text CONTEXT 11.2.0.4.0 VALID Oracle Expression Filter EXF 11.2.0.4.0 VALID Oracle Rules Manager RUL 11.2.0.4.0 VALID Oracle Workspace Manager OWM 11.2.0.4.0 VALID Oracle Database Catalog Views CATALOG 11.2.0.4.0 VALID Oracle Database Packages and T CATPROC 11.2.0.4.0 VALID COMP_NAME COMP_ID VERSION STATUS ------------------------------ ---------- ------------ ----------- JServer JAVA Virtual Machine JAVAVM 11.2.0.4.0 VALID Oracle XDK XML 11.2.0.4.0 VALID Oracle Database Java Packages CATJAVA 11.2.0.4.0 VALID OLAP Analytic Workspace APS 11.2.0.4.0 VALID Oracle OLAP API XOQ 11.2.0.4.0 VALID 16 rows selected. SQL>

SQL> select object_name,status from dba_objects where status = 'INVALID'; OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- test01_V INVALID Test01_SALES_PK          INVALID (Before drop any invalid object in database take copy of object(View, Table, Package body.....etc from toad)
SQL> conn test/test123 Connected. SQL> drop view Test01_v; view dropped. SQL> drop package body Test01_Sales_PK; Package body dropped. Below Invalid objects because you installed APEX new version...

SQL> select object_name,status from dba_objects where status = 'INVALID'; OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_CREATE_KEY_PACKAGE INVALID WWV_FLOW_FILES INVALID WWV_FLOW_TABSET_VIEW INVALID WWV_FLOW_TABSET_VIEW2 INVALID WWV_FLOW_BIW_APPBLDPREF INVALID WWV_FLOW_ASSERT INVALID WWV_CRYPT INVALID BIU_WWV_FLOW_SHARED_QUERIES INVALID BIU_WWV_FLOW_SQRY_SQL INVALID BIU_WWV_FLOW_REPORT_LAYOUTS INVALID WWV_BIU_FND_USER INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_BIU_FLOW_COLLECTION INVALID WWV_BIU_INSTALL_SCRIPTS INVALID WWV_BIU_INSTALL_CHECKS INVALID WWV_BIU_INSTALL_BUILD_OPT INVALID WWV_FLOW_WORKSHEET_ROW_TRIG INVALID WWV_FLOW_WORKSHEET_RPTS_TRIG INVALID VRN INVALID WWV_FLOW_ASFCOOKIE INVALID WWV_META_CLEANUP INVALID APEX_APPLICATION_FILES INVALID HTMLDB_APPLICATION_FILES INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_SW_PARSER INVALID WWV_RENDER_REPORT3 INVALID WWV_FLOW_API INVALID WWV_FLOW_GEN_API2 INVALID WWV_FLOW_DML INVALID WWV_FLOW_WORKSHEET INVALID WWV_FLOW_WORKSHEET_ATTACHMENT INVALID WWV_FLOW_WORKSHEET_FORM INVALID WWV_FLOW_CACHE INVALID WWV_FLOW_FORMS INVALID WWV_FLOW_FILE_MGR INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_FILE_API INVALID WWV_FLOW_IMAGE_API_PRIVATE INVALID WWV_FLOW_IMAGE_API INVALID WWV_FLOW_CSS_API_PRIVATE INVALID WWV_FLOW_CSS_API INVALID WWV_FLOW_HTML_API_PRIVATE INVALID WWV_FLOW_HTML_API INVALID WWV_FLOW_FND_USER_API INVALID WWV_FLOW_CUSTOM_AUTH_STD INVALID WWV_FLOW_IMP_PARSER INVALID HTMLDB_UTIL INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_THEME_MANAGER INVALID WWV_FLOW_SW_SCRIPT INVALID WWV_FLOW_SW_PARSER INVALID WWV_FLOW_SW_UPGRADE INVALID APEX_WORKSPACES INVALID APEX_WORKSPACE_FILES INVALID APEX_WORKSPACE_SQL_SCRIPTS INVALID WWV_MIG_ACC_LOAD INVALID WWV_MIG_FRM_UPDATE_APX_APP INVALID WWV_MIG_FRM_UTILITIES INVALID WWV_MIG_FRM_LOAD_XML INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_MIG_FRMMENU_LOAD_XML INVALID WWV_MIG_RPT_LOAD_XML INVALID WWV_MIG_FRM_OLB_LOAD_XML INVALID WWV_FLOW_MODEL_API INVALID WWV_FLOW_F4000_UTIL INVALID WWV_FLOW_REGION_LAYOUT INVALID WWV_FLOW_QUERY_BUILDER INVALID WWV_FLOW_SW_OBJECT_FEED INVALID WWV_FLOW_LOAD_DATA INVALID WWV_FLOW_LOAD_EXCEL_DATA INVALID WWV_FLOW_TAB_MGR INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_GENERATE_DDL INVALID WWV_FLOW_TABLE_DRILL INVALID WWV_FLOW_DOWNLOAD INVALID WWV_FLOW_COPY_PAGE INVALID WWV_FLOW_GENERATE_TABLE_API INVALID WWV_FLOW_GEN_HINT INVALID WWV_FLOW_XLIFF INVALID WWV_FLOW_CREATE_MODEL_APP INVALID WWV_FLOW_HELP INVALID WWV_FLOW_DATA_QUICK_FLOW INVALID WWV_FLOW_THEME_FILES INVALID OBJECT_NAME STATUS -------------------------------------------------------------------------------------------------------------------------------- ------- WWV_FLOW_SW_PAGE_CALLS INVALID WWV_FLOW_WIZ_CONFIRM INVALID WWV_FLOW_DRAG_LAYOUT INVALID WWV_FLOW_DATALOAD_XML INVALID WWV_FLOW_INSTALL_WIZARD INVALID 82 rows selected. SQL>

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2021-01-26 07:15:04 DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database, so this command may take DOC> a long time to execute on a database with a large number of invalid DOC> objects. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of invalid objects remaining. This DOC> number should decrease with time. DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); DOC> DOC> 2. Query returning the number of objects compiled so far. This number DOC> should increase with time. DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). DOC> On RAC, this number is added across all RAC nodes. DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they DOC> can migrate across RAC nodes. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1. Query showing jobs created by UTL_RECOMP DOC> SELECT job_name FROM dba_scheduler_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC> DOC> 2. Query showing UTL_RECOMP jobs that are running DOC> SELECT job_name FROM dba_scheduler_running_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC># PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2021-01-26 07:15:24 DOC> The following query reports the number of objects that have compiled DOC> with errors. DOC> DOC> If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC># OBJECTS WITH ERRORS ------------------- 0 DOC> The following query reports the number of errors caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC># ERRORS DURING RECOMPILATION --------------------------- 0 Function created. PL/SQL procedure successfully completed. Function dropped. ...(07:15:33) Starting validate_apex for APEX_200200 ...(07:15:34) Checking missing sys privileges ...(07:15:34) Re-generating APEX_200200.wwv_flow_db_version ... wwv_flow_db_version is up to date ...(07:15:34) Checking invalid public synonyms ...(07:15:34) Key object existence check ...(07:15:34) Setting DBMS Registry for APEX to valid ...(07:15:34) Exiting validate_apex PL/SQL procedure successfully completed. SQL> SQL> select object_name,status from dba_objects where status = 'INVALID'; no rows selected SQL>
=========================== Run DBUA upgrade Utility : ============================ Now run the dbua utility from 19c oracle_home location. [oracle@19c ~]$ export PATH=$ORACLE_HOME/bin:$PATH [oracle@19c ~]$ export ORACLE_SID=upg19c [oracle@19c ~]$ export ORACLE_HOME=/u02/softw-ora19c [oracle@19c ~]$ dbua

  • select the Upgrade Oracle Database option, then click the “Next” button.
If case Source database not showing you have add entry in /etc/oratab file.

$ORACLE_SID:$ORACLE_HOME:Y/N
PROD:/u02/app/oracle/product/11.2.0/dbhome_1:Y


  • If the prerequisite checks highlight any issues, take the appropriate action to fix the issues. If all the prerequisite checks are passed, click the “Next” button.



  • Amend the upgrade options if necessary, then click the “Next” button.


  • Select the recovery options for use in the event of an upgrade failure, then click the “Next” button.



  •  If the database is using the 11g listener and you need to upgraded, use existing listener or create new 19c listener



  • If you want configure EM database express enable it and provide port number or uncheck it.








I getting below error related to time zone...you can skip this configure after upgrade.






POST UPGRADE STEPS:

SQL> @/u02/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2021-01-21 05:14:51 For Source Database: PROD Source Database Version: 11.2.0.4.0 For Upgrade to Version: 19.0.0.0.0 Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 14. awr_dbids_present YES None. 15. old_time_zones_exist NO Manual fixup recommended. 16. dir_symlinks YES None. 17. post_dictionary YES None. 18. post_fixed_objects NO Informational only. Further action is optional. 19. upg_by_std_upgrd YES None. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered.

========================================= Time Zone upgrade 19c ========================================== SQL> select version from v$timezone_file; VERSION ---------- 14 <------------------ SQL> @/u02/softw-ora19c/rdbms/admin/utltz_upg_check Session altered. INFO: Starting with RDBMS DST update preparation. INFO: NO actual RDBMS DST update will be done by this script. INFO: If an ERROR occurs the script will EXIT sqlplus. INFO: Doing checks for known issues ... INFO: Database version is 19.0.0.0 . INFO: Database RDBMS DST version is DSTv14 . INFO: No known issues detected. INFO: Now detecting new RDBMS DST version. A prepare window has been successfully started. INFO: Newest RDBMS DST version detected is DSTv32 . INFO: Next step is checking all TSTZ data. INFO: It might take a while before any further output is seen ... A prepare window has been successfully ended. INFO: A newer RDBMS DST version than the one currently used is found. INFO: Note that NO DST update was yet done. INFO: Now run utltz_upg_apply.sql to do the actual RDBMS DST update. INFO: Note that the utltz_upg_apply.sql script will INFO: restart the database 2 times WITHOUT any confirmation or prompt. Session altered. SQL> @/u02/softw-ora19c/rdbms/admin/utltz_upg_apply.sql Session altered. INFO: If an ERROR occurs, the script will EXIT SQL*Plus. INFO: The database RDBMS DST version will be updated to DSTv32 . WARNING: This script will restart the database 2 times WARNING: WITHOUT asking ANY confirmation. WARNING: Hit control-c NOW if this is not intended. INFO: Restarting the database in UPGRADE mode to start the DST upgrade. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1761604576 bytes Fixed Size 8897504 bytes Variable Size 419430400 bytes Database Buffers 1325400064 bytes Redo Buffers 7876608 bytes Database mounted. Database opened. INFO: Starting the RDBMS DST upgrade. INFO: Upgrading all SYS owned TSTZ data. INFO: It might take time before any further output is seen ... An upgrade window has been successfully started. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1761604576 bytes Fixed Size 8897504 bytes Variable Size 419430400 bytes Database Buffers 1325400064 bytes Redo Buffers 7876608 bytes Database mounted. Database opened. INFO: Upgrading all non-SYS TSTZ data. INFO: It might take time before any further output is seen ... INFO: Do NOT start any application yet that uses TSTZ data! INFO: Next is a list of all upgraded tables: Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_PKG_APP_INSTALL_LOG" Number of failures: 0 Table list: "APEX_200200"."APEX$ARCHIVE_CONTENTS" Number of failures: 0 Table list: "APEX_200200"."APEX$ARCHIVE_HISTORY" Number of failures: 0 Table list: "APEX_200200"."APEX$ARCHIVE_LOG" Number of failures: 0 Table list: "APEX_200200"."APEX$ARCHIVE_PREF" Number of failures: 0 Table list: "APEX_200200"."APEX$ARCHIVE_HEADER" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_ISSUE_NOTIFICATIONS" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_WEB_SRC_MODULES" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_AUTOMATION_LOG2$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_AUTOMATION_MSG_LOG1$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_AUTOMATION_MSG_LOG2$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_AUTOMATION_LOG1$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_WORKSHEET_NOTIFY" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_FEEDBACK" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_FEEDBACK_FOLLOWUP" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_WEBSOURCE_SYNC_LOG1$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_WEBSOURCE_SYNC_LOG2$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_ACTIVITY_LOG1$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_ACTIVITY_LOG2$" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_DEBUG_MESSAGES" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_DEBUG_MESSAGES2" Number of failures: 0 Table list: "APEX_200200"."WWV_FLOW_AUTOMATIONS" Number of failures: 0 Table list: "APEX_200200"."WWV_QS_RANDOM_NAMES" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L" Number of failures: 0 INFO: Total failures during update of TSTZ data: 0 . An upgrade window has been successfully ended. INFO: Your new Server RDBMS DST version is DSTv32 . INFO: The RDBMS DST update is successfully finished. INFO: Make sure to exit this SQL*Plus session. INFO: Do not use it for timezone related selects. Session altered. SQL> select version from v$timezone_file; VERSION ---------- 32 <------------------------- 1 row selected. SQL> SQL> @/u02/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. 1 row selected. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2021-01-21 05:14:51 For Source Database: PROD Source Database Version: 11.2.0.4.0 For Upgrade to Version: 19.0.0.0.0 Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 14. awr_dbids_present YES None. 15. old_time_zones_exist YES None. 16. dir_symlinks YES None. 17. post_dictionary YES None. 18. post_fixed_objects NO Informational only. Further action is optional. 19. upg_by_std_upgrd YES None. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered. SQL> SQL> select VERSION,name,open_mode from v$instance,v$database; VERSION NAME OPEN_MODE ----------------- --------- -------------------- 19.0.0.0.0 PROD READ WRITE SQL> select * from v$timezone_file; FILENAME VERSION CON_ID -------------------- ---------- ---------- timezlrg_14.dat 32 0 SQL> select TZ_VERSION FROM REGISTRY$DATABASE; TZ_VERSION ---------- 32

FRM - 40010: Cannot read form from location.fmx Forms 12c

 

I am getting FRM - 40010 error when I try to access an .fmx file in Browser.

Oracle Forms : 12.2.1.3.0


Solution:


Go to default.env file location


[root@oraerptest config]# pwd

/u01/app/oracle/product/forms112/user_projects/domains/FormsReports/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config
FORMS_PATH variable move all your forms under ../../../rrl directory
[root@oraerptest config]# cat default.env
FORMS_PATH=/u01/app/oracle/product/forms112/fr_binaries/forms:/u01/app/oracle/product/forms112/instances/FRinst/FormsComponent/forms:/u01/app/oracle/product/forms112/fr_binaries/forms/rrl


Refresh the web logic services.



Tuesday, January 5, 2021

Restore Oracle DB & FMW Cloning (Part 4)

Configure Forms/Reports


The CONFIG_JVM_ARGS is set to speed things up if the system is low on entropy.

export CONFIG_JVM_ARGS="-Djava.security.egd=file:/dev/./urandom"

cd /u01/app/oracle/product/forms112/fr_binaries/bin

./config.sh

Below I have ignored the screens where you can sign up for security updates etc.

















If you press Save Installation Configuration you can save a file that contains this:

Type: Oracle Forms and Reports Installation
Configuration Options
  Middleware Home Location: /u01/app/oracle/product/forms112
  Oracle Home Location: /u01/app/oracle/product/forms112/fr_binaries
  Oracle Instance Location: /u01/app/oracle/product/forms112/instances/FRinst
  Oracle Instance: FRinst
  Domain Option: Create Domain
  Domain Name: FormsReports
  Domain Home: /u01/app/oracle/domains/FormsReports
  Domain Host Name: oraerptest.com
  Domain Port No: 7001
  User Name: weblogic
  Automatic Port Detection: false
  Administrator Console: http://oraerptest.com:7001/console
  EM Console: http://oraerptest.com:7001/em
  EMAgent URL: http://oraerptest.com:5155/emd/main
  Forms URL: http://oraerptest.com:8888/forms/frmservlet
  Reports URL: http://oraerptest.com:8888/reports/rwservlet
Normally when you are finished with configuring a FMW domain, no processes are running. Forms/Reports works a bit different, so here everything should be up and running.

Have a look.


ps -ef | grep oracle

While it is nice and helpful that the domain configuration wizard has configured the Node Manager and started everything up, it is not without problems. In the following sections we will verify the installation and fix a couple of problems.



Homes overview
There is a wealth of homes in this installation:

Application Home /u01/app/oracle/applications/FormsReports
Domain Home /u01/app/oracle/domains/FormsReports
Instance Home /u01/app/oracle/product/forms112/instances/FRinst
Middleware Home /u01/app/oracle/product/forms112
Oracle Common Home /u01/app/oracle/product/forms112/oracle_common
Oracle Home /u01/app/oracle/product/forms112/fr_binaries
Weblogic Server Home /u01/app/oracle/product/forms112/wlserver_10.3
Verifying the Installation

You should have 4 WebLogic processes, an Admin Server, two Managed Servers and a Node Manager.
Here is the output from a bash script that lists running WebLogic Servers and Node Managers.
################################################################################
# WebLogic Servers
# <owner>  <domain>  <server>  <pid>  <ports>
################################################################################
oracle  FormsReports  AdminServer     26915  7001
oracle  FormsReports  WLS_FORMS       3277   9001
oracle  FormsReports  WLS_REPORTS     27859  9002
 ################################################################################
# Node Managers
# <owner>  <mw_home>  <pid>  <port>
################################################################################
oracle  /u01/app/oracle/product/forms112  23674  5556
You should also have some system component processes.
cd /u01/app/oracle/product/forms112/instances/FRinst/bin

./opmnctl status -l
For example.

Processes in Instance: FRinst
------------------------+-------------------+-----+------+----------+-------+----------+-----
ias-component           | process-type      |  pid|status|      uid |memused|   uptime |ports
------------------------+-------------------+-----+------+----------+-------+----------+-----
emagent_FRinst          | EMAGENT           |18737|Alive |957811805 |  63884|215:32:43 |N/A
RptSvr_wintermute_FRinst| ReportsServerComp~|18736|Alive |957811804 |  63884|215:32:43 |N/A
ohs1                    | OHS               |18735|Alive |957811803 | 384152|215:32:43 |https:8889,https:8890,http:8888
Verify that you can use the different URLs (Screenshots):
Administration Server Console – http://oraerptest.com:7001/console
Enterprise Manager Console – http://oraerptest.com:7001/em
Enterprise Manager Agent – http://oraerptest.com:5155/emd/main
Oracle Forms – http://oraerptest.com:8888/forms/frmservlet
Oracle Reports – http://oraerptest.com:8888/reports/rwservlet

If you are not sure which ports are used check this file: /u01/app/oracle/product/forms112/fr_binaries/install/portlist.in
#Sun Feb 09 18:30:56 CET 2014
OPMN_LOCAL_PORT=6700
OHS_LISTEN_PORT=8888
WLS_FORMS_PORT=9001
OHS_SSL_PORT=8890
OHS_PROXY_PORT=8889
WLS_REPORTS_PORT=9002
OPMN_REQUEST_PORT=6702
OPMN_REMOTE_PORT=6701
DOMAIN_PORT=7001
NODE_MANAGER_PORT=-1
EMAGENT_PORT=5155

Summary
==========
Database Restored done
Web logic Installation done.
Forms/Report Installation done.
Form/Report Configuration done.
NOTE: Very Important Steps
Now it's time to Copy FORMS & Report from production and move to clone server..
Default.env define all paths...forms,report,java follow the below file.
Last steps Application side tnsnames.ora change according to enviroment.
[root@oraerptest config]# pwd
/u01/app/oracle/product/forms112/user_projects/domains/FormsReports/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config
[root@oraerptest config]# cat default.env
# default.env - default Forms environment file, Linux version
# 
# This file is used to set the Forms runtime environment parameters.
# If a parameter is not defined here, the value used will be that defined
# in the environment in which the WLS Managed Server was started.
# 
# NOTES
#    Configuration assitant will replace all the macro's with
#    the actual values.
# 
# 
# 
# 
ORACLE_HOME=/u01/app/oracle/product/forms112/fr_binaries
ORACLE_INSTANCE=/u01/app/oracle/product/forms112/instances/FRinst
# 
# 
# TNS Entry to locate the database
# 
TNS_ADMIN=/u01/app/oracle/product/forms112/instances/FRinst/config
# 
# 
# Search path for Forms applications (.fmx files, PL/SQL libraries)
# 
FORMS_PATH=/u01/app/oracle/product/forms112/fr_binaries/forms:/u01/app/oracle/product/forms112/instances/FRinst/FormsComponent/forms:/u01/app/oracle/product/forms112/fr_binaries/forms/rrl
# 
# 
# WebUtil config file path. WebUtil is available for download from OTN.
# 
WEBUTIL_CONFIG=/u01/app/oracle/product/forms112/instances/FRinst/config/FormsComponent/forms/server/webutil.cfg
# 
# Disable/remove this variable if end-users need access to the query-where
# functionality which potentially allows them to enter arbitrary SQL
# statements when in enter-query mode.
FORMS_RESTRICT_ENTER_QUERY=TRUE
# 
# Java class path
#   This is required for the Forms debugger
#   You can append your own Java code here)
# frmsrv.jar and ldapjclnt11.jar are required for
# the password expiry feature to work(2213140).
# 
CLASSPATH=/u01/app/oracle/product/forms112/fr_binaries/forms/j2ee/frmsrv.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/ldapjclnt11.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/debugger.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/ewt3.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/share.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/utj.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/zrclient.jar:/u01/app/oracle/product/forms112/fr_binaries/reports/jlib/rwrun.jar:/u01/app/oracle/product/forms112/fr_binaries/forms/java/frmwebutil.jar:/u01/app/oracle/product/forms112/fr_binaries/jlib/start_dejvm.jar:/u01/app/oracle/product/forms112/fr_binaries/opmn/lib/optic.jar:/u01/app/oracle/product/forms112/fr_binaries/forms/rrl:/u01/app/oracle/product/forms112/fr_binaries/reports/rrl
# 
# 
# The PATH setting is not required for Forms if the Forms executables are
# in <ORACLE_HOME>/bin.JDK/bin is also required for dejvm to be
# auto-started by frmweb
# 
PATH=/u01/app/oracle/product/forms112/fr_binaries/bin:/u01/app/oracle/product/forms112/fr_binaries/jdk/bin:/u01/app/oracle/product/forms112/fr_binaries/forms/rrl:/u01/app/oracle/product/forms112/fr_binaries/reports/rrl
# 
# Settings for Reports
# -------------------------------
# NOTE: This setting is only needed if Reports applications
# are called from Forms applications
# However, because of bug 2336698 where a report is started from
# a forms debugger session with an already running JVM, then
# the report's class path should also be included in the forms
# class path.
# We no longer need to set REPORTS_CLASSPATH as forms will
# always start the JVM before calling reports.
# 
# 
# 
# 
# 
# Settings for Forms tracing and logging
# -----------------------------------------------
# Note: By default tracing and logging directory is
# $ORACLE_INSTANCE/FormsComponent/forms/trace
# To change the trace directory this entry has to be uncommented and set to
# desired directory for tracing and logging
# 
#FORMS_TRACE_DIR=%ORACLE_INSTANCE%/FormsComponent/forms/trace
# 
# 
# Settings for Javascript events
# -----------------------------------------------
# Note: If this variable is set to false then the triggers and
# built-ins associated with javascript events are disabled
# 
#FORMS_ALLOW_JAVASCRIPT_EVENTS=TRUE
# 
# 
# 
# System settings
# ---------------
# You should not normally need to modify these settings
# 
# 
# Path for shared library objects
#   This is highly platform (if not machine) specific !  At install time
#   <percent>LD_LIBRARY_PATH<percent> should be replaced with the
#   actual value of the LD_LIBRARY_PATH environment variable (at install
#   time).  That should ensure we have the paths for such necessities as
#   the motif and X11 libraries.
# Explanations:
#   - Reports needs the path for libjava.so
#     (.../jre/lib/sparc)
#   - Forms needs two paths to the jre, for libjvm.so and libhpi.so
#   - In JDK 1.4.1 the location of libjvm.so is lib/sparc (there is no
#     classic directory) so we do not include the .../classic directory
#     below. There are other versions of libjvm.so (in directories server,
#     client and hotspot) but we will use the version in lib/sparc for now.
# 
LD_LIBRARY_PATH=/u01/app/oracle/product/forms112/fr_binaries/lib:/u01/app/oracle/product/forms112/fr_binaries/jdk/jre/lib/amd64:/u01/app/oracle/product/forms112/fr_binaries/jdk/jre/lib/amd64/server:/u01/app/oracle/product/forms112/fr_binaries/jdk/jre/lib/amd64/native_threads
# 
# 
# Setting to take care of signal-chaining facility offered by JVM 1.5
# Without this Forms/Reports integration could have issues on Unix/Linux
# 
LD_PRELOAD=/u01/app/oracle/product/forms112/fr_binaries/jdk/jre/lib/amd64/libjsig.so
[root@oraerptest config]# 



=======================================================================
Application Side
======================================================================
[root@oraerptest /]# cd /u01/app/oracle/product/forms112/instances/FRinst/config/
[root@oraerptest config]# ls
EMAGENT         FRComponent  OHS   reports                 ReportsToolsComponent
FormsComponent  JPS          OPMN  ReportsServerComponent  tnsnames.ora

[root@oraerptest config]# cat tnsnames.ora 
#
# sample tnsnames.ora file added by the Formsconfiguration assistant. 
#
#sample entry
#<ALIAS> = (DESCRIPTION =(ADDRESS_LIST =
#              (ADDRESS = (PROTOCOL = TCP)
#              (HOST = <HOST>)(PORT = <PORT)))
#              (CONNECT_DATA = (SID = <SID)))
#
#

PRODTEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oraerptest.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRODTEST)
    )
  )

=======================================================================
Database Side
=======================================================================
[oracle@oraerptest admin]$ cat listener.ora
# listener.ora Network Configuration File: /u02/oradb/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oraerptest.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u02/oradb

[oracle@oraerptest admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u02/oradb/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

PRODTEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oraerptest.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRODTEST)
    )
  )
[oracle@oraerptest admin]$ 
Now access the forms using below link
Oracle Forms – http://oraerptest.com:8888/forms/frmservlet


Refer:
https://theheat.dk/blog/?p=1983







Restore Oracle DB & FMW Cloning (Part 3)

 Installation Oracle Forms/Report on Clone Server

==========================================


Install Forms/Reports version 11.1.2.2.0

Unzip the install kits.

unzip ofm_frmrpts_linux_11.1.2.2.0_64_disk1_1of2.zip

unzip ofm_frmrpts_linux_11.1.2.2.0_64_disk1_2of2.zip


Start the installer.

cd Disk1

./runInstaller -jreLoc /u01/app/oracle/product/java_current/jre

Below I have ignored the screens where you can sign up for security updates etc.


Setting the inventory to /u01/app/oracle/oraInventory

Setting the group name to oinstall

Creating the Oracle inventory pointer file (/etc/oraInst.loc)

Changing permissions of /u01/app/oracle/oraInventory to 770.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.

The execution of the script is complete














Type: Oracle Forms and Reports Installation

  Installed Applications

          Forms

          Reports

          Forms Builder

          Reports Builder

  Installed System Components

          OHS

          EM Agent

cd /u01/app/oracle/product/forms112

find . -type f -exec sed -i "s/\/u01\/app\/oracle\/product\/jdk1.7.0_51/\/u01\/app\/oracle\/product\/java_current/g" {} \;