ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris裸设备安装三节点RAC102(六)

Solaris裸设备安装三节点RAC102(六)

原创 Linux操作系统 作者:yangtingkun 时间:2011-01-31 23:45:55 0 删除 编辑

利用裸设备安装Solaris上的三节点Oracle 10.2 RAC

这一篇主要介绍安装过程中碰到的错误。

Solaris裸设备安装三节点RAC102(一):http://yangtingkun.itpub.net/post/468/512772

Solaris裸设备安装三节点RAC102(二):http://yangtingkun.itpub.net/post/468/512835

Solaris裸设备安装三节点RAC102(三):http://yangtingkun.itpub.net/post/468/512883

Solaris裸设备安装三节点RAC102(四):http://yangtingkun.itpub.net/post/468/512919

Solaris裸设备安装三节点RAC102(五):http://yangtingkun.itpub.net/post/468/512964

 

 

由于Solaris上安装10.2RAC已经有过多次的经验了,这次唯一的区别在于使用裸设备和升级版本到10.2.0.4,因此从头到尾几乎没有碰到任何错误。

不过最后通过DBUA升级的时候还是出了一点意外。

通过XMANAGER方式启动图形界面DBUA进行补丁安装后的数据库升级操作。这个操作要比手工升级简单一些。

但是在图形工具工作进行中,出现了网络的闪断,导致DBUA图形界面丢失。从后台看,数据库的升级工作仍然在继续,但是过了一段时间后,DBUA出现错误信息,这时后台日志也停止了更新。

再次运行DBUA尝试升级,这次发现Oracle只运行对SERVER部分进行升级,而第一次进行升级的时候所有的组件都需要升级。

bash-2.03$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on 星期二 5 18 10:04:55 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> set pages 100 lines 120
SQL> select comp_id, comp_name, version, status
  2  from dba_registry;

COMP_ID   COMP_NAME                           VERSION      STATUS
--------- ----------------------------------- ------------ -------
SDO       Spatial                             10.2.0.4.0   VALID
ORDIM     Oracle interMedia                   10.2.0.4.0   VALID
AMD       OLAP Catalog                        10.2.0.4.0   VALID
XDB       Oracle XML Database                 10.2.0.4.0   VALID
CONTEXT   Oracle Text                         10.2.0.4.0   VALID
ODM       Oracle Data Mining                  10.2.0.4.0   VALID
EXF       Oracle Expression Filter            10.2.0.4.0   VALID
RUL       Oracle Rule Manager                 10.2.0.4.0   VALID
OWM       Oracle Workspace Manager            10.2.0.4.3   VALID
CATALOG   Oracle Database Catalog Views       10.2.0.4.0   VALID
CATPROC   Oracle Database Packages and Types  10.2.0.4.0   VALID
JAVAVM    JServer JAVA Virtual Machine        10.2.0.4.0   VALID
XML       Oracle XDK                          10.2.0.4.0   VALID
CATJAVA   Oracle Database Java Packages       10.2.0.4.0   VALID
APS       OLAP Analytic Workspace             10.2.0.4.0   VALID
XOQ       Oracle OLAP API                     10.2.0.4.0   VALID
RAC       Oracle Real Application Clusters    10.2.0.4.0   VALID

已选择17行。

SQL> exit
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
断开

查询DBA_REGRITY发现升级结果似乎正常,不过仍然不是放心,于是只能通过手工方式对数据库重新进行升级操作。

由于是RAC环境,需要只保留一个节点,并将数据库至于CLUSTER_DATABASEFALSE的状态下进行升级:

bash-2.03$ srvctl stop inst -d testrac -i testrac2,testrac3
bash-2.03$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on 星期二 5 18 10:08:41 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter system set cluster_database = false scope = spfile;

系统已更改。

SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE
例程已经关闭。
SQL> startup upgrade
ORACLE
例程已经启动。

Total System Global Area 1258291200 bytes
Fixed Size                  2040280 bytes
Variable Size             318774824 bytes
Database Buffers          922746880 bytes
Redo Buffers               14729216 bytes
数据库装载完毕。
数据库已经打开。
SQL> spo upgrade.log
SQL> @?/rdbms/admin/catupgrd
DOC>######################################################################
DOC>######################################################################
DOC>    The following statement will cause an "ORA-01722: invalid number"
DOC>    error if the user running this script. is not SYS.  Disconnect
DOC>    and reconnect with AS SYSDBA.
DOC>######################################################################
DOC>######################################################################
DOC>#

未选定行

.
.
.
SQL> Rem =====================================================================
SQL> Rem Record Upgrade Completion
SQL> Rem =====================================================================
SQL>
SQL> BEGIN
  2     dbms_registry_sys.record_action('UPGRADE',NULL,'Upgraded from ' ||
  3         dbms_registry.prev_version('CATPROC'));
  4  END;
  5  /

