Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Abhishek.

Asked: August 21, 2020 - 10:44 am UTC

Last updated: August 31, 2020 - 4:00 am UTC

Version: Oracle 12g 12.2.0.1.0

Viewed 1000+ times

You Asked

Situation: Primary (Production) DB and Standby DB exists on 2 separate machines. We want to test the DR and then rebuild it from scratch.

In the process of performing this activity, I have a couple of doubts:

(Before Breaking DR)

1. Primary DB is in archivelog mode. So, generally, there is a frequency by which the archivelogs are generated. However, now, I would like to generate an archivelog at will. How do I go about it? Will it be absolutely harmless to the Primary DB? Are the below 2 statements sufficient to generate an archivelog at will? (no risk factor involved?)

SQL>alter system switch logfile;
SQL>alter system archive log current;

(After breaking DR, conducting the test, rebuilding the DR)

2. While taking cold backup of the primary DB, how do i take backup of the control file?

3. Do I need to take cold back up of temp files in temp tablespace of primary DB and restore them in the DR server?

4. The ORACLE_HOME OF primary and standby are different. However, I will be rebuilding the DR from the standby control file generated in the Primary DB. In that case, will it create a conflict in DR (standby DB)?

Thanks in Advance!

Abhishek G
Kolkata, India

and Connor said...

1) I prefer "alter system archive log current;" because the command waits until the archival has been done, so you know that the process has completed.

2) Use RMAN. Start your database in MOUNT mode and then take a full backup including the control file. Alternatively, with the database totally shut down, just take a file-copy based backup of every file associated with the database, for example

select name from v$controlfile
union all
select name from v$datafile
union all
select member from v$logfile
union all
select name from v$tempfile


but often just easier to let RMAN take care of it.

3) No you don't. Tempfiles can be recreated when the DR node needs to be opened. But there is also no harm in doing so.

4) When you are rebuilding the DR standby database, I would follow the recreation steps in the docs . They also cover the issue of file name/path modification

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sbydb/creating-oracle-data-guard-physical-standby.html#GUID-A86D403B-B3F5-4B05-9255-5BADD513F9CF

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thank You

Abhishek Ghosh, August 28, 2020 - 2:04 am UTC

Hi,

Been eagerly waiting for the response. Thank you so much for the answers. Helps me a lot.
Connor McDonald
August 31, 2020 - 4:00 am UTC

Glad we could help

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database