Вы находитесь на странице: 1из 8

By Sh aik Fare ed Upgrade Oracle Applications 11i Database to 10g R2 (10.2.0.

5)
In this post Im going to describe step-by-step how to upgrade an Oracle Apps 11i Database 9i (9.2.0.6) to 10g R2 (10.2.0.5). The upgrade was done on a single node environment installed on Red Hat Linux 4.

Task To Upgrade database from 9.2.0.6 to 10.2.0.5 for Oracle


Applications 11.5.10.2 Technical information: OS: RHL5.5 Apps version: 11.5.10.2 DB version: 9.2.0.6

Let us split this activity into 3 steps 1> Pre Upgrade 2> Upgrade 3> Post Upgrade Pre Upgrade Steps a> Apply the patches - 5478710, 4676589, 4653225 b> Create a new home for Oracle 10g c> Install Oracle Database 10g. (Software Only). d> Install the companion CD. e> Install 10.2.0.5 patch set f> Create nls/data/9idata directory g> Install 10g Listener Upgrade Steps a> Use manual steps or dbua to upgrade the db from 9.2.0.6 to 10.2.0.5. Manual upgrade is preferred in the industry Post Upgrade Steps a> On the application tier generate appsutil.zip file b> Copy the appsutil.zip file generated on application tier to the database tier inside 10g Oracle Home c> create a context file on database tier d> run autoconfig Pre Upgrade Steps 1> Apply patch 5478710 - TXK (FND & ADX) AUTOCONFIG ROLLUP PATCH O (December 2006) (Please read the readme.txt file for each patch before apply) su appltest (load 11i application env file) cd patch_top unzip 5478710 cd 5478710 cd fnd/patch/115/bin ./txkprepatchcheck.pl -script=ValidateRollup outfile=$APPLTMP/txkValidateRollup.html -appspass=apps

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/adalldefaults1.txt

logfile=adadmin.log menu_option=ENABLE_MAINT_MODE workers=4 export PATCH_TOP=/home/applmgr/patches Download the patches to /home/applmgr/patches and unzip them adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/adalldefaults1.txt logfile=u5478710.log patchtop=$PATCH_TOP/5478710 driver=u5478710.drv workers=8 # Takes 20 minutes # After applying the patch su appltest (11i env) $ADPERLPRG $AD_TOP/bin/admkappsutil.pl # This will create appsutil.zip in $APPL_TOP/admin/out Connect to database user su oratest (load 9i env) # Copy or FTP the appsutil.zip file to the <RDBMS ORACLE_HOME> cd $ORACLE_HOME (9i oracle home) cp /u02/TEST1/oracle/test1appl/admin/out/appsutil.zip . unzip -o appsutil.zip cd $ORACLE_HOME/appsutil/bin perl adbldxml.pl tier=db appsuser=apps appsuser=apps Starting context file generation for db tier.. Using JVM from /u02/TEST1/oracle/test1db/9.2.0/jre/1.4.2/bin/java to execute java programs.. APPS Password: apps The log file for this adbldxml session is located at: /d01/oracle/singlenode/visdb/9.2.0/appsutil/log/adbldxml_06270000.log Enter the value for Display Variable: Testdb:0.0 The context file has been created at: /u02/TEST1/oracle/test1db/9.2.0/appsutil/TEST1_testdb.xml Run autoconfig sh adconfig.sh Enter the full path to the Context file: /u02/TEST1/oracle/test1db/9.2.0/appsutil/TEST1_testdb.xml

1) Apply patch 4653225 - 10g release 2 ineroperability patch for 11.5.10 (imp readme.txt) a. Unzip patch file b. Cd 4653225 c. Run adpatch.sh

2) Upgrade Developer 6i to the latest patch set (already at patchset 19) If your patch set level is earlier then patch set 17, you should apply the latest certified patch set (nowadays 18). You can use my previous post (step-by-step style) Upgrading Developer 6i with Oracle Apps 11i. And Metalink Note 125767.1 Upgrading Developer 6i with Oracle Applications 11i. If you want you can start database and listener and application services so the users can work. Till you complete the installation of 10g.

