WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606
全部博文(599)
分类: Oracle
2009-12-15 14:03:43
对于数据库环境下的升级,首先需要启动各节点的监听服务,操作如下:
[oracle@jssdbn1 bin]$ ./srvctl start listener -n jssdbn1
[oracle@jssdbn1 bin]$ ./srvctl start listener -n jssdbn2然后启动各节点的asm实例,操作如下:
[oracle@jssdbn1 bin]$ ./srvctl start asm -n jssdbn1
[oracle@jssdbn1 bin]$ ./srvctl start asm -n jssdbn2随后查询crs_stat,确保监听服务已启动:
[oracle@jssdbn1 bin]$ ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.jssdb.db application OFFLINE OFFLINE
ora....n1.inst application OFFLINE OFFLINE
ora....n2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE jssdbn1
ora....N1.lsnr application ONLINE ONLINE jssdbn1
ora....bn1.gsd application ONLINE ONLINE jssdbn1
ora....bn1.ons application ONLINE ONLINE jssdbn1
ora....bn1.vip application ONLINE ONLINE jssdbn1
ora....SM2.asm application ONLINE ONLINE jssdbn2
ora....N2.lsnr application ONLINE ONLINE jssdbn2
ora....bn2.gsd application ONLINE ONLINE jssdbn2
ora....bn2.ons application ONLINE ONLINE jssdbn2
ora....bn2.vip application ONLINE ONLINE jssdbn2这里决定使用dbua命令,通过视窗界面升级数据库:
选择要升级的(并且当前可用的数据库),这里只有一个并已被默认选中,输入sys用户密码:
选择是否在升级后自动编译无效的对象,默认是选中的:
开始执行升级,本步操作较多,费时较久,请耐心等待:
上述操作完成后,点击ok即可,OUI弹出整个操作的返回结果,如图所示:
点击close按钮关闭窗口。
此时可以登陆任意节点,以sqlplus命令行连接进去执行查询:
[oracle@jssdbn1 ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0. 4 .0 - Production on Wed Nov 18 13:17:39 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0. 4 .0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> set line 150 pages 1000
SQL> select * from gv$instance;
INST_ID INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_T STATUS
---------- --------------- ---------------- ---------------------------------------------------------------- ----------------- --------- ------------
PAR THREAD# ARCHIVE LOG_SWITCH_WAIT LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
--- ---------- ------- --------------- ---------- --- ----------------- ------------------ --------- ---
1 1 jssdbn1 jssdbn1 10.2.0. 4 .0 18-NOV-09 OPEN
YES 1 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
2 2 jssdbn2 jssdbn2 10.2.0. 4 .0 18-NOV-09 OPEN
YES 2 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
SQL>OK ,返回信息显示无误,升级完成!
全文完,下载pdf版本请至: