- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
4#
发表于 2012-7-30 22:33:56
我目前还没有做过类似的测试或者案例, 找到的一些资料:
Convert 11gR2 non-RAC database to RAC database using rconfig
This post talks about the Conversion of 11gR2 non-RAC database to RAC database using rconfig.
Oracle provides 3 methods to convert non-RAC single instance database to RAC databases:
1. DBCA
2. rconfig
3. Enterprise Manager
All the 3 have their own benefits and can be used to suit one’s needs. My recent work involved the conversion of non-RAC single instance database to RAC database using rconfig, although I’ve tested all the 3 methods but concluded on rconfig.
Pre-requisites:
1. Configure Shared Storage setup ASM, NFS (NAS) or clustered storage.
For ASM, refer to Oracle Database Storage Administrator’s Guide11g Release 2 (11.2)
For configuring shared storage, refer to Configuring Storage for Grid Infrastructure for a Cluster and Oracle Real Application Clusters (Oracle RAC) (Linux)
See also Oracle Database Administrator’s Guide 11g Release 2 (11.2)
2. A clustered Grid Infrastructure install with at least one Scan listener address. See
Oracle Grid Infrastructure Installation Guide 11g Release 2 (11.2) Linux
3. rconfig imposes a restriction on the choice of listener. The listener must be the default listener, and it must run from the Grid Infrastructure home.
1
srvctl add listener -p 1522
After conversion, you can reconfigure the listener as required.
4. Install Clustered Oracle Database Software as per documentation, this can be done by choosing the right configuration option. Refer to :
http://download.oracle.com/docs/ ... cinstl.htm#BABJGBHB
I’ve installed the new 11gR2 clustered ORACLE_HOME at
/u01/app/oracle/product/11.2.0/db_2
on both the nodes orarac01 and orarac02
Converting Single Instance Database using rconfig
1. As an “oracle” OS user navigate to
$ORACLE_HOME/assistants/rconfig/sampleXMLs
2. Open the sample file ConvertToRAC_AdminManaged.xml using a text editor such as vi. This XML sample file contains comment lines that provide instructions on how to edit the file to suit your site’s specific needs.
3. Ensure you edit the xml with convert verify="ONLY"
The following are the sample entries:
01
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
02
/u01/app/oracle/product/11.2.0/db_1
03
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
04
/u01/app/oracle/product/11.2.0/db_2
05
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
06
07
...
08
09
<!--Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. -->
10
11
...
12
13
<!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be use d for rac database. For CFS, this field will have directory path. -->
14
+DATA
4. Move the spfile to the shared location, in this case the Single Instance Database was hosted on file system, in this process we will move the datafiles from file system storage to ASM.
So create spfile in the shared disk location
1
SQL>create spfile='+DATA/TEST/spfiletest.ora' from pfile;
You can check if the file is created through “asmcmd”
5. Take a backup of existing $SOURCE_ORACLE_HOME/dbs/initTEST.ora, and create a new $SOURCE_ORACLE_HOME/dbs/initTEST.ora with the following parameter:
1
spfile='+DATA/TEST/spfiletest.ora'
6. Restart the Database
7. Now lets test if “rconfig” is ready for conversion, navigate to $ORACLE_HOME/bin and issue the following command
1
$./rconfig $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml
The above command validates( as we’ve set convert=”ONLY”) if rconfig is ready for conversion. If the output throws any error, diagnose and troubleshoot to fix the issue. Refer to the following output for successful validation:
1
...
2
3
Operation Succeeded
4
5
There is no return value for this step
6
7
..
8. Now are we are ready for conversion, edit the xml file “ConvertToRAC_AdminManaged.xml” and change:
from:
1
..
2
<n:Convert verify="ONLY">
3
..
to
1
..
2
<n:Convert verify="YES">
3
..
9. Perform the conversion
1
$./rconfig $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml
The conversion will take some time to complete. The progress can be monitored from the logs located at $ORACLE_BASE/cfgtoollogs/rconfig
10. Once the conversion is complete you’d get a similar message in step 7.
11. Perform sanity checks and tweak the listener to suit your needs.
That sums up the procedure to convert Single Instance Oracle Database to RAC database. Please do share your thoughts and comments.
Reference:
http://download.oracle.com/docs/ ... rt2rac.htm#BABGGEGJ |
|