You are on page 1of 12

10204 to 10205 Upgrade Steps

Shut down Oracle database Login to the system as software owner (oracle user) Stop listeners if they are running from Oracle Home. If RAC, stop listener on each node.

Stop database on all nodes.

Run slibclean if the OS is AIX (4 to 5 times) Backup System Backup ORACLE_HOME which are being upgraded to 10205 Ex: /oracle/product/10.2.0 Backup Inventory Locations: P.S: To find inventory location, follow the steps mentioned. Confirm that, we have latest valid level 0 backup for the database. Software upgrade

Unzip the files to staging locations

Run the setdb_<file> for any 10g databases Open the script install_db_patchset_10205.sh and edit the variable SOFTWAREDIR to <stage_loc> Run the script: install_db_patchset_10205.sh After successful completion of Step 14, run the root.sh as root user Database Upgrade Steps Start the listener (follow this step only if Step 5 was run). If RAC, start the listener on each node Single instance database Login as sys user as with sysdba privs RAC Database (only on one node)

Login as sys user as with sysdba privs

Set the cluster_database parameter to False

Shut down the instance Common steps for Single instance or Rac Database Start the database in upgrade mode Run the upgrade script. Review the upgrade_10205.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script Shut down the database and restart Recompile all the invalid packages Run the following command to check the status of all the components after the upgrade: Only for Rac Database Set the CLUSTER_DATABASE initialization parameter to TRUE Restart the database

10204 to 10205 Upgrade Steps


Shut down Oracle database $ su - oracle $ lsnrctl stop LISTENER_NAME If RAC srvctl stop database -d $ORACLE_DB If Non RAC sqlplus / as sysdba shut immediate; $ sudo /usr/sbin/slibclean Backup System $cd /oracle/product/ $ tar -cvf /backup_location/10204_binary.tar 10.2.0/ $ cat /oracle/product/10.2.0/oraInst.loc $ tar -cvf /backup_location/ora_inventory.tar /crs/product/oraInventory Follow the backup checking procedure Software upgrade $ $ $ $ $ cp /<software_lib>/p8202632_10205_AIX64-5L_1of2.zip /<stage_loc>/ cp /<software_lib>/p8202632_10205_AIX64-5L_2of2.zip /<stage_loc>/ cd /stage_loc/ unzip p8202632_10205_AIX64-5L_1of2.zip unzip /<software_lib>/p8202632_10205_AIX64-5L_2of2.zip

$ . Setdb_db03pdv $ echo $ORACLE_HOME $ ./install_db_patchset_10205.sh 10 <node1> <node2> <node3> $ sudo /oracle/product/10.2.0/root.sh Database Upgrade Steps $ lsnrctl start LISTENER_NAME Single instance database $. setdb_db03pdv $ sqlplus / as sysdba SQL> RAC Database (only on one node) $. setdb_db03pdv $sqlplus / as sysdba SQL> startup nomount; SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

SQL> shut immediate; Common steps for Single instance or Rac Database SQL> startup upgrade; SQL> spool upgrade_10205.log SQL> @?/rdbms/admin/catupgrd.sql SQL> spool off; Component Oracle Database Server Oracle Workspace Manager SQL> shut immediate; SQL> startup SQL>@?/rdbms/admin/utlrp.sql SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY; Only for Rac Database SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile; SQL> shutdown immediate; SQL> exit; $ srvctl start database -d $ORACLE_DB $ srvctl start service -d $ORACLE_DB Total Status VALID VALID Version 10.2.0.5.0 10.2.0.5.0 HH:MM:SS 00:08:02 00:00:35

Time in Mins

1 2

15 5 2

10

1 20 3

5 10

5 5

1 3 100 1hr, 40m

Downgrade Steps (10205 to 10204)


Backup following files
Take a backup of the following file in 10.2.0.5 Oracle home directory For RAC databases only Log in to the database as the SYS user with SYSDBA privileges Set the CLUSTER_DATABASE initialization parameter to FALSE Stop the database For Single Instance only Log in to the database as the SYS user with SYSDBA privileges and shut down the database:

Common steps for Single instance or Rac Database


