Solaris 10下遷移10G RAC (七)

space6212發表於2019-07-20

最近做了一個rac資料庫的遷移,中間涉及到很多部分內容,包括rac環境的搭建、ASM的設定、資料庫的遷移、升級等。
本文是這次遷移工作的第七部分:後續工作。


後續工作

修改db_name

為了與正式系統區分,需要修改還原過來的資料庫名稱。在rac中修改db_name的步驟與單例項步驟差不多,主要是要修改一些與cluster相關的引數。
停止所有例項,然後把其中一個例項啟動到mount狀態下:
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size                  2030200 bytes
Variable Size             268436872 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14745600 bytes
Database mounted.
SQL> alter system set cluster_database=false scope=spfile;
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size                  2030200 bytes
Variable Size             268436872 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14745600 bytes
Database mounted.
SQL> exit
bash-3.00$ nid target=sys/testpass dbname=pretrade logfile=~/nid2.log
重新把cluster_database設定為true,並把db_name引數修改為新的名稱:
bash-3.00$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 9 27 23:04:19 2007
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size                  2030200 bytes
Variable Size             268436872 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14745600 bytes
ORA-01103: database name 'PRETRADE' in control file is not 'TRADEDB'
SQL> alter system set db_name=pretrade scope=spfile;
System altered.
SQL> alter system set cluster_database=true scope=spfile;
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size                  2030200 bytes
Variable Size             268436872 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14745600 bytes
Database mounted.
最後在開啟的時候open resetlogs即可。
SQL> alter database open resetlogs;

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

相關文章