Translate into your own language

Friday, July 22, 2016

Database Upgradation in RAC environment from 11.2.0.3 to 11.2.0.4

Pre Upgrade Steps

SQL> select instance_name,host_name from gv$instance

INSTANCE_NAME        HOST_NAME
----------------              ----------------------------------------------------------------
TESTRAC3               host1.com
TESTRAC4               host2.com

$srvctl stop database -d TESTRAC

$srvctl status database -d TESTRAC

$srvctl start database -d TESTRAC

SQL> select name,open_mode from gv$database;

Select distinct status from dba_objects;

SQL>set lines 200

SQL>select owner,object_name,object_type,status from dba_objects where status='INVALID'
order by 1,3;

SQL>select owner,object_type,count(*) from dba_objects
where status='INVALID'
group by owner,object_type
order by owner;

SQL>@$ORACLE_HOME/rdbms/admin/utlrp.sql
select distinct status from dba_objects;

SQL>col comp_name format a40

SQL>col status format a30

SQL>col version format a30

SQL>set lines 132 pages 100

SQL>select comp_name,status,version from dba_registry;

$export ORACLE_HOME=/u01/app/oracle/product/11.2.4/dbhome_1

$echo $ORACLE_HOME

$cd $ORACLE_HOME/bin

$pwd

Note:  BlackOut OEM before starting the Upgrade.

Note: Please don’t change anything source version of database, keep the database up and running from there. 

Upgrade Steps

Invoke dbua to start the upgrade from new home

$/u01/app/oracle/product/11.2.4/dbhome_1/bin/dbua










Please note this summary page is your last chance to make sure all looks good before you hit the “FINISHED” button. This can be done before your outage window start because if you do so nothing will change until press the finish button so recommendation would be please go through all the step before hand so that you can fix them before you enter in to the outage window.




This is the point outage window start before that all other activities were online.






Verify /etc/oratab

$[oracle@host1 bin]$ cat /etc/oratab | grep TESTRAC
TESTRAC:/u01/app/oracle/product/11.2.4/dbhome_1:N # line added by Agent

$[oracle@host1 bin]$ . oraenv
$ORACLE_SID = [oracle] ? TESTRAC3
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.4/dbhome_1

select distinct status from dba_objects;

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

$srvctl stop database -d TESTRAC

$srvctl status database -d TESTRAC

$srvctl start database -d TESTRAC

$[oracle@host1 bin]$ srvctl status database -d TESTRAC
Instance TESTRAC3 is running on node host1
Instance TESTRAC4 is running on node host2

SQL>select name,open_mode from gv$database;

SQL>col comp_name format a40

SQL>col status format a30

SQL>col version format a30

SQL>set lines 132 pages 100

SQL>select comp_name,status,version from dba_registry;

SQL>alter session set nls_date_format='mm/dd/yyyy:hh24:mi:ss';

SQL>set lines 200

SQL>col host_name format a40

SQL>select instance_name,host_name,startup_time, status from gv$instance
order by 1;
INSTANCE_NAME      HOST_NAME    STARTUP_T     STATUS
----------------            ------------------------  ----------------    --------------
TESTRAC3                   host1.com           12-APR-16          OPEN
TESTRAC4                   host2.com           12-APR-16          OPEN

Apply Jan 2016 CPU Patch

cd $ORACLE_HOME/rdbms/admin;echo $ORACLE_HOME
pwd

$/u01/app/oracle/product/11.2.4/dbhome_1/rdbms/admin

$sqlplus "/ as sysdba"

SQL>select name,open_mode from gv$database;

SQL>@catbundle.sql psu apply

SQL>@$ORACLE_HOME/rdbms/admin/utlrp.sql

SQL>select owner,object_name,object_type,status from dba_objects where status='INVALID' order by 1,3;

--Verify PSU Patch Install

SQL>select to_char(ACTION_TIME,'DD-MON-YYYY'),ACTION,VERSION,ID,BUNDLE_SERIES,COMMENTS from
DBA_REGISTRY_HISTORY where comments like '%PSU 11.2.0.4%'
/
exit;

---------------------------------------------Upgradation Completed------------------------------------------------

No comments:

Post a Comment