Migrate a single Oracle DataBase instance to Oracle RAC

Source: Internet
Author: User

Steps for migrating a single Oracle DataBase instance to Oracle RAC:

-------------------------------------- Split line --------------------------------------

Detailed illustration of the entire process of VMware + Linux + Oracle 10G RAC

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Steps for installing Oracle 11gR2 in vmwarevm

-------------------------------------- Split line --------------------------------------

Introduction to the Single Instance environment before migration:

Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-Production

Physical database structure:

RMAN> report schema;

Using target database control file instead of recovery catalog
Report of database schema

List of Permanent Datafiles
======================================
File Size (MB) Tablespace RB segs Datafile Name
---------------------------------------------------------------
1 440 SYSTEM ***/u01/app/oracle/oradata/orcl/system01.dbf
2 25 UNDOTBS1 ***/u01/app/oracle/oradata/orcl/undotbs01.dbf
3 250 SYSAUX ***/u01/app/oracle/oradata/orcl/sysaux01.dbf
4 5 USERS ***/u01/app/oracle/oradata/orcl/users01.dbf

List of Temporary Files
======================================
File Size (MB) Tablespace Maxsize (MB) Tempfile Name
---------------------------------------------------------------
1 20 TEMP 32767/u01/app/oracle/oradata/orcl/temp01.dbf

RMAN>

 

Host environment

[Oracle @ rac1 admin] $ cat/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6


192.168.2.101 rac1.localdomain rac1
192.168.2.102 rac2.localdomain rac2
192.168.0.101 rac1-priv.localdomain rac1-priv
192.168.0.102 rac2-priv.localdomain rac2-priv
192.168.2.103 rac1-vip.localdomain rac1-vip
192.168.2.104 rac2-vip.localdomain rac2-vip

[Oracle @ rac1 admin] $

 

========================================================== ==========================================================


1. Single-node database backup

Note: The backup of a Single-node database has been transferred to the/u02 directory, and you can directly decompress the backup below.

[Oracle @ rac1 u02] $ cd/u02
[Oracle @ rac1 u02] $ tar zxvf backup_db.orcl.tar.gz
Backup_db/
Backup_db/ORCL_24_798936483_1_full_arch.bus
Backup_db/ORCL_25_798936484_1_full_ctl.bus
Backup_db/ORCL_26_798936485_1_full_spfile.bus
Backup_db/orcl_22_7989361__1_full_db.bus
Backup_db/initorcl. ora
Backup_db/orcl_20_7989361__1_full_db.bus
Backup_db/orcl_21_7989361__1_full_db.bus
Backup_db/ORCL_23_798936466_1_full_db.bus
Backup_db/orcl_19_7989361__1_full_arch.bus
[Oracle @ rac1 u02] $


-------------------------------------------------------------------------

Mkdir-p/u02/backup_db/
Chown oracle: dba/u02/backup_db/
Chmod 770/u02/backup_db/

Rman target/

Run {
Allocate channel d1 type disk maxpiecesize = 10G;
Allocate channel d2 type disk maxpiecesize = 10G;
Allocate channel d3 type disk maxpiecesize = 10G;
Backup tag 'full _ db_bk 'filesperset 10
As compressed backupset database force noexclude
Format '/u02/backup_db/% d _ % s _ % t _ % p_full_db.bus'
Plus archivelog delete all input
Format '/u02/backup_db/% d _ % s _ % t _ % p_full_arch.bus ';

Backup current controlfile tag 'full _ db_cntl 'format'/u02/backup_db/% d _ % s _ % t _ % p_full_ctl.bus ';
Backup spfile tag 'full _ db_spfile' format '/u02/backup_db/% d _ % s _ % t _ % p_full_spfile.bus ';

Release channel d1;
Release channel d2;
Release channel d3;
}


SQL> create pfile from spfile;


