rac 升級crs 升級資料庫軟體,升級資料庫

season0891發表於2009-04-15

轉自: http://space.itpub.net/html/99/231499-156324.html

 

最近在本機上重新用vmware 1.04 搭建了一套10G RAC系統,在搭建過程把步驟基本記錄下來,希望對大家有幫助。

本部分主要講述如何升級RAC資料庫

一般情況下,最好在建立資料庫前升級軟體會省去不少麻煩,我這裡為了,選擇先建立資料庫再升級。

1、 如果安裝了管理器和isqlplus執行如下命令停止:

emctl stop dbconsole

isqlplusctl stop

2、 停止服務和

使用者在其中一個節點執行

[oracle@rac1 ~]$ srvctl stop service -d rac

[oracle@rac1 ~]$ srvctl stop instance -d rac -i rac1,rac2

3、 停止nodeapps

兩個節點以root分別執行:

節點1

[root@rac1 ~]# cd /opt/oracle/product/10.2/crs/bin/

[root@rac1 bin]# ./srvctl stop nodeapps -n rac1

 

節點2

[root@rac1 ~]# cd /opt/oracle/product/10.2/crs/bin/

[root@rac1 bin]# ./srvctl stop nodeapps -n rac2

 

4、 停止crs

在所有節點以root分別執行:

[root@rac1 bin]# ./crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

 

5、 升級資料庫軟體

必須在安裝oracle軟體的節點打執行補丁更新程式。

[root@rac1 ~]# export DISPLAY=172.25.8.131:1.0

[root@rac1 ~]# xhost +

access control disabled, clients can connect from any host

[root@rac1 ~]#

[root@rac1 ~]# su - oracle

[oracle@rac1 ~]$ cd /soft/Disk1/

[oracle@rac1 Disk1]$ ls

10203_buglist.htm install patch_note.htm response runInstaller stage

[oracle@rac1 Disk1]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

                                     Passed

 

 

All installer requirements met.

 

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-01-16_06-09-15PM. Please wait ...[oracle@rac1 Disk1]$ Oracle Universal Installer, Version10.2.0.3.0 Production

Copyright (C) 1999, 2006, Oracle. All rights reserved.

 

在彈出的介面下一步,選擇OraDb10g_home1

下一步,預設是選擇了所有節點

下一步,開始升級

最後在所有節點以root執行指令碼:

[root@rac1 bin]# /opt/oracle/product/10.2/database/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are set as:

   ORACLE_OWNER= oracle

   ORACLE_HOME= /opt/oracle/product/10.2/database

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

  Copying dbhome to /usr/local/bin ...

The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

  Copying oraenv to /usr/local/bin ...

The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

[n]: y

  Copying coraenv to /usr/local/bin ...

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

至此,資料庫軟體部分升級完成。

1) 升級資料庫

 

資料庫升級可以用dbua,也可以手工升級。我在這裡選擇手工升級的方式。

1、 啟動所有節點的的crs及監聽等資源

[root@rac1 bin]# /etc/init.d/init.crs start

Startup will be queued to init within 90 seconds.

 

 

[root@rac2 bin]# /etc/init.d/init.crs start

Startup will be queued to init within 90 seconds.

 

1、 在節點1修改引數

SQL> STARTUP NOMOUNT

 

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='150M' SCOPE=spfile;

 

System altered.

 

SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;

 

System altered.

 

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

 

System altered.

 

保證SHARED_POOL_SIZEJAVA_POOL_SIZE不小於150m。因為資料檔案是共享的,所以升級的時候只需要在其中一個節點升級就行了,所以要把CLUSTER_DATABASE設成FALSE

2、 執行更新指令碼

SQL> STARTUP UPGRADE

SQL> SPOOL patch.log

SQL> @?/rdbms/admin/catupgrd.sql

SQL> SPOOL OFF

檢查日誌看有沒有錯誤,如果沒有錯誤,則重啟資料庫:

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

 

Total System Global Area 469762048 bytes

Fixed Size                 1262428 bytes

Variable Size            419433636 bytes

Database Buffers          46137344 bytes

Redo Buffers               2928640 bytes

Database mounted.

Database opened.

3、 編譯無效物件

SQL> @?/rdbms/admin/utlrp.sql

 

4、 修改引數

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;

 

System altered.

 

重啟資料庫,升級完成。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-589343/,如需轉載,請註明出處,否則將追究法律責任。

相關文章