一、備份數據庫
採用RMAN或expdp均可以。
二、備份軟件目錄(node1/2)css
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/*
三、備份OCR(node1/2)node
[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
四、備份OLR(node1/2)sql
[grid@vastdata01 ~]$tar -cf /home/oracle/backup/ocr/olr.tar /u01/app/11.2.0/grid/cdata
五、升級前數據庫對象檢查數據庫
檢查失效對象 select object_name,object_type from dba_objects where status='INVALID'; 檢查正在運行的job select job,this_date,last_date,instance from dba_jobs_running; 中止關於數據庫的crontab任務 crontab –l crontab -e 檢查計劃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; 查看計劃dba 計劃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 查看自動執行任務 select client_name,job_name,task_name from dba_autotask_client_job;
六、關閉數據庫與集羣oracle
中止監聽 lsnrctl stop 中止數據庫 shutdown immediate; 中止集羣 crsclt stop crs
七、關閉 EM 代理進程(oracle,每一個節點)app
cd $ORACLE_HOME/bin ./emctl stop dbconsole
八、建立OCM文件(node1/2)ide
[grid@vastdata01 ~]$ cd /u01/app/11.2.0/grid/OPatch/ocm/bin/ [grid@vastdata01 bin]$ ./emocmrsp
九、創建補丁存放目錄post
十、備份與替換OPatchthis
十一、補丁更改權限spa
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須要手動清理 注意:/tmp和/目錄至少有10G的空間
十二、應用補丁
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
1三、檢查
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;