Data Base Upgrade


Published on

DB upgrade 9i to 10g with DBUA

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Data Base Upgrade

  1. 1. K.Ravi Kanth
  2. 2. K.Ravi Kanth 1 . Introduction Purpose This document is a Migration Procedure document for upgrade of Oracle Applications to and database to 10.2.03 with 32 bit to 64 bit And Rup1 patch for HRMS Family Pack K. Scope Source Target Operating System Sun Solaris Sun Solaris (SPARC) (SPARC) V5.9 V5.9 Database version Oracle Application, Multi Multi Node Version Node
  3. 3. K.Ravi Kanth 4 Data Base Upgrade From to 4.1 Pre upgrade Task  Interpretability patch for 10.2.0 compatibility (4653225 Application patches language)  Take the inventory backup Location /var/opt/oracle  Take the backup of database links with scripts. Select * from dba_db_links;  Take the information of invalid objects. Select object_name, owner, object_type, status from dba_objects where status='INVALID';  Check dba_registry for Invalid Products SELECT comp_name, status, substr(version,1,10) as version from dba_registry; COMP_NAME VERSION STATUS ------------------------------ ---------- ----------- Oracle9i Catalog Views VALID Oracle9i Packages and Types VALID Oracle9i Real Application Clus INVALID ters Oracle XML Database VALID JServer JAVA Virtual Machine VALID Oracle XDK for Java VALID Oracle9i Java Packages VALID Oracle interMedia LOADED Spatial VALID Oracle Text VALID OLAP Analytic Workspace LOADED Oracle OLAP API LOADED OLAP Catalog VALID Oracle Data Mining VALID If XML DB is invalid, stop the upgrade. INVALID Product needs to be fixed prior to migration. “Real Application Cluster” can be ignored.
  4. 4. K.Ravi Kanth  System Table space requirements Add 2GB file to system table space  Check if product “ZPB” is installed Refer the following doc for finding the ZPB 404397.1  Install the base 10.2.0 software. Before installing Set ORACLE_HOME=NEW oracle home
  5. 5. K.Ravi Kanth
  6. 6. K.Ravi Kanth
  7. 7. K.Ravi Kanth
  8. 8. K.Ravi Kanth  Install Oracle Database 10g Products from the 10g Companion CD
  9. 9. K.Ravi Kanth
  10. 10. K.Ravi Kanth
  11. 11. K.Ravi Kanth
  12. 12. K.Ravi Kanth  Perform patch set installation tasks The ORACLE_HOME environment variable points to the new 10.2.0 Oracle home. Example: ORACLE_HOME= oracle_home The PATH environment variable includes $ORACLE_HOME/bin and the directory where the new perl executable is located (usually $ORACLE_HOME/perl/bin). Example: PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin The LD_LIBRARY_PATH environment variable includes $ORACLE_HOME/lib. Example: Export LD_LIBRARY_PATH =$ORACLE_HOME/lib The PERL5LIB environment variable points to the directories where the new perl libraries are located (usually $ORACLE_HOME/perl/lib/<perl version> and $ORACLE_HOME/perl/lib/site_perl/<perl version>)
  13. 13. K.Ravi Kanth Example: Export PERL5LIB =$ORACLE_HOME/perl/lib/5.6.1
  14. 14. K.Ravi Kanth
  15. 15. K.Ravi Kanth
  16. 16. K.Ravi Kanth
  17. 17. K.Ravi Kanth  Create nls/data/9idata directory Go to ORCALE_HOME cd $ORACLE_HOME/nls/data/old/ Perl ORA_NLS10= ORCALE_HOME /nls/data/9idata  Apply additional RDBMS patches (5892355) Problem in connecting sqlplus When we are connecting ORACLE_HOME, we are getting insufficient privileges problem. Solution: we modified $ORACLE_HOME/rdbms/lib/config.s file . The group name was incorrect.we change dba group to correct group (dbahr). Then we relink using $ make -f config.o ioracle  Apply Additional patches for bug fixes
  18. 18. K.Ravi Kanth For the following error in up gradation task we need to apply these patches (ORA-06512: at "SYS.UPGRADE_SYSTEM_TYPES_FROM_920", line 1) 5755471, Patch 5871314 and Patch 5892355 4.2 Upgrade Task Cd $ORACLE_HOME/bin/ Run dbua using ./dbua
  19. 19. K.Ravi Kanth
  20. 20. K.Ravi Kanth We are getting below errors.
  21. 21. K.Ravi Kanth ORA-06512: at "SYS.UPGRADE_SYSTEM_TYPES_FROM_920", line 1 Apply database patches on for the bug: ORA-00600: internal error code, arguments: [22635], [], [], [], [], [], [], [] Patches: 5755471, Patch 5871314 and Patch 5892355 ERROR at line 1: ORA-14501: object is not partitioned ORA-06512: at "SYS.DBMS_LOGMNR_D", line 232 ORA-06512: at line 32 Bug 4651168 - DBMS_LOGMNR_D.SET_TABLESPACE('SYSAUX') FAILS DURING UPGRADE TO ORA-1450 Usually Primary Key (PK) are created as disabled and they can be altered from SYSTEM to SYSAUX tablespace without problems but it seems like some PK were enabled and they remain enabled during upgradation to 10.2.x. If you use LogMiner feature, all of primary key in LogMiner tables should be disabled:  List the enabled primary key in LogMiner tables with SQL> select owner, constraint_name, constraint_type, status, table_name from dba_constraints where constraint_type = 'P' and table_name in (select table_name from dba_tables where table_name like '%LOGMNR%' and partitioned = 'YES') order by 5,2;  Disable each primary key by SQL> alter table system.<table name> disable primary key;  Execute procedure manually SQL> dbms_logmnr_d.set_tablespace('SYSAUX')  Enable Primary key that were disabled in Step 2.  If you have not ignored the error and upgrade has been cancelled, retry upgrade.
  22. 22. K.Ravi Kanth 4.3 Post Upgrade Task  Check the status of components at DBA_REGISTRY COMP_NAME VERSION STATUS ----------------------------------- ---------- ---------- Oracle Data Mining VALID Oracle XML Database VALID OLAP Catalog VALID Oracle Text VALID Spatial VALID Oracle interMedia VALID Oracle Database Catalog Views VALID Oracle Database Packages and Types UPGRADED Oracle Real Application Clusters INVALID JServer JAVA Virtual Machine VALID Oracle XDK VALID Oracle Database Java Packages VALID OLAP Analytic Workspace VALID Oracle OLAP API VALID  Configuring 10.2.0 ORACLE_HOME Create APPSUTIL ( Part of DB Tier adconfig) Log in to the Mid Tier as appsuser Create file Log in to the APPL_TOP environment (source the environment file) Create file $ perl $AD_TOP/bin/ This will create in $APPL_TOP/admin/out Copy this new file to our staging area for this customer: $ cp $APPL_TOP/admin/out/ to NEW_ORACLE_HOME As or#LOWER_SID# on all DB tiers , copy(or SCP or FTP) the created above under Unzip under ORACLE_HOME
  23. 23. K.Ravi Kanth $ cd $ORACLE_HOME $ unzip -o $ cd $ORACLE_HOME $ mkdir ORACLE_HOME/outbound Copy $TNS_ADMIN from 9.2.0 to 10.2.0 oracle home Copy context file from 9.2.0 to 10.2.0 oracle home Create new pfile from spfile and change the required parameters  AutoConfig on DB Tier Create XML file in db tier .Appsutil has already been unzipped in earlier step. Be sure to source the 10.2.0 environment file cd $ORACLE_HOME/appsutil/bin perl tier=db appsuser=APPS appspasswd=<APPSpwd>  Start listener $ lsnrctl start $ORACLE_SID  Check for oracle 64 bit login on DB Tier cd $ORACLE_HOME/bin $file oracle  Count the invalids after the upgrade select owner, object_type, object_name from dba_objects where status='INVALID' SQL>@?/rdbms/admin/utlrp  Gather statistics for SYS schema Gather the statistics for apps and sys level On 10g, it is mandatory to collect stats for sys. Run the script $APPL_TOP/admin/adstats.sql adstats.sql
  24. 24. K.Ravi Kanth  Re-create custom database links  Re-create grants and synonyms adadmin  Maintain Applications Database Entities  Re-create grants and synonyms for APPS schema  Compile the Apps schema adadmin  Compile/Reload Applications Database Entities  Compile APPS schema