Testdb_upgrade9ito10g

download Testdb_upgrade9ito10g

of 8

Transcript of Testdb_upgrade9ito10g

  • 8/2/2019 Testdb_upgrade9ito10g

    1/8

    By Shaik Fareed

    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 OracleApplications 11.5.10.2

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

    Let us split this activity into 3 steps

    1> Pre Upgrade2> Upgrade3> Post Upgrade

    Pre Upgrade Stepsa> Apply the patches - 5478710, 4676589, 4653225b> Create a new home for Oracle 10gc> Install Oracle Database 10g. (Software Only).d> Install the companion CD.e> Install 10.2.0.5 patch setf> Create nls/data/9idata directoryg> Install 10g Listener

    Upgrade Steps

    a> Use manual steps or dbua to upgrade the db from 9.2.0.6 to10.2.0.5. Manual upgrade is preferred in the industry

    Post Upgrade Stepsa> On the application tier generate appsutil.zip fileb> Copy the appsutil.zip file generated on application tier to the

    database tier inside 10g Oracle Homec> create a context file on database tierd> 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_topunzip 5478710cd 5478710cd fnd/patch/115/bin./txkprepatchcheck.pl -script=ValidateRollup -outfile=$APPLTMP/txkValidateRollup.html -appspass=apps

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

    http://oracle-apps-dba.blogspot.com/2007/09/upgrade-oracle-applications-11i.htmlhttp://oracle-apps-dba.blogspot.com/2007/09/upgrade-oracle-applications-11i.htmlhttp://oracle-apps-dba.blogspot.com/2007/09/upgrade-oracle-applications-11i.htmlhttp://oracle-apps-dba.blogspot.com/2007/09/upgrade-oracle-applications-11i.htmlhttp://oracle-apps-dba.blogspot.com/2007/09/upgrade-oracle-applications-11i.html
  • 8/2/2019 Testdb_upgrade9ito10g

    2/8

    logfile=adadmin.log menu_option=ENABLE_MAINT_MODE workers=4

    export PATCH_TOP=/home/applmgr/patchesDownload the patches to /home/applmgr/patches and unzip them

    adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/adalldefaults1.txtlogfile=u5478710.log patchtop=$PATCH_TOP/5478710 driver=u5478710.drvworkers=8# Takes 20 minutes

    # After applying the patchsu appltest (11i env)$ADPERLPRG $AD_TOP/bin/admkappsutil.pl

    # This will create appsutil.zip in $APPL_TOP/admin/out

    Connect to database usersu oratest (load 9i env)

    # Copy or FTP the appsutil.zip file to the cd $ORACLE_HOME (9i oracle home)cp /u02/TEST1/oracle/test1appl/admin/out/appsutil.zip .unzip -o appsutil.zipcd $ORACLE_HOME/appsutil/binperl 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 toexecute java programs..APPS Password: appsThe 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.0The context file has been created at:

    /u02/TEST1/oracle/test1db/9.2.0/appsutil/TEST1_testdb.xmlRun autoconfigsh adconfig.shEnter 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 fileb. Cd 4653225c. 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.1Upgrading Developer 6i with OracleApplications 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.

    http://oracle-apps-dba.blogspot.com/2007/07/upgrading-developer-6i-with-oracle-apps.htmlhttp://oracle-apps-dba.blogspot.com/2007/07/upgrading-developer-6i-with-oracle-apps.htmlhttp://oracle-apps-dba.blogspot.com/2007/07/upgrading-developer-6i-with-oracle-apps.htmlhttps://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=125767.1http://oracle-apps-dba.blogspot.com/2007/07/upgrading-developer-6i-with-oracle-apps.html
  • 8/2/2019 Testdb_upgrade9ito10g

    3/8

    3) Install 10g softwareSu oratest or check the owner of folder /9.2.0Mkdir 10.2.0 (/u02/TEST1/oracle/test1db/10.2.0)

    a. mkdir [rdbms_oracle_home] for the new 10g softwareChmodR 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 /StageR12d. cd databasee. Execute ./runInstaller with oracle userf. Select Advanced Installationg. 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 ( sysctlp)

    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 Nexte. 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 (ldconfigv)

    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

  • 8/2/2019 Testdb_upgrade9ito10g

    4/8

    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.plb. 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/9idataElse 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/9idatals 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 - oratestexport 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 stoppedcp /u02/TEST1/oracle/test1db/10.2.0/rdbms/admin/utlu102i.sql /tmpcd /tmpsqlplus "/as sysdba"spool [email protected]

  • 8/2/2019 Testdb_upgrade9ito10g

    5/8

    spool offcheck the ouput of the file and adjust one by one# Manual upgrade the 9i database or Execute the Database UpgradeAssistant - $ORACLE_HOME/bin/dbua.I have followed the manual steps in this document

    Start 9i database and listener and login by database userLoad 9i environmentFix the info.log file if anything need to modify in 9i databaseEg: run the scripts to gather statistics for fast upgradesqlplus "/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 exceptcompatible=9.2.0)user_dump_dest =

    /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/udumpbackground_dump_dest =

    /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/bdumpcore_dump_dest =

    /u02/TEST1/oracle/test1db/10.2.0/admin/TEST1_testdb/cdumputl_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 filecd $ORACLE_HOMEpwd - /u02/TEST1/oracle/test1db/10.2.0cp /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/gAdd the below at the environment file to search and replace

    export ORA_NLS10=$ORACLE_HOME/nls/data/9idataCopy the 9i network folder to 10g to get tnsnames.ora and

    listener.oracd $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 folderscd $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.oraChange all 9.2.0 to 10.2.0

  • 8/2/2019 Testdb_upgrade9ito10g

    6/8

    Create dummy file for Ifile= by commandTouch /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.oraChange all 9.2.0 to 10.2.0Create dummy file for Ifile= by command (touch)Touch /u02/TEST1/oracle/test1db/10.2.0/network/admin/TEST1_testdb/tnsnames_ifile.ora or other nameConfirm 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.oraChange all 9.2.0 to 10.2.0Create dummy file for Ifile= by commandTouch /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=50331648large_pool_size = 8388608session_max_open_files=20optimizer_features_enable=10.2.0.3compatible=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 filecd $ORACLE_HOME. ./TEST1_testdb.envcd $ORACLE_HOME/binsqlplus /as sysdba

    startup upgrade(if error related to optimizer_features_enable then change to 9.2.0 in 10g initTEST1.ora) and try againSelect name from v$datafile; (to know the location of datafiles)

    Create sysaux tablespaceCREATE TABLESPACE sysaux DATAFILE '/u02//TEST1/oracle/test1data/sysaux01.dbf'SIZE 2048M REUSEEXTENT MANAGEMENT LOCALSEGMENT SPACE MANAGEMENT AUTOONLINE;

  • 8/2/2019 Testdb_upgrade9ito10g

    7/8

    cd $ORACLE_HOME/rdbms/admincat > r.sqlSPOOL [email protected] OFFSHUTDOWN [email protected] /as [email protected]

    Took around 10 hours to complete manual upgrade

    Post Upgrade Steps: Load 10g.envSome more fixesi) Fix Korean lexersa. Connect to sqlplus as sysdba

    b. execute $ORACLE_HOME/ctx/sample/script/drkorean.sqlii) Run adgrants.sqla. Connect to sqlplus as sysdbab. Execute @$APPL_TOP/admin/adgrants.sql APPLSYSiii) Grant create procedure privilege on CTXSYSa. Connect to sqlplus with appsb. Execute @$AD_TOP/patch/115/sql/adctxprv manager CTXSYSmanager is the SYSTEM passwordAdded few stepsi) Gather Statistics for SYS schemaa. sqlplus /as sysdbab. shutdown immediatec. startup restrict

    d. @/oracle/test1appl/admin/adstats.sqle. shutdownf. startupii) Recreate grants and synonym for appsa. Log in to server with appltest userb. Execute adadminc. Choose -> Maintain Applications Database Entities menud. Choose -> Re-create grants and synonyms for APPS schemad) On the application tier run the below command to generateappsutil.zip file.perl /u02/TEST1/oracle/test1appl/ad/11.5.0/bin/admkappsutil.plCopy the appsutil.zip file generated on application tier to thedatabase tier inside 10g Oracle Home.

    su - oratestcd $ORACLE_HOMEcp /u02/TEST1/oracle/test1appl/admin/out/appsutil.zip .unzip appsutil.zip

    f) Next step is to create a context file on database tier. Run thebelow commands with appropriate values. This will generate context fileon database tier.cd $ORACLE_HOME/appsutil/binperl adbldxml.pl tier=db appsuser=apps appspasswd=apps

  • 8/2/2019 Testdb_upgrade9ito10g

    8/8

    g) Once the context file is created on db tier, run autoconfig.cd $ORACLE_HOME/appsutil/bin./adconfig.shcontextfile=/u02/TEST1/oracle/test1db/10.2.0/appsutil/TEST1_testdb.xml appspass=appsAutoConfig 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.