Oracle 11gR2 Duplicate target database for standby

Source: Internet
Author: User

1. Copy standby control file from primary DB to standby DB and rename the file name and location in Stdby DB same as the P Rimary DB

2. Copy password file from primary db to the standby db (keep both of them same)

3. Use the Pfile to startup the standby database using >>>>>>>>>>

sql> Conn [email protected] as Sysdba
Enter Password:
Connected to the idle routine.
sql> startup Nomount pfile= ' D:\pfileBRS.ora '
The ORACLE routine has been started. Startup Nomount pfile= '

>>>use Recovery Catalog to duplicate database

Rman target  sys/[email protected]   Auxiliary sys/[email  protected] catalog Rman/[ Email protected]

Run
{
Allocate channel DISK1 device type disk;
Allocate channel DISK2 device type disk;
Allocate channel DISK3 device type disk;
Allocate channel DISK4 device type disk;
Allocate auxiliary channel AUX1 device type disk;
Allocate auxiliary channel AUX2 device type disk;
Allocate auxiliary channel AUX3 device type disk;
Allocate auxiliary channel AUX4 device type disk;
DUPLICATE TARGET DATABASE
For STANDBY
From ACTIVE DATABASE
Dorecover
PASSWORD FILE
SPFILE
SET db_unique_name= ' brsstby ' COMMENT ' is standby '
SET log_archive_dest_2= ' Service=brs ASYNC valid_for= (online_logfiles,primary_role) Db_unique_name=brs '
SET fal_server= ' BRS ' COMMENT ' is primary '
Nofilenamecheck;
}

sql> shutdown immediate;
Ora-01109:database not open
sql> startup Mount;

sql> ALTER DATABASE recover managed standby database disconnect from session;

Start the Apply process on standby server.

# Foreground Redo apply. Session never returns until cancel.
ALTER database RECOVER MANAGED STANDBY database;

# Background Redo apply. Control is returned to the session once the apply process is started.

ALTER database RECOVER MANAGED STANDBY database DISCONNECT from SESSION;

If you need to cancel the apply process, issue the following command.

sql> ALTER database RECOVER MANAGED STANDBY database CANCEL;

On Primary:

Sql> Archive Log List
sql> alter system switch logfile;


On Standby:

Sql> SELECT sequence#,applied from V$archived_log ORDER by sequence#;

sequence# applied
———- —————————
YES
YES
YES
YES
In-memory

sql> ALTER DATABASE REGISTER LOGFILE ' <archive destination with archive file> ';


On prod DB
Sql> SELECT status,process from V$managed_standby;

STATUS PROCESS
------------ ---------
CLOSING ARCH
CLOSING ARCH
CLOSING ARCH
WRITING LNS

On standby

Sql> SELECT status,process from V$managed_standby;

Sql> select Database_role from V$database;

Database_role
————————————————
Physical STANDBY


Note The data Guard boot sequence:
Start sequence: First standby, after primary;
Closing order: first primary after standby;


Sql> Select member from V$logfile;

MEMBER
-----------------------------------------------
G:\ORACLE_DATA\BRS\REDO41. LOG
D:\ORACLE_DATA\BRS\REDO42. LOG
F:\ORACLE_DATA\BRS\REDO31. LOG
G:\ORACLE_DATA\BRS\REDO32. LOG
E:\ORACLE_DATA\BRS\REDO21. LOG
F:\ORACLE_DATA\BRS\REDO22. LOG
D:\ORACLE_DATA\BRS\REDO11. LOG
E:\ORACLE_DATA\BRS\REDO12. LOG
E:\ORACLE_DATA\STANDBYBRS\STDY_REDO51. LOG
D:\ORACLE_DATA\STANDBYBRS\STDY_REDO52. LOG
F:\ORACLE_DATA\STANDBYBRS\STDY_REDO61. LOG

MEMBER
-----------------------------------------------
G:\ORACLE_DATA\STANDBYBRS\STDY_REDO62. LOG
E:\ORACLE_DATA\STANDBYBRS\STDY_REDO71. LOG
F:\ORACLE_DATA\STANDBYBRS\STDY_REDO72. LOG
D:\ORACLE_DATA\STANDBYBRS\STDY_REDO81. LOG
E:\ORACLE_DATA\STANDBYBRS\STDY_REDO82. LOG

16 rows have been selected.

Oracle 11gR2 Duplicate target database for standby

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.