ORACLE 11.2.0.3--11.2.0.4

发布时间:2020-08-09 09:30:56 作者:Aeon37
来源:ITPUB博客 阅读:151

停止监听(双节点grid执行)

lsnrctl stop


查看应用是否有连接(双节点root执行)

ps -ef | grep rac | grep LOCAL=NO


创建目录(双节点root执行)

mkdir -p /u01/app/11.2.0.4/

chown -R grid:oinstall /u01/app/11.2.0.4/


上传压缩包解压(节点一root执行)

mkdir -p /tmp/update/

chmod -R 777 /tmp/update/

su - grid

cd /tmp/update/

unzip p13390677_112040_Linux-x86-64_3of7.zip


集群升级前检查(双节点root执行)

节点一(grid):

cd /tmp/update/grid/

/tmp/update/grid/runcluvfy.sh stage -pre crsinst -upgrade -n rac1,rac2 -rolling -src_crshome /u01/app/11.2.0/ -dest_crshome /u01/app/11.2.0.4/ -dest_version 11.2.0.4.0 -fixup -fixupdir /tmp

su - root

/tmp/CVU_11.2.0.4.0_grid/runfixup.sh

节点二:

su - root

/tmp/CVU_11.2.0.4.0_grid/runfixup.sh


升级集群软件(节点一root执行)

unset ORACLE_HOME ORACLE_BASE ORACLE_SID

cd /tmp/update/grid/

./runInstaller

1.选择 Skip software updates

2.选择 Upgrade Oracle Grid Infrastructure or Oracle Automatic Storage Management

3.下一步

4.下一步

5.software Location 输入 /u01/app/11.2.0.4/grid

6.安装

7.76%执行脚本 双节点轮流执行


集群软件升级完成,修改环境变量(双节点grid执行)

vi .bash_profile

ORACLE_HOME=/u01/app/11.2.0.4/grid


检查监听(双节点grid执行)

节点一:

lsnrctl status


验证升级后的版本(双节点grid执行)

crsctl query crs softwareversion

Oracle Clusterware version on node [mailwwdb1] is [11.2.0.4.0]

crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [11.2.0.4.0]

crsctl query crs releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.4.0]


停止监听(双节点grid执行)

lsnrctl stop


查看应用是否有连接(双节点root执行)

ps -ef | grep rac | grep LOCAL=NO


创建目录(双节点root执行)

mkdir -p /u01/app/oracle/product/11.2.0.4

chown -R oracle:oinstall /u01/app/oracle/product/11.2.0.4


上传压缩包解压(节点一root执行)

su - oracle

cd /tmp/update/

unzip p13390677_112040_Linux-x86-64_1of7.zip

unzip p13390677_112040_Linux-x86-64_2of7.zip


升级数据库软件(节点一oracle执行)

cd /tmp/update/database/

./runInstaller

1.取消勾选 I wish to receive security ...

2.选择 Skip software updates

3.选择 Install database software only

4.下一步

5.下一步

6.下一步

7.software Location 输入 /u01/app/oracle/product/11.2.0.4/db_1

8.选择 dba/oinstall

9.忽略 下一步

10.安装


预检查升级,新软件脚本检查旧目录(节点一oracle执行)

sqlplus / as sysdba

@/u01/app/oracle/product/11.2.0.4/db_1/rdbms/admin/utlu112i.sql

根据需要修改:

alter system set cluster_database=FALSE scope=spfile;

PURGE DBA_RECYCLEBIN;

EXECUTE dbms_stats.gather_dictionary_stats;

Events:

SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2

WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE';

Trace Events:

SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2

WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE';


检查无效对象(节点一oracle执行)

select object_name,owner,object_type from dba_objects where status='INVALID';


关闭数据库(双节点oracle执行)

sqlplus / as sysdba

shutdown immediate;


修改环境变量(双节点oracle执行)

vi .bash_profile

ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1


拷贝监听文件和参数文件(双节点oracle执行)

cp -r /u01/app/oracle/product/11.2.0/db_1/dbs/* /u01/app/oracle/product/11.2.0.4/db_1/dbs/

cp -r /u01/app/oracle/product/11.2.0/db_1/network/admin/* /u01/app/oracle/product/11.2.0.4/db_1/network/admin/


确认环境变量生效(双节点oracle执行)

which sqlplus

/u01/app/oracle/product/11.2.0.4/db_1/bin/sqlplus

echo $ORACLE_HOME

/u01/app/oracle/product/11.2.0.4/db_1


修改/etc/oratab到新目录(双节点oracle执行)

vi /etc/oratab

+ASM1:/u01/app/11.2.0.4/grid:N          # line added by Agent

rac:/u01/app/oracle/product/11.2.0.4/db_1:N             # line added by Agent


执行升级脚本(节点一oracle执行)

startup upgrade;

spool /tmp/oracle.txt

@/u01/app/oracle/product/11.2.0.4/db_1/rdbms/admin/catupgrd.sql

spool off;


如果遇到权限问题:

( As the <asm_home sfw owner>:

$ cd <asm_home>/bin

$ ./setasmgidwrap o=<db_home>/bin/oracle

grid用户

cd $ORACLE_HOME/bin

./setasmgidwrap o=/u01/app/oracle/product/11.2.0.4/db_1/bin/oracle


以正常模式启动数据库(节点一oracle执行)

sqlplus / as sysdba

startup;

@$ORACLE_HOME/rdbms/admin/catuppst.sql;

@$ORACLE_HOME/rdbms/admin/utlrp.sql;


确认数据库无效对象和升级信息(节点一oracle执行)

select object_name,object_type,owner from dba_objects where status='INVALID';

select comp_name,version from dba_registry;


修改cluster_database并启动数据库(节点一oracle执行)

节点一:

show parameter cluster_database;

cluster_database      Boolean  FALSE


alter system set cluster_database=TRUE scope=spfile;

shutdown immediate;

startup;


启动数据库(节点二oracle执行)

sqlplus / as sysdba

startup;


修改集群信息(节点一oracle执行)

srvctl upgrade database -d rac -o $ORACLE_HOME

srvctl config database -d rac


修改集群信息(节点一grid执行)

crsctl stat res -t

srvctl start instance -d rac -i rac1

srvctl start instance -d rac -i rac2

crsctl stat res -t

srvctl stop database -d rac

crsctl stat res -t

srvctl start database -d rac

crsctl stat res -t


检查验证GI版本与集群资源状态(双节点grid执行)

节点一:

su - grid

crsctl query crs softwareversion

crsctl stat res -t


检查数据库版本(双节点oracle执行)

sqlplus / as sysdba
















推荐阅读:
  1. java文件操作(读写操作)
  2. ABAP和Java单例模式的攻防

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

11.2.0.3--11.2.0.4 oracle 11.2.0

上一篇:Docker二所镜像制作

下一篇:MySQL集群搭建实现高可用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》