iSelfSchooling.com - Community of Sharing

Click here for Online Oracle 8i, 9i, 10g, 11g and 12c Training

from www.iSelfSchooling.com

September 22, 2017, 08:57:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] |   Go Down
  Send this topic  |  Print  
Author Topic: PSU - DG Patch Set Upgrade (Do not use SPU or CPU) -- Critical Security Patches  (Read 37953 times)
AllanDBA
AllanDBA
Newbie
Newbie
*
Posts: 0


« on: August 13, 2015, 10:59:49 AM »

PSU - DG Patch Set Upgrade  (Do not use SPU or CPU)
========
-- On the primary server  (If you have more than one standby)
1.Disable Log Shipping From Primary To Standby
  edit database db-prim set state='LOG-TRANSPORT-OFF';

cd $ORACLE_HOME/oui/bin
./runInstaller -silent -clone ORACLE_HOME=$ORACLE_HOME ORACLE_BASE=$ORACLE_BASE

ORACLE_HOME_NAME=OraHome11g_2x
cd $ORACLE_HOME/bin
chmod 6550 oradism
chmod g+s oradism
chown root:dba oradism
Bounce the database

================================================================
Assuming you have Golden patch copy
-- On the Golden server - tar the golden binaries and move the to other servers...
  SQL> shutdown immediate;
  # cd /app/oracle/stage
  # unzip p20831110_12101.zip
  # cd 20831110
  # opatch apply
     -- on conflict rollback the conflicted patch
     # opatch rollback -id 2081111
  SQL> startup upgrade;
  SQL> quit
  # cd $ORACLE_HOME/Opatch
  # ./datapatch -verbose
  -- Then shutdown and startup the database.

  # cd /app/oracle/product/12.1.0.1
  # tar -cvEf Db_1_PSU4JUL2015.tar .
  # scp Db_1_PSU4JUL2015.tar oracle@server:/app/oracle/product/12.1.0.1
 
--on servers
  # cd /app/oracle/product/12.1.0.1
  # ls
  # Db_1 Db_1_PSU4JUL2015.tar
 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx STANDBY (Server A)  xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Check the dgmgrl status ...
If you have the "ORA-16843" error message, delete the ADR folder on standby.
   -NOTICE- you need to manucal switchover if it is on primary.
Check space on /app or /recovery_area

Short steps: Go to standby server (serverA) ...
1) Shutdown all services (listener and dbs) (task2shutdown)
2) Untar the created tar.
   # cd /app/oracle/product/12.1.0.1
   # mv Db_1 Db_1_old
   # tar -xvDf Db_1_PSU4JUL2015.tar
   # cd Db_1
   # rm -r $ORACLE_HOME/dbs
   # rm -r $ORACLE_HOME/network/admin
   # mv $ORACLE_HOME/Db_1_old/dbs .
   # mv $ORACLE_HOME/Db_1_old/network/admin .
   
   # cd $ORACLE_HOME/bin
   # chmod 6550 oradism
   # chmod g+s oradism
   # chown root:dba oradism

3) startup mount; (task2startup) - alter database recover managed standby database using current

logfile disconnect;

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxXxxxxxxxx PRIMAY (Server B) xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Go to primary server (serverB) ...
Check the dgmgrl status for "SUCCESS."
1) switchover (task2switchover)
   -- If failed do the manual switchover ...

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxXxxxxxxxx New Standby (Server B) xxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   
1) Shutdown all services (listener and dbs) (task2shutdown)
2) Untar the created tar.
   # cd /app/oracle/product/12.1.0.1
   # mv Db_1 Db_1_old
   # tar -xvDf Db_1_PSU4JUL2015.tar
   # cd Db_1
   # rm -r $ORACLE_HOME/dbs
   # rm -r $ORACLE_HOME/network/admin
   # mv $ORACLE_HOME/Db_1_old/dbs .
   # mv $ORACLE_HOME/Db_1_old/network/admin .
   
   # cd $ORACLE_HOME/bin
   # chmod 6550 oradism
   # chmod g+s oradism
   # chown root:dba oradism

3) startup mount; (task2startup) - alter database recover managed standby database using current

logfile disconnect;
Check the dgmgrl status for "SUCCESS."

=========================================
Go to serverA (primary database)
1) run catbundle.sql - (task2runcantbundle)
# cd $ORACLE_HOME/rdbms/admin
# sqlplus /nolog
SQL> connect / as sysdba
SQL> @catbundle.sql psu apply
=========================================
=========================================
=========================================
=========================================
=========================================
Manual switchover data guard databases...

On primary:
SQL> select database_role from v$database; --make sure is primary
SQL> select switchover_status from v$database; --if 'TO STANDBY'
SQL> alter system switch logfile; --if not ''TO STANDBY'
     -- If didn't change then you have problem and will not be able to switchover successfully.
SQL> alter database commit to switchover to physical standby with session shutdown;

On standby:
SQL> select database_role from v$database; --make sure is standby
SQL> select switchover_status from v$database; -- wait 'NOT ALLOWED' change to 'TO PRIMARY'
SQL> alter database commit to switchover to primary;
SQL> alter database open;

On new standby (old primary):
SQL> shutdown immediate;
SQL> startup mount;
SQL> recover managed standby database using current logfile disconnect;

Good Luck!
--admin
Logged
Pages: [1] |   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!