Oracle RAC Application PSU

Posted by john8m on Wed, 02 Oct 2019 03:53:29 +0200

1. Backup database
Both RMAN and expdp can be used.
2. Backup Software Directory (node1/2)

tar -czvf /u01/grid.tar.gz  /u01/app/11.2.0/grid  --exclude=/u01/app/11.2.0/grid/rdbms/audit/*
tar -czvf /u01/database.tar.gz /u01/app/oracle/  --exclude=/u01/app/oracle/admin/orcl/adump/*

3. Backup OCR (node1/2)

[grid@vastdata01 ~]$ cd $ORACLE_HOME/bin
[grid@vastdata01 bin]$ pwd
/u01/app/11.2.0/grid/bin
./crsctl query css votedisk
./ocrcheck
./ocrconfig -manualbackup
./ocrconfig -export ocr.bak

4. Backup OLR (node1/2)

[grid@vastdata01 ~]$tar -cf /home/oracle/backup/ocr/olr.tar /u01/app/11.2.0/grid/cdata

5. Pre-upgrade database object checking

Check the Failure Object
    select object_name,object_type from dba_objects where status='INVALID';
//Check the running job
    select job,this_date,last_date,instance from dba_jobs_running;
//Stop crontab tasks on databases
    crontab –l
    crontab -e
//Check Plan job
    col job_name for a10;
    col owner for a10;
    col start_date for a20;
    col end_date for a20;
    col repeat_interval for a10;
    set linesize 2000
    set pagesize 2000
    select job_name,owner,start_date,end_date,repeat_interval from dba_scheduler_jobs;
//View plan dba plan job
    col interval for a20
    col what for a30
    set linesize 2000 pagesize 2000
    select schema_user,job,interval,what from dba_jobs;
    show parameter job_queue
//View Automated Execution Tasks
    select client_name,job_name,task_name from dba_autotask_client_job;

6. Close database and cluster

        Stop listening for lsnrctl stop
        Stop shutdown immediate database;
        Stop Cluster crsclt stop crs

7. Close the EM proxy process (oracle, each node)

cd $ORACLE_HOME/bin
./emctl stop dbconsole

8. Create OCM files (node1/2)

[grid@vastdata01 ~]$  cd /u01/app/11.2.0/grid/OPatch/ocm/bin/
[grid@vastdata01 bin]$ ./emocmrsp

9. Establishing Patch Storage Catalogue

10. Backup and Replacement of OPatch

11. Patch Change Permissions

chown -R grid:oinstall psu
ps -ef|grep zjprd1|grep LOCAL=NO|grep -v grep|awk '{print $2}'| xargs kill -9
 / usr / SBIN / slibclean - - AIX needs manual cleaning
 Note: / tmp and / directory have at least 10G of space

12. Applying patches

root
/oracle/grid/crs/install/rootcrs.pl -unlock
GI
/oracle/grid/OPatch/opatch napply -oh /oracle/grid/  -local  /quest/psu/17592127   
/oracle/grid/OPatch/opatch apply -oh /oracle/grid/  -local  /quest/psu/20760997
DB
su - oracle
/quest/psu/17592127/custom/server/17592127/custom/scripts/prepatch.sh -dbhome  /oracle/app/oracle/product/11.2.0/db_1/
/oracle/app/oracle/product/11.2.0/db_1/OPatch/opatch napply -oh $ORACLE_HOME  -local  /quest/psu/17592127/custom/server/17592127
/oracle/app/oracle/product/11.2.0/db_1/OPatch/opatch apply -oh $ORACLE_HOME  -local  /quest/psu/20760997
/quest/psu/17592127/custom/server/17592127/custom/scripts/postpatch.sh -dbhome  /oracle/app/oracle/product/11.2.0/db_1/
root
/oracle/grid/rdbms/install/rootadd_rdbms.sh
/oracle/grid/crs/install/rootcrs.pl -patch
chown oracle:asmadmin $ORACLE_HOME/bin/oracle
chmod 6751 $ORACLE_HOME/bin/oracle

13. Check

su - grid
$ORACLE_HOME/OPatch/opatch lspatches
exit
su - oracle
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
@catbundle.sql psu apply
select * from registry$history;

Topics: Big Data Oracle Database crontab rman