Using Rman Heterogeneous replication database in Oracle

Source: Internet
Author: User
Tags mkdir scp command backup

RMAN replication and the same machine copy operation procedures are the same, the difference is that we need to copy the backup files to the secondary library

Experimental platform: REDHAT Linux 4.7 + Oracle 10g

Target Library Information:

Oracle_base:/u01/app/oracle

Oracle_home:/u01/app/oracle/product/10.2.0/db_1

Oracle_sid:orcl

ip:192.168.1.20

Secondary Library information:

Oracle_base:/u01/app/oracle

Oracle_home:/u01/app/oracle/product/10.2.0/db_1

Oracle_sid:orcl

ip:192.168.1.21

We use the same instance name as the example, the instance name is the same, the corresponding parameter can be modified in the pfile.

The steps are as follows:

(1) Building a secondary database directory structure

(2) Create pfile and copy to secondary database, modify related content

(3) Create a secondary instance password file

(4) RMAN Backup Source Library

(5) Add configuration Monitor

(6) Copy Source Library backup files to the same location as the secondary library

(7) using the Pfile file to boot the secondary database to the Nomount state

(8) Execute rman Duplicate command copy Database

(9) Create spfile files

(10) Restore backup on tape

(11) Using Dbnewid program to generate new dbid

I. Building a secondary database directory structure

1, Oracle Data directory

[Oracle@localhost oracle]$ mkdir Oradata

[Oracle@localhost oracle]$ ls

Oradata Orainventory Product

[Oracle@localhost oracle]$ CD oradata/

[Oracle@localhost oracle]$ mkdir ORCL

2. Other catalogue

[Oracle@localhost oracle]$ pwd

/u01/app/oracle

[Oracle@localhost oracle]$ mkdir Admin

[Oracle@localhost oracle]$ ls

Admin Oradata orainventory Product

[Oracle@localhost oracle]$ CD Admin

[Oracle@localhost admin]$ ls

[Oracle@localhost admin]$ mkdir ORCL

[Oracle@localhost admin]$ ls

Orcl

[Oracle@localhost admin]$ CD ORCL

[Oracle@localhost orcl]$ mkdir Adump

[Oracle@localhost orcl]$ mkdir Bdump

[Oracle@localhost orcl]$ mkdir Cdump

[Oracle@localhost orcl]$ mkdir Dpdump

[Oracle@localhost orcl]$ mkdir pfile

[Oracle@localhost orcl]$ mkdir Udump

[Oracle@localhost orcl]$ ls

Adump bdump cdump dpdump pfile udump

Second, create Pfile, copy to the secondary database, and modify the relevant parameters

1, create the Pfile file on the source library

Sql> Conn SYS/ADMIN@ORCL as SYSDBA;

Connected.

Sql> create Pfile from SPFile;

File created.

2, use the SCP command to upload the Pfile file to the auxiliary library. To be placed in the $oracle_home/dbs directory, ORACLE is not recognized.

[ORACLE@DB1 orcl]$ Cd/u01/app/oracle/product/10.2.0/db_1/dbs

[ORACLE@DB1 dbs]$ ls

Hc_dave.dat Initdw.ora lkdave ORAPWORCL Spfileorcl.ora

Hc_orcl.dat Init.ora LKORCL SNAPCF_ORCL.F

Initdave.ora Initorcl.ora Orapwdave Spfiledave.ora

[ORACLE@DB1 dbs]$ SCP initorcl.ora 192.168.1.21:/$ORACLE _home/dbs

The authenticity of host ' 192.168.1.21 (192.168.1.21) ' can ' t be established.

RSA key fingerprint is 1a:20:7a:05:bd:e0:ac:04:21:02:b1:72:01:69:40:d6.

Are you sure your want to continue connecting (yes/no) Yes

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

warning:permanently added ' 192.168.1.21 ' (RSA) to the list of known hosts.

oracle@192.168.1.21 ' s Password:

Initorcl.ora 100% 1108 1.1kb/s 00:00

3, on the auxiliary library to confirm whether the file is transmitted over

[Oracle@localhost orcl]$ CD $ORACLE _home/dbs

[Oracle@localhost dbs]$ ls

Initdw.ora Init.ora Initorcl.ora

4, modify the Pfile parameter on the auxiliary library

[Oracle@localhost dbs]$ more Initorcl.ora

orcl.__db_cache_size=167772160

orcl.__java_pool_size=4194304

orcl.__large_pool_size=4194304

orcl.__shared_pool_size=62914560

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.1.0 '

*.control_file_record_keep_time=14

*.control_files= '/u01/app/oracle/oradata/orcl/control01.ctl ', '/u01/app/oracle/or

Adata/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_dest_1= ' Location=/u01/archivelog '

*.open_cursors=300

*.pga_aggregate_target=81788928

*.processes=150

*.remote_login_passwordfile= ' EXCLUSIVE '

*.sga_target=246415360

*.undo_management= ' AUTO '

*.undo_tablespace= ' UNDOTBS1 '

*.user_dump_dest= '/u01/app/oracle/admin/orcl/udump '

Description, I didn't make any changes here, because I copied the instance name identically, the storage location is the same. If you copy the different, you need to modify the relevant instance name. If the storage location is different, you will need to add

The data file location is converted by adding the following parameters.

Db_file_name_convert = ('/u01/app/oracle/oradata/orcl ', '/u01/app/oracle/oradata/dave ')

Third, create a secondary instance orcl password file

[Oracle@localhost dbs]$ CD $ORACLE _home/bin

[Oracle@localhost bin]$ orapwd file= $ORACLE _home/dbs/orapworcl password=admin

[Oracle@localhost bin]$ CD $ORACLE _home/dbs

[Oracle@localhost dbs]$ ls

Initdw.ora Init.ora Initorcl.ora ORAPWORCL

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.