[Oracle @ ocm18 dbs] $ cat initorcl. ora
Orcl. _ db_cache_size = 432013312
Orcl. _ Java _pool_size = 8388608
Orcl. _ large_pool_size = 4194304
Orcl. _ shared_pool_size = 159383552
Orcl. _ streams_pool_size = 0
*. Audit_file_dest = '/u01/app/oracle/admin/orcl/adump'
*. Background_dump_dest = '/u01/app/oracle/admin/orcl/bdump'
*. Compatible = '10. 2.0.5.0'
*. Control_files = '/u01/app/oracle/oradata/orcl/control01.ctl', '/u01/app/oracle/oradata/orcl/control02.ctl ', '/u01/app/oracle/oradata/orcl/control03.ctl'
*. Core_dump_dest = '/u01/app/oracle/admin/orcl/cdump'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_multiblock_read_count = 16
*. Db_name = 'orcl'
*. Db_recovery_file_dest = '/u01/app/oracle/flash_recovery_area'
*. Db_recovery_file_dest_size = 2147483648
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = orclXDB )'
*. Job_queue_processes = 10
*. Log_archive_format = '% t _ % s _ % r. dbf'
*. Open_cursors = 300
*. Pga_aggregate_target = 201326592
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Sga_target = 605028352
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/u01/app/oracle/admin/orcl/udump'
[Oracle @ ocm18 dbs] $

 

2. Establish the RAC Environment


Operate on two nodes:
Cd $ ORACLE_BASE/admin
Mkdir orcl
Cd orcl/
Mkdir-p adump bdump cdump dpdump hdump pfile scripts udump


Operate on node 1:
[Oracle @ rac1 ~] $ Cd $ ORACLE_HOME/dbs
[Oracle @ rac1 dbs] $ orapwd file = orapworcl1 password = oracle
[Oracle @ rac1 dbs] $

In Node 2:
[Oracle @ rac2 ~] $ Cd $ ORACLE_HOME/dbs
[Oracle @ rac2 dbs] $ orapwd file = orapworcl2 password = oracle
[Oracle @ rac2 dbs] $


3. Modify the initialization parameter file


[Oracle @ rac1 ~] $ Cp/u02/backup_db/initorcl. ora $ ORACLE_HOME/dbs/initorcl1.ora

[Oracle @ rac1 dbs] $ vi $ ORACLE_HOME/dbs/initorcl1.ora

Add:

*. Cluster_database = TRUE
*. Cluster_database_instances = 2
*. Undo_management = AUTO
Orcl1.undo _ tablespace = UNDOTBS1
Orcl1.instance _ name = orcl1
Orcl1.instance _ number = 1
Orcl1.thread = 1
Orcl1.local _ listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.72.101) (PORT = 1521 ))'
Orcl2.instance _ name = orcl2
Orcl2.instance _ number = 2
Orcl2.local _ listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.72.102) (PORT = 1521 ))'
Orcl2.thread = 2
Orcl2.undo _ tablespace = UNDOTBS2
Orcl2.cluster _ database = TRUE
Orcl2.cluster _ database_instances = 2

 

For the added parameters, see the following document:

*. Cluster_database = TRUE
*. Cluster_database_instances = 2
*. Undo_management = AUTO
<SID1>. undo_tablespace = undotbs (undo tablespace which already exists)
<SID1>. instance_name = <SID1>
<SID1>. instance_number = 1
<SID1>. thread = 1
<SID1>. local_listener = <LISTENERNAME >_< HOSTNAME1>
<SID2>. instance_name = <SID2>
<SID2>. instance_number = 2
<SID2>. local_listener = <LISTENERNAME >_< HOSTNAME2>
<SID2>. thread = 2
<SID2>. undo_tablespace = UNDOTBS2
<SID2>. cluster_database = TRUE
<SID2>. cluster_database_instances = 2

<SID1> is equal to "<db_name> 1". <SID2> is equal to "<db_name> 2", e.g. ORCL1, ORCL2.

This article permanently updates the link address:

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.