PL/SQL 过程已成功完成。

SQL> SELECT dbms_registry_sys.time_stamp('UPGRD_END') AS timestamp FROM DUAL;

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UPGRD_END  2010-05-18 11:13:11

已选择 1 行。

SQL>
SQL> Rem =====================================================================
SQL> Rem Run component status as last output
SQL> Rem =====================================================================
SQL>
SQL> @@utlusts TEXT
SQL> Rem
SQL> Rem $Header: utlusts.sql 26-jul-2004.09:57:38 rburns Exp $
SQL> Rem
SQL> Rem utlusts.sql
SQL> Rem
SQL> Rem Copyright (c) 2004, Oracle. All rights reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem      utlusts.sql - UTiLity Upgrade STatuS
SQL> Rem
SQL> Rem    DESCRIPTION
SQL> Rem      Presents Post-upgrade Status in either TEXT or XML
SQL> Rem
SQL> Rem    NOTES
SQL> Rem      Invoked by utlu102s.sql with TEXT parameter
SQL> Rem
SQL> Rem    MODIFIED   (MM/DD/YY)
SQL> Rem    rburns      07/21/04 - add elapsed time
SQL> Rem    rburns      06/22/04 - rburns_pre_upgrade_util
SQL> Rem    rburns      06/16/04 - Created
SQL> Rem
SQL>
SQL> SET SERVEROUTPUT ON
SQL> SET VERIFY OFF
SQL>
SQL> DECLARE
  2 
  3     display_mode VARCHAR2(4) := '&1';
  4     display_xml  BOOLEAN := FALSE;
  5     component    registry$.cname%type;
  6     prv_time TIMESTAMP;
  7     start_time TIMESTAMP;
  8     end_time TIMESTAMP;
  9     elapsed_time INTERVAL DAY TO SECOND(9) :=
 10             INTERVAL '0 00:00:00.00' DAY TO SECOND;
 11     time_result VARCHAR2(30);
 12 
 13  BEGIN
 14     IF display_mode = 'XML' THEN
 15        display_xml := TRUE;
 16        DBMS_OUTPUT.PUT_LINE('');
 17        DBMS_OUTPUT.PUT_LINE('');
 18     ELSE
 19        DBMS_OUTPUT.PUT_LINE('.');
 20        DBMS_OUTPUT.PUT_LINE(
 21               'Oracle Database 10.2 Upgrade Status Utility    ' ||
 22               LPAD(TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS'),26));
 23        DBMS_OUTPUT.PUT_LINE('.');
 24        DBMS_OUTPUT.PUT_LINE(RPAD('Component', 35) || LPAD('Status',12) ||
 25                LPAD('Version', 16) || LPAD('HH:MM:SS', 10));
 26     END IF;
 27     FOR log IN (SELECT comp_id, operation, optime, message
 28                 FROM dba_registry_log WHERE namespace = 'SERVER'
 29                 ORDER BY optime) LOOP
 30       IF log.comp_id = 'UPGRD_BGN' THEN
 31          start_time := log.optime;
 32          prv_time := log.optime;
 33       ELSIF log.comp_id = 'UPGRD_END' THEN
 34          end_time := log.optime;
 35       END IF;
 36 
 37       IF log.comp_id LIKE '%_BGN' OR log.comp_id LIKE '%_END' OR
 38          log.comp_id = 'CATPROC' THEN
 39          NULL;
 40       ELSE
 41          IF log.comp_id = 'RDBMS' THEN
 42             component := 'Oracle Database Server';
 43          ELSE
 44             component :=  dbms_registry.comp_name(log.comp_id);
 45          END IF;
 46          elapsed_time := log.optime - prv_time;
 47          time_result := to_char(elapsed_time);
 48          IF display_xml THEN
 49             DBMS_OUTPUT.PUT_LINE ('');
 54          ELSE
 55             DBMS_OUTPUT.PUT_LINE(rpad(component,35) ||
 56                               LPAD(log.operation,12) || ' ' ||
 57                               LPAD(substr(log.message,1,15),15) ||
 58                               LPAD(substr(time_result,5,8),10));
 59          END IF;
 60          prv_time := log.optime;
 61       END IF;
 62     END LOOP;
 63 
 64     IF end_time IS NOT NULL THEN
 65        elapsed_time := end_time - start_time;
 66        time_result := to_char(elapsed_time);
 67        IF display_xml THEN
 68           DBMS_OUTPUT.PUT_LINE('');
 70        ELSE
 71           DBMS_OUTPUT.PUT_LINE('.');
 72           DBMS_OUTPUT.PUT_LINE('Total Upgrade Time: ' ||
 73                    substr(time_result, 5,8));
 74        END IF;
 75     ELSE
 76        IF display_xml THEN
 77              DBMS_OUTPUT.PUT_LINE('');
 78        ELSE
 79           DBMS_OUTPUT.PUT_LINE('Upgrade Incomplete');
 80        END IF;
 81     END IF;
 82        IF display_xml THEN
 83         DBMS_OUTPUT.PUT_LINE('
');
 84           DBMS_OUTPUT.PUT_LINE('
');
 85        END IF;
 86  END;
 87  /
.
Oracle Database 10.2 Upgrade Status Utility           05-18-2010 11:13:11
.
Component                                Status         Version  HH:MM:SS
Oracle Database Server                    VALID      10.2.0.4.0  00:22:11
JServer JAVA Virtual Machine              VALID      10.2.0.4.0  00:03:23
Oracle XDK                                VALID      10.2.0.4.0  00:00:38
Oracle Database Java Packages             VALID      10.2.0.4.0  00:00:45
Oracle Text                               VALID      10.2.0.4.0  00:00:24
Oracle XML Database                       VALID      10.2.0.4.0  00:05:32
Oracle Real Application Clusters          VALID      10.2.0.4.0  00:00:02
Oracle Workspace Manager                  VALID      10.2.0.4.3  00:01:49
Oracle Data Mining                        VALID      10.2.0.4.0  00:00:49
OLAP Analytic Workspace                   VALID      10.2.0.4.0  00:00:40
OLAP Catalog                              VALID      10.2.0.4.0  00:01:53
Oracle OLAP API                           VALID      10.2.0.4.0  00:01:23
Oracle interMedia                         VALID      10.2.0.4.0  00:13:03
Spatial                                   VALID      10.2.0.4.0  00:03:38
Oracle Expression Filter                  VALID      10.2.0.4.0  00:00:23
Oracle Rule Manager                       VALID      10.2.0.4.0  00:00:19
.
Total Upgrade Time: 00:56:59

PL/SQL 过程已成功完成。

SQL>
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
SQL>
SQL> DOC
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC>   The above PL/SQL lists the SERVER components in the upgraded
DOC>   database, along with their current version and status.
DOC>
DOC>   Please review the status and version columns and look for
DOC>   any errors in the spool log file.  If there are errors in the spool
DOC>   file, or any components are not VALID or not the current version,
DOC>   consult the Oracle Database Upgrade Guide for troubleshooting
DOC>   recommendations.
DOC>
DOC>   Next shutdown immediate, restart for normal operation, and then
DOC>   run utlrp.sql to recompile any invalid application objects.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SQL>
SQL> Rem *********************************************************************
SQL> Rem END catupgrd.sql
SQL> Rem *********************************************************************
SQL> spo off
SQL> @?/rdbms/admin/utlrp
SQL> Rem
SQL> Rem $Header: utlrp.sql 24-jul-2003.10:06:51 gviswana Exp $
SQL> Rem
SQL> Rem utlrp.sql
SQL> Rem
SQL> Rem Copyright (c) 1998, 2003, Oracle Corporation.  All rights reserved.
.
.
.
SQL> select COUNT(*) "OBJECTS WITH ERRORS" from obj$ where status = 3;

OBJECTS WITH ERRORS
-------------------
                  0

已选择 1 行。

SQL>
SQL>
SQL> DOC
DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#
SQL> select COUNT(*) "ERRORS DURING RECOMPILATION" from utl_recomp_errors;

ERRORS DURING RECOMPILATION
---------------------------
                          0

已选择 1 行。

SQL>
SQL>
SQL> Rem =====================================================================
SQL> Rem Run component validation procedure
SQL> Rem =====================================================================
SQL>
SQL> SET serveroutput on
SQL> EXECUTE dbms_registry_sys.validate_components;

PL/SQL 过程已成功完成。

SQL> SET serveroutput off
SQL>
SQL>
SQL> Rem ===========================================================================
SQL> Rem END utlrp.sql
SQL> Rem ===========================================================================
SQL> alter system set cluster_database = true scope = spfile;

系统已更改。

SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE
例程已经关闭。
SQL> exit
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
断开
bash-2.03$ srvctl start db -d testrac
bash-2.03$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on 星期二 5 18 11:30:27 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
testrac1

SQL> select instance_number, instance_name, status from gv$instance;

INSTANCE_NUMBER INSTANCE_NAME    STATUS
--------------- ---------------- ------------
              1 testrac1         OPEN
              3 testrac3         OPEN
              2 testrac2         OPEN

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

通过手工执行升级操作,确保数据库中的所有组件被正常的升级。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-686565/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ASM管理手册总结
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10523560