3) Install 10g software Su oratest or check the owner of folder /9.2.0 Mkdir 10.2.0 (/u02/TEST1/oracle/test1db/10.2.0) a. mkdir [rdbms_oracle_home] for the new 10g software Chmod R 777 /10.2.0 (change the mode of the folder to executable) b. Export ORACLE_HOME=[rdbms_oracle_home] (disable the 9i env and enable the 10g.env file) c. Unzip installation file - 10201_database_linux32.zip in separate place eg: inside /StageR12 d. cd database e. Execute ./runInstaller with oracle user f. Select Advanced Installation g. Inventory directory location: /etc/oraInventory h. Select Installation Type: Enterprise Edition i. Home Details: Name: OraDB10g_home Path: /u02/TEST1/oracle/test1db/10.2.0 j. Fix all errors if exists found error in kernel parameters ( /etc/sysctl.conf) after adjustment runt the sysctl.conf file to load the new settings by the command ( sysctl p) k. Choose to Install Database Software only l. Click on install m. Run the following scripts with root n. Exit 4) Install Oracle Database products from Oracle 10g Companion CD a. Export ORACLE_HOME=[RDBMS_ORACLE_HOME] (disable the 9i env and enable the 10g.env file) b. Unzip installation file - 10201_companion_linux32.zip in separate place /StageR12 c. cd companion d. Execute ./runInstaller with oracle user Click Next e. Select Oracle Database Products 10.2.0.1.0 f. Name and Path like database software installation. Name: OraDB10g_home Path: /u02/TEST1/oracle/test1db/10.2.0 g. Fix errors if exists openmotif -2.2.3 (not found) Install openmotif-2.3.1-2.el5 then run (ldconfig v) h. Click on Install i. Exit 5) Install 10.2.0.5 patch set (enable 10g.env) a. Export ORACLE_HOME=/u02/TEST1/oracle/test1db/10.2.0 b. Export ORACLE_SID=TEST1 c. unzip installation file - p8202632_10205_LINUX d. cd Disk1 e. Execute ./runInstaller with oracle user

welcome screen click next f. Name and Path like in database installation Name: OraDB10g_home Path: /u02/TEST1/oracle/test1db/10.2.0 g. Specify Email-id if you want to inform or click next h. Click on Install i. Run root.sh while running root.sh from the location mentioned on the screen you must see screen while running to make sure that oracle_home and oracle_owner targets the 10g and it will ask for overwrite for 3 times so press Y to overwrite for 3 times. i. Exit installation Software Upgradation finish successfully till Here. Now start Database Upgradation

