您好,登錄后才能下訂單哦!
1、備份數據庫
采用RMAN或expdp都可以。
2、備份軟件目錄(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、備份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、備份OLR(node1/2)
[grid@vastdata01 ~]$tar -cf /home/oracle/backup/ocr/olr.tar /u01/app/11.2.0/grid/cdata
5、升級前數據庫對象檢查
檢查失效對象
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;
6、關閉數據庫與集群
停止監聽 lsnrctl stop
停止數據庫 shutdown immediate;
停止集群 crsclt stop crs
7、關閉 EM 代理進程(oracle,每個節點)
cd $ORACLE_HOME/bin
./emctl stop dbconsole
8、創建OCM文件(node1/2)
[grid@vastdata01 ~]$ cd /u01/app/11.2.0/grid/OPatch/ocm/bin/
[grid@vastdata01 bin]$ ./emocmrsp
9、建立補丁存放目錄
10、備份與替換OPatch
11、補丁更改權限
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的空間
12、應用補丁
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、檢查
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;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。