重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
1、备份数据库
采用RMAN或expdp都可以。
2、备份软件目录(node1/2)
创新互联专注于中大型企业的做网站、网站建设和网站改版、网站营销服务,追求商业策划与数据分析、创意艺术与技术开发的融合,累计客户千余家,服务满意度达97%。帮助广大客户顺利对接上互联网浪潮,准确优选出符合自己需要的互联网运用,我们将一直专注品牌网站设计和互联网程序开发,在前进的路上,与客户一起成长!
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;