0% found this document useful (0 votes)
300 views5 pages

How To Add Second Standby - Document 842822.1

Uploaded by

vimeshpateldba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views5 pages

How To Add Second Standby - Document 842822.1

Uploaded by

vimeshpateldba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Document 842822.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=1cjxojvrfs_236&id...

Copyright (c) 2023, Oracle. All rights reserved. Oracle Confidential.

How to Add Second Standby in Existing Dataguard Configuration With Broker Using DGMGRL (Doc ID 842822.1)

In this Document

Goal
Solution
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 18.6.0.0.0 [Release 10.2 to 18]
Information in this document applies to any platform.

GOAL

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data
from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material.
Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

Primary database: prim


Physical standby database: mystd
Physical standby database (disabled): sstd
Name: DRS001
New Server Name: STTD
Backup Location: /tmp
Aux pfile: initsstd.ora
Aux db_unique_name, service_name: sstd

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

1 of 5 02/02/23, 3:49 pm
Document 842822.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=1cjxojvrfs_236&id...

This document provides the step by step approach on adding a second standby to an existing dataguard configuration.

DGMGRL> show configuration;

Configuration
Name: DRS001
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
prim - Primary database
mystd - Physical standby database

Current status for "DRS001":


SUCCESS

Lets add another standby with the name SSTD.

SOLUTION

Procedure
========

1) Take RMAN backup of PRIMARY database and controlfile for standby


2) Create pfile from spfile in PRIMARY and make necessary changes
3) Copy the files (Rman Backups , PFILE ) to the new server (SSTD)
4) Use RMAN Duplicate to create the standby database
5) Set log_archive_config parameter in all the database
6) Create SRL - Standby Redo Logs if required in second standby (SSTD)
7) Update log_archive_Dest_n parameter in PRIMARY that will be the remote archival for second standby and enable the log_archive_dest_state_n
8) Enable DG Broker in second standby SSTD
9) Add the second standby (SSTD) to the broker from PRIMARY
10) Enable second standby (SSTD)
11) Verify by using show configuration.

Detailed Steps
==========
1) Take RMAN backup of PRIMARY database and controlfile for standby

RMAN> BACKUP DATABASE FORMAT '/tmp/prim_db_%U';


RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/tmp/prim_ctl_%U';

2 of 5 02/02/23, 3:49 pm
Document 842822.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=1cjxojvrfs_236&id...

2) Create pfile from spfile in PRIMARY and make necessary changes

SQL> create pfile = '/tmp/initsstd.ora' from spfile;

Example of changes:
db_unique_name = 'sstd'
db_name='prim'
fal_server=prim,mystd
fal_client=sstd
db_file_name_convert = 'prim','sstd'
log_file_name_convert = 'prim','sstd'
log_archive_dest_1 =LOCATION=USE_DB_RECOVERY_FILE_DEST

NOTE : On first standby FAL_SERVER parameter we can add this standby also.

For example,

On mystd,

alter system set FAL_SERVER='prim','sstd';

3) Copy the files (Rman Backups , PFILE ) to the new server (SSTD)

$ scp /tmp/* oracle@sstd:/tmp/

4) Use RMAN Duplicate to create the standby database

a) Configure tnsnames.ora in primary and second standby so that they can communicate each other and verify using tnsping.
example: $ tnsping prim

b) In second standby server create spfile from pfile and STARTUP NOMOUNT the instance.connect to RMAN as below and use DUPLICATE

$ RMAN target sys@prim auxiliary /

RMAN> duplicate target database for standby;

5) Set log_archive_config parameter in all the database (prim, mystd, sstd)

3 of 5 02/02/23, 3:49 pm
Document 842822.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=1cjxojvrfs_236&id...

SQL> alter system set log_archive_config='dg_config=(prim,mystd,sstd)';

6) Create SRL - Standby Redo Logs if required in second standby (SSTD)

SQL> alter database add standby logfile group 4 '/u01/app/oradata/sstd/sredo1.log' size 50M ;

if ASM filesystem

SQL> alter database add standby logfile group 4 '+<AsmDiskGroupName>' size 50M ;

7) Update log_archive_Dest_n parameter in PRIMARY that will be the remote archival for second standby and enable the log_archive_dest_state_n

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3 ='service=sstd lgwr async affirm valid_for=(online_logfiles,primary_role)
db_unique_name=sstd';

8) Enable DG Broker in second standby SSTD

SQL> ALTER SYSTEM SET DG_BROKER_START = TRUE;

9) Add the second standby (SSTD) to the broker from PRIMARY

DGMGRL> add database sstd as connect identifier is sstd maintained as physical;

DGMGRL> show configuration;

Configuration
Name: DRS001
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED

4 of 5 02/02/23, 3:49 pm
Document 842822.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=1cjxojvrfs_236&id...

Databases:
prim - Primary database
mystd - Physical standby database
sstd - Physical standby database (disabled)

10) Enable second standby (SSTD)

DGMGRL> enable database sstd;

11) Verify by using show configuration.

DGMGRL> show configuration;

Configuration
Name: DRS001
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
prim - Primary database
mystd - Physical standby database
sstd - Physical standby database

Current status for "DRS001":


SUCCESS

REFERENCES

NOTE:837102.1 - Step By Step Guide On Creating Physical Standby Using RMAN Backup based Duplicate In ASM For ASM Primary
Didn't find what you are looking for?

5 of 5 02/02/23, 3:49 pm

You might also like