成都网站建设设计

将想法与焦点和您一起共享

ORACLE11.2.0.3--11.2.0.4

停止监听(双节点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 :

$ cd /bin

$ ./setasmgidwrap o=/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
















分享题目:ORACLE11.2.0.3--11.2.0.4
标题来源:http://chengdu.cdxwcx.cn/article/ihdcjg.html