6) Create nls/data/9idata directory (inside 10g Load the 10g.env file) a. Execute: perl $ORACLE_HOME/nls/data/old/cr9idata.pl b. export ORACLE_HOME=/u02/TEST1/oracle/test1db/10.2.0 c. export ORA_NLS10=$ORACLE_HOME/nls/data/9idata (Or) Cp /u02/TEST1/oracle/test1db/10.2.0/nls/data/old/*.nlb $ORACLE_HOME/nls/data/9idata Check whether files exist in $ORACLE_HOME/nls/data/9idata Else copy the files

$ cd $ORACLE_HOME/nls/data/9idata $ cp $ORACLE_HOME/nls/data/*.nlb . $ cp $ORACLE_HOME/nls/data/old/*.nlb .


cd $ORACLE_HOME/nls/data/9idata ls check whether files exist (more than 500 files) Run 10g.env file 7) Apply R.D.B.M.S Patch p9726739_10205_LINUX.zip

2) Database Upgrade Steps


-- Takes nearly 10~20 hours for a normal upgrade su - oratest export ORACLE_HOME=/u02/TEST1/oracle/test1db/10.2.0 # connect to 9i database (load 9i env as we need to run this sql from 9i database) Start the 9i database and listener if stopped cp /u02/TEST1/oracle/test1db/10.2.0/rdbms/admin/utlu102i.sql /tmp cd /tmp sqlplus "/as sysdba" spool info.log @utlu102i.sql

spool off check the ouput of the file and adjust one by one # Manual upgrade the 9i database or Execute the Database Upgrade Assistant - $ORACLE_HOME/bin/dbua. I have followed the manual steps in this document Start 9i database and listener and login by database user Load 9i environment Fix the info.log file if anything need to modify in 9i database Eg: run the scripts to gather statistics for fast upgrade sqlplus "/as sysdba" exit Now stop the 9i listener and 9idatabase Run the 10g.env file to load 10g environment.

Copy the existing initTEST1.ora from 9i to 10g $ORACLE_HOME/dbs/initTEST1.ora cp /u02/TEST1/oracle/test1db/9.2.0/dbs/initTEST1.ora /u02/TEST1/oracle/test1db/10.2.0/dbs/initTEST1.ora Modify initTEST1.ora for the below parameters inside 10g (change all 9.2.0 to 10.2.0 except compatible=9.2.0) user_dump_dest = /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/udump background_dump_dest = /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/bdump core_dump_dest = /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/cdump utl_file_dir = /usr/tmp,/usr/tmp,/u02/TEST1/oracle/test1db/10.2.0/appsutil/outbound /TEST1_testdb,/usr/tmp - Copy the 9i environment file from 9i database to 10g database and modify inside 10g file cd $ORACLE_HOME pwd - /u02/TEST1/oracle/test1db/10.2.0 cp /u02/TEST1/oracle/test1db/9.2.0/TEST1_testdb.env . Modify all the values in 10g TEST1_testdb.env from 9.2.0 to 10.2.0 vi TEST1_testdb.env %s/9.2.0/10.2.0/g Add the below at the environment file to search and replace export ORA_NLS10=$ORACLE_HOME/nls/data/9idata Copy the 9i network folder to 10g to get tnsnames.ora and listener.ora cd $ORACLE_HOME/network/admin (10g home) copy /u02/TEST1/oracle/test1db/9.2.0/network/admin/Test1_testdb to $ORACLE_HOME/network/admin (10g home) - Copy the 9i admin folder to 10g to get dump folders cd $ORACLE_HOME (10g home) cp -R /u02/TEST1/oracle/test1db/9.2.0/admin/ . Now open the /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/listener.ora Change all 9.2.0 to 10.2.0

Create dummy file for Ifile=<location> by command Touch /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/Listener_ifile.ora Now open the /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/tnsnames.ora Change all 9.2.0 to 10.2.0 Create dummy file for Ifile=<location> by command (touch) Touch /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/tnsnames_ifile.ora or other name Confirm the path of TNS_ADMIN with the folders where u copied from 9i to 10g Echo $TNS_ADMIN

Now open the /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/sqlnet.ora Change all 9.2.0 to 10.2.0 Create dummy file for Ifile=<location> by command Touch /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/sqlnet_ifile.ora or other name

# Make the below changes inside 10g initTEST1.ora #optimizer_max_permutations #row_locking #undo_suppress_errors #max_enabled_roles #enqueue_resources #sql_trace streams_pool_size=50331648 large_pool_size = 8388608 session_max_open_files=20 optimizer_features_enable=10.2.0.3 compatible=9.2.0 (change to 10.2.0 after successful upgrade)

# Shutdown all the middle tier process on application tier, if they are started # Shutdown the 9i listener and 9i database. # Please do take a backup of database before running manual update or dbua # At this point in time all the services are down only 10g listener is up #Run 10g.env and start the ./addlnctl.sh start TEST1 (it must start in 10g mode)

Run 10g environment file cd $ORACLE_HOME . ./TEST1_testdb.env cd $ORACLE_HOME/bin sqlplus /as sysdba startup upgrade (if error related to optimizer_features_enable then change to 9.2.0 in 10g initTEST1.ora) and try again Select name from v$datafile; (to know the location of datafiles) Create sysaux tablespace CREATE TABLESPACE sysaux DATAFILE '/u02//TEST1/oracle/test1data/sysaux01.dbf' SIZE 2048M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE;

cd $ORACLE_HOME/rdbms/admin cat > r.sql SPOOL upgrade.log @catupgrd.sql SPOOL OFF SHUTDOWN IMMEDIATE STARTUP @utlrp.sql sqlplus /as sysdba @r.sql Took around 10 hours to complete manual upgrade

Post Upgrade Steps: Load 10g.env


Some more fixes i) Fix Korean lexers a. Connect to sqlplus as sysdba b. execute $ORACLE_HOME/ctx/sample/script/drkorean.sql ii) Run adgrants.sql a. Connect to sqlplus as sysdba b. Execute @$APPL_TOP/admin/adgrants.sql APPLSYS iii) Grant create procedure privilege on CTXSYS a. Connect to sqlplus with apps b. Execute @$AD_TOP/patch/115/sql/adctxprv manager CTXSYS manager is the SYSTEM password Added few steps i) Gather Statistics for SYS schema a. sqlplus /as sysdba b. shutdown immediate c. startup restrict d. @/oracle/test1appl/admin/adstats.sql e. shutdown f. startup ii) Recreate grants and synonym for apps a. Log in to server with appltest user b. Execute adadmin c. Choose -> Maintain Applications Database Entities menu d. Choose -> Re-create grants and synonyms for APPS schema d) On the application tier run the below command to generate appsutil.zip file. perl /u02/TEST1/oracle/test1appl/ad/11.5.0/bin/admkappsutil.pl Copy the appsutil.zip file generated on application tier to the database tier inside 10g Oracle Home. su - oratest cd $ORACLE_HOME cp /u02/TEST1/oracle/test1appl/admin/out/appsutil.zip . unzip appsutil.zip f) Next step is to create a context file on database tier. Run the below commands with appropriate values. This will generate context file on database tier. cd $ORACLE_HOME/appsutil/bin perl adbldxml.pl tier=db appsuser=apps appspasswd=apps

g) Once the context file is created on db tier, run autoconfig. cd $ORACLE_HOME/appsutil/bin ./adconfig.sh contextfile=/u02/TEST1/oracle/test1db/10.2.0/appsutil/TEST1_testdb.x ml appspass=apps AutoConfig completed successfully. The log file for this session is located at: /u02/TEST1/oracle/test1db/10.2.0/appsutil/log/TEST1_testdb/12130604/ adconfig.log

adjust the user oratest profile to disable 9i and enable 10g. restart all the database and application services and connect through explorer and check the database version.

Вам также может понравиться