Startup the database in downgrade mode. If RAC start only one instance Run cardwngrd.sql script Shutdown the instance Review the downgrade.out file for errors Restore the Oracle10g installation that we backed up before applying the patch set Restore the Central Inventory (see /etc/oraInst.loc) that we backed up before applying the patch set After restoring the original Oracle home, copy the saved version of catrelod.sql script into the restored Oracle home rdbms/admin directory Login to the database as sys with SYSDBA privs Start the database in downgrade mode. Run the catrelod.sql script Review the catrelod.out file for errors Start the database and recompile the remaining invalid objects Cross-check the status of installed components with the following script For RAC databases only Set the CLUSTER_DATABASE initialization parameter to TRUE

Shutdown the instance and start the database

Downgrade Steps (10205 to 10204)


Backup following files
$ cp ORACLE_HOME/rdbms/admin/catrelod.sql /<backup_location>/ $ cp ORACLE_HOME/network/admin/tnsnames.ora /<backup_location>/ For RAC databases only $ sqlplus / as sysdba SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile; $ srvctl stop service -d $ORACLE_DB $ srvctl stop database -d $ORACLE_DB For Single Instance only $ sqlplus / as sysdba SQL> shut immediate; SQL> exit; $ sqlplus / as sysdba SQL> startup downgrade SQL> SPOOL downgrade.out SQL> @?/rdbms/admin/catdwgrd.sql SQL> SPOOL OFF SQL> shut immediate; SQL> exit; $ cat downgrade.out $ cd /oracle/product/ $ rm -rf 10.2.0/ $ tar -xvf /<backup_location>/10204_binary.tar $ cd /crs/product/ $ rm -rf oraInventory/ $ tar -xvf /<backup_location>/ora_inventory.tar $ cp /<backup_location>/catrelod.sql /oracle/product/10.2.0/rdbms/admin $ sqlplus / as sysdba SQL> STARTUP DOWNGRADE SQL> SQL> SQL> SQL> SPOOL catrelod.out @?/rdbms/admin/catrelod.sql SPOOL OFF SHUTDOWN IMMEDIATE

Time in Mins

1 1 2

Common steps for Single instance or Rac Database


4 10 5

15

2 1 3 10

$ cat catrelod.out SQL> STARTUP SQL> @?/rdbms/admin/utlrp.sql SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY; For RAC databases only SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile

5 1 1

SQL> SHUTDOWN SQL> EXIT $ srvctl start database -d $ORACLE_DB $ srvctl start service -d $ORACLE_DB Total

5 75 1 hr 15 m

Apply PSU on 10205


Upgrade Opatch Copy the latest Opatch to ORACLE_HOME unzip the Opatch .zip file

Check the Opatch version

Stop Oracle Database ( One node at a time) Stop the database which is being patched Stop listener if running from ORACLE_HOME Run slibclean if OS is AIX. ( 4 to 5 times) Apply PSU on 10205 Unzip PSU patch 12419392 on stage_loc Run the opatch command to apply patch After successful completetion of Step 13, start the instance Run the catbundle (only on one node, not required on other 2 nodes)

Apply PSU on 10205


Upgrade Opatch $ cp /<stage_loc>/p6880880_102000_AIX64-5L.zip /oracle/product/10.2.0 $ cd /oracle/product/10.2.0 $ rm -rf Opatch/ $ unzip p6880880_102000_AIX64-5L.zip $ opatch version Invoking OPatch 10.2.0.5.1 OPatch Version: 10.2.0.5.1 OPatch succeeded. Stop Oracle Database ( One node at a time) $ $ $ $ $ $ $ $ . Setdb_db03pdv srvctl stop instance -d $ORACLE_DB -I $ORACLE_SID lsnrctl stop LISTENER_NAME sudo /usr/sbin/slibclean Apply PSU on 10205 unzip /<stage_loc>/p12419392_10205_AIX64-5L.zip cd 12419392 . Setdb_db03pdv opatch apply -local

Time in Mins

$ srvctl start instance -d $ORACLE_DB -I $ORACLE_SID $ sqlplus / as sysdba SQL> @?/rdbms/admin/catbundle psu apply SQL> exit; Total 20 mins

You might also like