Solaris裸裝置安裝三節點RAC102(六)

yangtingkun發表於2011-01-31

利用裸裝置安裝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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章