You are on page 1of 6

Database up gradation from 10g ( 10.2.0.4 ) to 11g ( 11.1.0.

7) in Oracle
Application 11i

Step 1 : Down Load the Database Software from (edelivery.oracle.com/ or.


http://www.oracle.com/tehnology/software/products/database/index.html

1. 11g Database ( Base versions 11.1.0.6) --- V14215-01_1of2.zip


2. Oracle Database 11g Examples ( formerly Companion ) ---- aix.ppc64_11gR1_examples.zip
3. 11g Database (11.1.0.7) Patch set ---- p6890831_111070_AIX5L_1of2.zip

Step 2: Stop the Oracle Application services , and Shutdown the Database and Db Listener.

Take Full Cold Backup.

Step 3: Create a New 11g Database Home :

/B01/oracle $ mkdir test11gdb

Step 4 : Install the 11g Database only Software only.

$ export Oracle_Base = /B01/oracle/test11gdb …. Export Oracle_SID = TESTNW

cd /t01/clone/others/patches/upgrd_db11g/database_11g/database$

$ ./runInstaller -invPtrLoc /B01/oracle/test11gdb /oraInst.loc

Note: For oracle Inventory Location

Create OraInst.loc file in the ( at New oracle Base /B01/oracle/test11gdb location)

Create directory .. mkdir oraInventory

$ Vi oraInst.loc

Inventory_loc = /B01/oracle/test11gdb/oraInventory

Inst_group = dba

**** next… next… next. ------------------------------------------------------------------------------------------------

Oracle Base Location : /B01/oracle/test11gdb

Oracle Home : /B01/oracle/test11gd/product/11.1.0/db_1 ----------- system will create.

Install ** Software Only **** …… Finish … The Oracle 11g base verion 11.1.0.6 will installed
Step 5: Install the Oracle Database 11g Examples ( formerly Companion )

In the Default New Oracle_home ( /B01/oracle/test11gdb/product/11.1.0/db_1 ).

Source Oracle_home / Oracle Sid

$ cd /t01/clone/others/patches/upgrd_db11g/11g_Example_cd_companion/examples

$ ./runInstaller

**** next … next … some of the products like /ctx/sample directory will create. ---- finsh

------------------------------------------------------------------------------------------------------------------------------

Step 6: Install the 11g Database (11.1.0.7) Patch set

$ cd /t01/clone/others/patches/upgrd_db11g/11gPatchset/Disk1

$ ./runInstaller -invPtrLoc /B01/oracle/test11gdb /oraInst.loc

--------- next … next …. Next… the patchset will installed i.e 11.1.0.7

Step 7 : Create nls/data/9idata diretory.

$ORACLE_HOME/nl/data/old/cr9idata.pl -----created

$Oracle_home/nls/data/9idata directory.

Step 8 . Apply additional 11.1.0.7 RDBMS Patches. As per the 452783.1 Metalink ID

6530141 , 6815733 , 6972189 , 7111245 , 7253531 , 7295298 , 7486407 , 8940108

9743057.
Opatch utility for apply Database patches.

Create one environment file :

bash-3.00$ cat s.env

export ORACLE_HOME=/B01/oracle/test11gdb/11.1.0/product/11.1.0/db_1
export ORACLE_SID=TESTNW
export TNS_ADMIN=/B01/oracle/test11gdb/11.1.0/product/11.1.0/db_1/network/admin/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/bin/OPatch:$PATH
export ORACLE_BASE=/B01/oracle/test11gdb/11.1.0

bash-3.00$

-bash-3.00$./opatch version --- find the opatch version

bash-3.00$./opatch apply < DB Patch Location / Patch Direcotry>

$ opatch apply /B01/patches/DB_patches/ 6530141 ------ for apply the patch

opatch rollback -id <Patch Number> -- roll back the applied patch

$ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc


/slot/ems2029/oracle/db/tech_st/11.1.0/oraInst.loc

$./opatch lsinventory ------ for find out Patch applied or not.

****** any inventory corruption error


opatch lsinventory –detail

Note:
For Oracle Universal Installer version 10.2.0.2.0 and above, you will have the following
scripts in Oracle home to recover from Oracle home inventory corruption:

 detachHome.bat / detachHome.sh: Use this script if the Oracle home is corrupted


or needs to be updated.

 attachHome.bat / attachHome.sh: Use this script if the Oracle home needs to be


added to the inventory.
If Problem Not solved

** Move the /etc/Orainventory Directory …for backup.

Create /etc/oraInventory directory …

bash-3.00$ pwd … at 11g New home. We can find *.sh files.

/B01/oracle/test11gdb/11.1.0/product/11.1.0/db_1/oui/bin

-rwxrwxr-x 1 oradev dba 213 Jan 29 12:08 detachHome.sh

-rwxrwxr-x 1 oradev dba 306 Jan 29 12:08 attachHome.sh

And run $sh attachHome.sh -------- for new Oracle_home add in New inventory

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

Step 9 : For Database Upgradation – Run Pre –Upgrade tool Process. Run utlu111i.sql from Old _
Oracle Home (10g)

a). Copy the utlu111i.sql (/B01/oracle/test11gdb/product/11.1.0/db_1/rdbms/admin) to

/tmp Directory.

b). Stop all the services/ Tns listener / any other in the Instance.

c). Source the enviro nment at Old_Oracle _Home ( /B01/oracle/test10gdb/10.2.0).

$ sqlplus ‘/as sysdba’

Sql> startup ---------- startup the OLD DB from Old_oracle HOME

Sql> spool upgrade_info.log

Sql> @/tmp/utilu11i.sql

Sql> spool off

Sql> shut immediate;

*** open upgrade_info.log file and take correct action plan.


Step 10. Create new Database Listener

$ source the 11g New Database Home

$./netca

Note : ** Give As per the OLD Listener … Same Lisener name : TESTNW … Same Port : 1571

Step 11: Check the Time zone version .. compatibilities

Step 12: Start the Upgradation.

Source the New Database Home . and SID ,Path … New Listener should be up.

$ cd ORACLE_HOME/bin

$./dbua
 chose … Database Don’t Move.
 Next… next… password : DBSNMP..SYSMAN -> pitti ……………….. FINISH.

------------- OR ----------------

For manual upgrade without use ./dbua


Shut down the database:

SQL> SHUTDOWN

Enter the following SQL*Plus commands:

SQL> STARTUP UPGRADE

SQL> SPOOL patch.log

SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF

SQL> SHUTDOWN IMMEDIATE

SQL> STARTUP

************* Upgraded from source 10.2.0.4 to Target 11.1.0.7 **************

You might also like