Professional Documents
Culture Documents
Oracle DG Using Rman Duplicate
Oracle DG Using Rman Duplicate
Home (/) About (https://www.ktexperts.com/about/) Log In (https://www.ktexperts.com/ktexpertsadminlogin/) Register (/ktexpertsadminlogin/?action=register) Upcoming Sessions (https://www.ktexperts.com/upcoming-sessions/)
(https://www.linkedin.com
(https://www.facebook.com
(https://twitter.com
/company
Follow Us /ktexperts)
/ktexpertsadmin
/ktexperts/
(https://www.ktexperts.com)
Oracle DBA Oracle RAC GoldenGate Cassandra (/category/cassandra/) AWS SQL Server (/category/sql-server-dba/) DevOps MySQL Authors INDEX Daily Tips
Follow (https://www.linkedin.com/in/ajay-kumar90/)
Facebook
Google Plus
Tags
How to build ACTIVE STANDBY DATABASE using RMAN DUPLICATE command in 12c.(Video included)
Posted on June 5, 2018 in Oracle Dataguard (https://www.ktexperts.com/category/oracle-dba/oracle-dataguard/), Oracle DB Admin (https://www.ktexperts.com/category/oracle-dba/), RMAN (Recovery Manager) (https://www.ktexperts.com/category/oracle-dba/rman-recovery-manager/)
Share via:
How to build ACTIVE STANDBY DATABASE using RMAN DUPLICATE command in ORACLE DATABASE 12c.
Data Guard is the name for Oracle’s standby database solution, used for disaster recovery and high availability. This article contains an updated version of the 12cR1 active standby setup using RMAN duplicate method posted here.
Some key points before proceeding with the ACTIVE STANDBY setup.
2.We need to configure Oracle Net Services from both DBA12 and DBA13 servers.
1 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
At Standby side : Configure tnsnames.ora and check whether its pings to primary listener or not.
[oracle@dba12 ~]$ vi tnsnames.ora
to_apacprod =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.13 )(PORT = 9988))
)
(CONNECT_DATA =
(SID = apacprod)
)
)
[oracle@dba12 ~]$ tnsping to_apacprod
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 04-JUN-2018 19:02:09
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.13)(PORT = 9988))) (CONNECT_DATA = (SID = apacprod)))
OK (70 msec)
Export new SID then configure and start the listener at same side.
At Primary Side : Configure tnsnames.ora and check whether its pings to standby listener or not.
[oracle@dba13 ~]$ vi tnsnames.ora
to_apacstand=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.12 )(PORT = 8899))
)
(CONNECT_DATA =
(SID = apacstand)
)
)
[oracle@dba13 ~]$ tnsping to_apacstand
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 04-JUN-2018 19:04:28
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.12)(PORT = 8899))) (CONNECT_DATA = (SID = apacstand)))
OK (50 msec)
At Primary Side :
3.Create a directory structure to store Initialization parameter file,password file & standby controlfile.
2 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
7. Send Intialization parameter file ,standby control file & password file to standby server.
At Standby side :
8.Move the pfile and passwd file from primary instance name to standby instance name and modify pfile with required parameters.
[oracle@dba12 apacprod]$ ls
initapacstand.ora orapwapacstand stand.ctl
[oracle@dba12 apacprod]$ mv initapacprod.ora $ORACLE_HOME/dbs/init$ORACLE_SID.ora
[oracle@dba12 apacprod]$ mv orapwapacprod $ORACLE_HOME/dbs/orapw$ORACLE_SID
[oracle@dba12 apacprod]$ cd $ORACLE_HOME/dbs
[oracle@dba12 dbs]$ vi initapacstand.ora
db_name=apacprod
db_unique_name=apacstand
#memory_target=1G
processes = 150
#audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
#db_recovery_file_dest='<ORACLE_BASE>/fast_recovery_area'
#db_recovery_file_dest_size=2G
diagnostic_dest=/u01/oradata/apacprod
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS'
# You may want to ensure that control files are created on separate physical
log_archive_dest_1='location=/u01/oradata/apacprod/arch'
log_archive_dest_2='service=to_apacprod lgwr sync affirm reopen=3'
standby_file_management=auto
fal_server=to_apacprod
fal_client=to_apacstand
db_file_name_convert='/u01/oradata/apacprod','/u02/oradata/apacstand'
log_file_name_convert='/u01/oradata/apacprod','/u02/oradata/apacstand'
control_files =/u01/oradata/apacprod/stand.ctl
compatible ='12.1.0'
The command completed successfully
At Primary Side :
10.Connect to RMAN prompt using auxiliary Oracle net services and issue below Duplicate command.
3 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
RMAN> duplicate target database for standby from active database nofilenamecheck;
Starting Duplicate Db at 05-JUN-18
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=23 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=24 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/oraeng/app/oracle/product/12.1.0/dbs/orapwapacprod' auxiliary format
'/oraeng/app/oracle/product/12.1.0/dbs/orapwapacstand' ;
}
executing Memory Script
Starting backup at 05-JUN-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=58 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=60 device type=DISK
Finished backup at 05-JUN-18
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/u01/oradata/apacprod/stand.ctl';
}
executing Memory Script
Starting backup at 05-JUN-1
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/oradata/apacprod/rman/snapcf_apacprod.f tag=TAG20180605T151139
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 05-JUN-18
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/oradata/apacprod/temp.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/oradata/apacprod/system.dbf";
set newname for datafile 2 to
"/u01/oradata/apacprod/sysaux.dbf";
set newname for datafile 3 to
"/u01/oradata/apacprod/undotbs.dbf";
set newname for datafile 4 to
"/u01/oradata/apacprod/userdata.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/u01/oradata/apacprod/system.dbf" datafile
2 auxiliary format
"/u01/oradata/apacprod/sysaux.dbf" datafile
3 auxiliary format
"/u01/oradata/apacprod/undotbs.dbf" datafile
4 auxiliary format
"/u01/oradata/apacprod/userdata.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/oradata/apacprod/temp.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 05-JUN-18
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/oradata/apacprod/system.dbf
channel ORA_DISK_2: starting datafile copy
input datafile file number=00002 name=/u01/oradata/apacprod/sysaux.dbf
output file name=/u01/oradata/apacprod/system.dbf tag=TAG20180605T151151
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/oradata/apacprod/undotbs.dbf
output file name=/u01/oradata/apacprod/sysaux.dbf tag=TAG20180605T151151
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:36
channel ORA_DISK_2: starting datafile copy
input datafile file number=00004 name=/u01/oradata/apacprod/userdata.db
output file name=/u01/oradata/apacprod/undotbs.dbf tag=TAG20180605T151151
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
output file name=/u01/oradata/apacprod/userdata.dbf tag=TAG20180605T151151
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:16
Finished backup at 05-JUN-18
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=3 STAMP=978016367 file name=/u01/oradata/apacprod/system.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=4 STAMP=978016367 file name=/u01/oradata/apacprod/sysaux.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=978016367 file name=/u01/oradata/apacprod/undotbs.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=978016367 file name=/u01/oradata/apacprod/userdata.dbf
Finished Duplicate Db at 05-JUN-18.
At Primary Side :
11.Check archive log files at both primary and standby side.
At Standby Side :
SYS>>select name,applied from v$archived_log;
NAME APPLIED
---------------------------------------- ---------
/u01/oradata/apacprod/arch/1_250_976404635.dbf NO
/u01/oradata/apacprod/arch/1_249_976404635.dbf NO
/u01/oradata/apacprod/arch/1_251_976404635.dbf NO
12.Enable Managed recovery mode at standby side and check archive logs.
4 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
Share via:
5 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
Previous Post: Multi-tenant Architecture & Creating database manually in Oracle 12c (https://www.ktexperts.com/oracle-12c-multitenant-architecture-creating-database-manually/)
Next Post: What are the Oracle 12c Pluggable databases? How does a pluggable database work?(Video included) (https://www.ktexperts.com/what-are-the-oracle-12c-pluggable-databases-how-does-a-pluggable-database-work/)
3 thoughts on “How to build ACTIVE STANDBY DATABASE using RMAN DUPLICATE command in 12c.(Video included)”
please go through the video https://vimeo.com/275067477 (https://vimeo.com/275067477) and share your valuable feedback in comments section.
6 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
If you are interested to know more details about future session please join below telegram group :
https://t.me/joinchat/JFVAtAv1TE9DGHLbJ6rZbw (https://t.me/joinchat/JFVAtAv1TE9DGHLbJ6rZbw)
hi,
you are issuing duplicate target database for standby from active database from primary.
this command is supposed to be executed @ standby side right? please confirm
Add Comment
Name (required)
Email (required)
Website (optional)
Save my name, email, and website in this browser for the next time I comment.
Submit Comment
(https://www.ktexperts.com/upcoming-sessions/)
Achievements
(https://www.feedspot.com
/infiniterss.php?_src=feed_title&
followfeedid=5075710&q=site:https
%3A%2F
%2Fwww.ktexperts.com%2Ffeed%2F)
Our Rank is #37
00:00 02:53
Started ktexperts.com with a small hope of sharing knowledge, And today we can proudly say that ktexperts.com is being accessed from all corners of the world. Here’s a glimpse of our growth.
Categories
Select Category
Recent Comments
CBD oil for sale (https://www.sfexaminer.com/marketplace/buy-cbd-oil-top-3-cbd-oils-for-sale-in-2020/) on Oracle_Apps: How To Kill runaway processes After Terminating Concurrent Request (https://www.ktexperts.com/oracle_apps-how-to-kill-runaway-processes-after-terminating-
7 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
concurrent-request/#comment-6179)
CBD oil for sale (https://observer.com/2021/02/best-pure-cbd-oil-for-sale-top-brand-reviews/) on Oracle_Apps: How To Kill runaway processes After Terminating Concurrent Request (https://www.ktexperts.com/oracle_apps-how-to-kill-runaway-processes-after-terminating-
concurrent-request/#comment-6177)
santhi on How to download and Install Chef in Amazon EC2 Linux Instance (https://www.ktexperts.com/how-to-download-and-install-chef-in-amazon-ec2-linux-instance/#comment-3428)
Nayab on How to download and Install Chef in Amazon EC2 Linux Instance (https://www.ktexperts.com/how-to-download-and-install-chef-in-amazon-ec2-linux-instance/#comment-3229)
Recent Posts
Installation of AWS CLI and S3FS (https://www.ktexperts.com/installation-of-aws-cli-and-s3fs/) April 19, 2021
How to Switch/Recreate Undo Tablespace at PDB Level(12cR2) (https://www.ktexperts.com/how-to-switch-recreate-undo-tablespace-at-pdb-level12cr2/) April 12, 2021
Oracle Sample Unix script to monitor select query during Load Test (https://www.ktexperts.com/oracle-sample-unix-script-to-monitor-select-query-during-load-test/) March 25, 2021
Ratings
Oracle : Oracle Server Architecture (https://www.ktexperts.com/oracle-oracle-server-architecture/) (5.00 out of 5)
Oracle_Apps: How To Kill runaway processes After Terminating Concurrent Request (https://www.ktexperts.com/oracle_apps-how-to-kill-runaway-processes-after-terminating-concurrent-request/) (5.00 out of 5)
About KTEXPERTS
KT Experts is one enthusiastic knowledge-sharing platform. The platform concentrates on all Database Technologies like Oracle Database Administration(DBA), Oracle RAC, Oracle GoldenGate, MySQL, SQL Server Database Administration, Cassandra, AWS and DevOps.
This page consists of all the well-developed articles of the Technologies. This is an effort of many dedicated professionals for a better IT world.
We have received the best reviews over time and the usage of this page has been increasingly drastic. So why wait? Let’s get started!!!
Thank you
(https://www.ktexperts.com/important-oracle-vparameters-securecrt/)
Important Oracle v$parameters (SecureCRT) (https://www.ktexperts.com/important-oracle-vparameters-securecrt/)
(https://www.ktexperts.com/how-to-switch-recreate-undo-tablespace-at-pdb-level12cr2/)
How to Switch/Recreate Undo Tablespace at PDB Level(12cR2) (https://www.ktexperts.com/how-to-switch-recreate-undo-tablespace-at-pdb-level12cr2/)
(https://www.ktexperts.com/manage-sql-profile-in-oracle-database/)
Manage SQL Profile in Oracle Database (https://www.ktexperts.com/manage-sql-profile-in-oracle-database/)
(https://www.ktexperts.com/resource-manager-in-oracle/)
Resource Manager in Oracle (https://www.ktexperts.com/resource-manager-in-oracle/)
Our Partners
Our Partners
(http://www.nocoug.org/)
Scholar IT Solutions
8 of 9 4/25/2021, 3:37 PM
How to build ACTIVE STANDBY DATABASE using RMAN DUPLI... https://www.ktexperts.com/how-to-build-active-standby-database-using-...
(http://scholaritinc.com/)
Website Visitors
(http://www3.clustrmaps.com
/counter/maps.php?url=https:
//www.ktexperts.com)
9 of 9 4/25/2021, 3:37 PM