ORA-1017 and ORA-16047 in Dataguard

Issue:

Primary not able to connect to standby database, no RFS process started on standby database.

Alert log on primary has ORA 1017 errors and trace file has ORA-16047

ORA-16047: DGID mismatch between destination setting and target database

Troubleshooting:

Recreated the password file on primary and copied to standby database, but still primary LNS not able to communicate to RFS on standby

select process, status from v$managed_standby;  — RFS not started on DR database

I am able to connect to standby database using sqlplus with the recreated password file.

Solution:

LOG_ARCHIVE_CONFIG parameter is missing from standby database , though password file is fine , primary not able to authenticate the DR DB unique_name as the LOG_ARCHIVE_CONFIG is missing.

alter system set log_archive_config=’DG_CONFIG=(primary,DR)’ scope=both

Above parameter setting resolved the issue.

 

 

 

 

 

Snapshot Standby database Oracle 11g

Snapshot standby database allows to open the database in read/write mode and continues to ship the redo from primary which can later be applied after reverting the database to Physical standby.

Application has a test case which needs to be tested in production, so converted the database to snapshot standby database and reverted back to physical standby after they finished their testing.

Check if Flash back enabled for the database

SQL> select flashback_on from v$database;

FLASHBACK_ON
——————
NO

Set the DB_RECOVERY_FILE_DEST and FLASH recovery area. Default retention(DB_FLASHBACK_RETENTION_TARGET) time is 1 day, so set the retention period and size as required.

SQL> alter system set db_recovery_file_dest=’/u03/ofaroot/PROD_FLASHBACK/’ scope=spfile;

System altered.

SQL> alter system set db_recovery_file_dest_size=50G scope=both;

System altered.

Mount the Instance:
SQL> startup nomount
ORACLE instance started.

Total System Global Area 1.0189E+10 bytes
Fixed Size 2247376 bytes
Variable Size 6023021872 bytes
Database Buffers 4143972352 bytes
Redo Buffers 19460096 bytes
SQL> alter database mount standby database;

Database altered.

Check if parameters are modified: 

SQL> show parameter db_recovery_file_dest

NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string /u03/ofaroot/PROD_FLAS
HBACK
db_recovery_file_dest_size big integer 50G

Enable Flashback:

SQL> alter database flashback on;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
——————
YES

Stop the MRP Process and start the DB in mount mode

SQL> alter databAse recover managed standby database cancel;

Database altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1.0189E+10 bytes
Fixed Size 2247376 bytes
Variable Size 6023021872 bytes
Database Buffers 4143972352 bytes
Redo Buffers 19460096 bytes
Database mounted.
SQL> select name from v$database;

NAME
———
PROD

Convert the database to Snapshot standby:

SQL> alter database convert to snapshot standby;

Database altered.

Alertlog Entries:
alter database convert to snapshot standby
Created guaranteed restore point SNAPSHOT_STANDBY_REQUIRED 12:41:17
krsv_proc_kill: Killing 3 processes (all RFS)
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
RESETLOGS after incomplete recovery UNTIL CHANGE 7195028071
Resetting resetlogs activation ID 3952627246 (0xeb984e2e)

Snapshot database creates a guaranteed restore point , so make sure sufficient space is maintained in flash recovery area.
Open the database:

SQL> alter database open;

Database altered.

SQL> select instance_name,database_role,open_mode from v$database,v$Instance;

INSTANCE_NAME DATABASE_ROLE OPEN_MODE
—————- —————- ——————–
PROD SNAPSHOT STANDBY READ WRITE

Reverting the database to physical standby:

SQL> shutdown immediate
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1.0189E+10 bytes
Fixed Size 2247376 bytes
Variable Size 6023021872 bytes
Database Buffers 4143972352 bytes
Redo Buffers 19460096 bytes
Database mounted.

SQL> alter database convert to physical standby;
Database altered.

Alertlog Entries:

alter database convert to physical standby
ALTER DATABASE CONVERT TO PHYSICAL STANDBY (PROD)
krsv_proc_kill: Killing 3 processes (all RFS)
Flashback Restore Start
Flashback Restore Complete
Drop guaranteed restore point
Guaranteed restore point dropped

Convert to Physical standby statement will flashback to the guaranteed restore point and drops the guaranteed restore point as they do not age out.

SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1.0189E+10 bytes
Fixed Size 2247376 bytes
Variable Size 6023021872 bytes
Database Buffers 4143972352 bytes
Redo Buffers 19460096 bytes
Database mounted.

Start the MRP:

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select instance_name,database_role,open_mode from v$database,v$Instance;

INSTANCE_NAME DATABASE_ROLE OPEN_MODE
—————- —————- ——————–
PROD PHYSICAL STANDBY MOUNTED

Archive Gap on Standby Database

Issue:

Common issue of large archive gap on standby database , the concerned archives are compressed on primary so gap wasn’t resolved.  We can do incremental backup and recovery on standby to resolve the issue quickly but wanted to resolve the issue without restore.

Standby Alert log:

Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:06:47 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:06:58 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:07:09 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344

Primary:
Though I have uncompressed the respective archives on primary , but the standby is still not able to fetch the archives that are in gap sequence

[oracle.prima]: ls -ltr *11531*
-rw-r—– 1 oracle dba 240601600 Aug 23 03:03 prima_115310_1_796216110.arc
-rw-r—– 1 oracle dba 240602624 Aug 23 03:03 prima_115311_1_796216110.arc
-rw-r—– 1 oracle dba 240598016 Aug 23 03:03 prima_115312_1_796216110.arc
-rw-r—– 1 oracle dba 221271040 Aug 23 03:07 prima_115313_1_796216110.arc
-rw-r—– 1 oracle dba 214846464 Aug 23 03:08 prima_115314_1_796216110.arc
-rw-r—– 1 oracle dba 240604672 Aug 23 03:08 prima_115315_1_796216110.arc
-rw-r—– 1 oracle dba 231251456 Aug 23 03:08 prima_115316_1_796216110.arc
-rw-r—– 1 oracle dba 235036672 Aug 23 03:09 prima_115317_1_796216110.arc
-rw-r—– 1 oracle dba 215901184 Aug 23 03:09 prima_115318_1_796216110.arc
-rw-r—– 1 oracle dba 238041088 Aug 23 03:09 prima_115319_1_796216110.arc
[.oracle.prima]: ls -ltr *11530*
-rw-r—– 1 oracle dba 236550144 Aug 23 03:01 prima_115300_1_796216110.arc
-rw-r—– 1 oracle dba 240603648 Aug 23 03:01 prima_115301_1_796216110.arc
-rw-r—– 1 oracle dba 239972864 Aug 23 03:01 prima_115302_1_796216110.arc
-rw-r—– 1 oracle dba 240598528 Aug 23 03:01 prima_115303_1_796216110.arc
-rw-r—– 1 oracle dba 240598016 Aug 23 03:02 prima_115304_1_796216110.arc
-rw-r—– 1 oracle dba 240599552 Aug 23 03:02 prima_115305_1_796216110.arc
-rw-r—– 1 oracle dba 232717824 Aug 23 03:02 prima_115306_1_796216110.arc
-rw-r—– 1 oracle dba 240599040 Aug 23 03:02 prima_115307_1_796216110.arc
-rw-r—– 1 oracle dba  230410240 Aug 23 03:03 prima_115308_1_796216110.arc
-rw-r—– 1 oracle dba  240602112 Aug 23 03:03 prima_115309_1_796216110.arc

Standby Alertlog:

Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:24:47 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:24:58 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344
Thu Aug 27 12:24:09 2015
Fetching gap sequence in thread 1, gap sequence 115308-115344

Reason:

The issue is primary control file lost the information related to archives missing as nightly backup has script to delete obsolete/expired backups/archives.

RMAN log for the deleted archives as they are marked expired due to zipping.

deleted archived log
archived log file name=/u1385/u08/oracle/admin/prima/arch/prima_115308_1_796216110.arc RECID=117130 STAMP=888462183
deleted archived log
archived log file name=/u1385/u08/oracle/admin/prima/arch/prima_115309_1_796216110.arc RECID=117132 STAMP=888462196
deleted archived log
archived log file name=/u1385/u08/oracle/admin/prima/arch/prima_115310_1_796216110.arc RECID=117133 STAMP=888462207
deleted archived log
archived log file name=/u1385/u08/oracle/admin/prima/arch/prima_115311_1_796216110.arc RECID=117135 STAMP=888462222
deleted archived log
archived log file name=/u1385/u08/oracle/admin/prima/arch/prima_115312_1_796216110.arc RECID=117136 STAMP=888462233

Solution:

We can have two options 1) To register the archives again on primary 2) Copy the archives to standby and register directly in standby. I have used second option below , I tested first option as well and it worked fine.

[oracle.prima]: scp prima_1153*arc oracle.standby:/u1385/u08/oracle/admin/prima/arch

To catalog large number of archives using “alter database register logfile” is time consuming, so we can catalog all archives using rman.
RMAN> catalog start with ‘/u1385/u08/oracle/admin/prima/arch_missing/’;

using target database control file instead of recovery catalog
searching for all files that match the pattern /u1385/u08/oracle/admin/prima/arch_missing/

List of Files Unknown to the Database
=====================================
File Name: /u1385/u08/oracle/admin/prima/arch_missing/prima_115357_1_796216110.arc

Standby able to resolve the gap issue.

ORA-01274 in Dataguard

Standby database out of sync with primary due to missing datafile.

Errors in alertlog
MRP0: Background Media Recovery terminated with error 1274
Errors in file /u01/ofaroot/TEST/diag/diag/rdbms/TESTdr/TEST/trace/TEST_pr00_1486.trc:
ORA-01274: cannot add datafile ‘/u01/oradata/TEST/TEST/2014ro.dbf’ – file could not be created
Managed Standby Recovery not using Real Time Apply

Recovery stopped due to failure in applying recovery marker (opcode 17.30).
Datafiles are recovered to a consistent state at change 11276608262328 but controlfile could be ahead of datafiles.

Check status of files in Standby :

SQL> select file#,status from v$datafile where status <>’ONLINE’ and status<>’SYSTEM’;

FILE# STATUS
———- ——-
3 RECOVER
17 RECOVER

SQL> select file#,name from v$datafile where file# in (17,3);

FILE#
———-
NAME
——————————————————————————–
3
/uv1248/u01/oradata/TEST/TEST/undotbs01.dbf

17
/apps/oracle/product/11.2.0.3.2014CPUQ4/dbs/UNNAMED00017

Stop the recovery process on standby if it is not already

SQL> alter database recover managed standby database cancel;

Database altered.

Create datafile on standby database:

SQL> alter database create datafile ‘/apps/oracle/product/11.2.0.3.2014CPUQ4/dbs/UNNAMED00017’ as ‘/uv1248/u01/oradata/TEST/TEST/2014ro.dbf’ ;

Database altered.

SQL> alter system set standby_file_management=auto scope=both;

System altered.

Start the recovery process;

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

12C DG Broker ,FSFO -Testing

1) Set DG_BROKER_START parameter on both databases.

SQL> alter system set DG_BROKER_START=true scope=both;

System altered.

SQL> sho parameter dg_broker_start

NAME TYPE VALUE
———————————— ———– ——————————
dg_broker_start boolean TRUE

2) Define a service for the listener that includes the db_unique_name_DGMGRL.db_domain values for the GLOBAL_DBNAME:

SID_LIST_LISTENER_TESTCDB=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME = TESTCDB_DGMGRL)
(SID_NAME=TESTCDB)
(ORACLE_HOME=/apps/oracle/product/12.1.0/DB_1)
)
)

SID_LIST_LISTENER_TESTSTBY=
(SID_LIST=
(SID_DESC=
(SID_NAME=TESTSTBY)
(ORACLE_HOME=/apps/oracle/product/12.1.0/DB_1)
)
(SID_DESC =
(GLOBAL_DBNAME = TESTSTBY_DGMGRL)
(ORACLE_HOME = /apps/oracle/product/12.1.0/DB_1/)
(SID_NAME = TESTSTBY)
)
)

3) Broker configuration will take care of LOG_ARCHIVE_DEST_n , so unset the parameter

[oracle@VM3 admin]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.1.0 – 64bit Production

Copyright (c) 2000, 2012, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/xxxxxxx
Connected as SYSDG.
DGMGRL> create configuration ‘TESTBROKER’ as primary database is ‘TESTCDB’ connect identifier is ‘TESTCDB’;
Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added

DGMGDL> exit

SQL> alter system set LOG_ARCHIVE_DEST_2=” scope=both;

System altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Add Primary and Standby databases to broker

[oracle@VM3 admin]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.1.0 – 64bit Production

Copyright (c) 2000, 2012, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/xxxxxxx
Connected as SYSDG.
DGMGRL> create configuration ‘TESTBROKER’ as primary database is ‘TESTCDB’ connect identifier is ‘TESTCDB’;
Configuration “TESTBROKER” created with primary database “TESTCDB”
DGMGRL> add database ‘TESTSTBY’ as connect identifier is TESTSTBY maintained as Phyiscal;
add database ‘TESTSTBY’ as connect identifier is TESTSTBY maintained as Phyiscal;
^
Syntax error before or at “Phyiscal”
DGMGRL> add database ‘TESTSTBY’ as connect identifier is TESTSTBY maintained as Physical;
Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added

Failed.
SQL> alter system set LOG_ARCHIVE_DEST_2=” scope=both;

System altered.

DGMGRL> add database ‘TESTSTBY’ as connect identifier is TESTSTBY maintained as Physical;
Database “TESTSTBY” added
DGMGRL> show configuration;

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTCDB – Primary database
TESTSTBY – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration;

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTCDB – Primary database
TESTSTBY – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

Perform Switchover using Broker.

DGMGRL> switchover to ‘TESTSTBY’
Performing switchover NOW, please wait…
Operation requires a connection to instance “TESTSTBY” on database “TESTSTBY”
Connecting to instance “TESTSTBY”…
Connected as SYSDBA.
New primary database “TESTSTBY” is opening…
Operation requires startup of instance “TESTCDB” on database “TESTCDB”
Starting instance “TESTCDB”…
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is “TESTSTBY”
DGMGRL> show configuration

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTSTBY – Primary database
TESTCDB – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

=============FASTSTARTFAILOVER===================

DGMGRL> show configuration

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTCDB – Primary database
TESTSTBY – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> edit database ‘TESTCDB’ set property FastStartFailoverTarget= ‘TESTSTBY’;
Property “faststartfailovertarget” updated
DGMGRL> edit database ‘TESTSTBY’ set property FastStartFailoverTarget= ‘TESTCDB’;
Property “faststartfailovertarget” updated
DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold =60;
Property “faststartfailoverthreshold” updated

Start Observer:

DGMGRL> start observer
Observer started

Start observer in background
nohup dgmgrl -silent sys/xxxxx@testcdb “start observer” &

Enable Fast start failover:
DGMGRL> ENABLE FAST_START FAILOVER;
Enabled.
DGMGRL> show configuration;

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTCDB – Primary database
TESTSTBY – (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

Test the FSFO:

Abort Primary

SQL> shutdown abort
ORACLE instance shut down.

Standby Alert log:

RFS[5]: Possible network disconnect with primary database
Sat Oct 25 16:55:32 2014
Attempting Fast-Start Failover because the threshold of 60 seconds has elapsed.
Sat Oct 25 16:55:32 2014
Data Guard Broker: Beginning failover
Sat Oct 25 16:55:32 2014
ALTER DATABASE FAILOVER TO TESTSTBY
Sat Oct 25 16:55:32 2014
Terminal Recovery requested in process 3575
Terminal Recovery: Stopping real time apply
Sat Oct 25 16:55:32 2014
MRP0: Background Media Recovery cancelled with status 16037
Sat Oct 25 16:55:32 2014
Errors in file /apps/oracle/diag/rdbms/teststby/TESTSTBY/trace/TESTSTBY_mrp0_3577.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 2065014
Sat Oct 25 16:55:32 2014
MRP0: Background Media Recovery process shutdown (TESTSTBY)
Sat Oct 25 16:55:33 2014
Terminal Recovery: Stopped real time apply
Sat Oct 25 16:55:33 2014
Attempt to do a Terminal Recovery (TESTSTBY)
Sat Oct 25 16:55:33 2014
Media Recovery Start: Managed Standby Recovery (TESTSTBY)
Sat Oct 25 16:55:33 2014
Serial Media Recovery started
Managed Standby Recovery not using Real Time Apply
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
Terminal Recovery timestamp is ’10/25/2014 16:55:33′
Terminal Recovery: applying standby redo logs.
Terminal Recovery: thread 1 seq# 44 redo required

Sat Oct 25 16:55:33 2014
Terminal Recovery:

Sat Oct 25 16:55:33 2014
Recovery of Online Redo Log: Thread 1 Group 5 Seq 44 Reading mem 0
Mem# 0: /apps/oracle/ORADATA/TESTSTBY/onlinelog/o1_mf_5_b45mthjw_.log
Mem# 1: /apps/oracle/fast_recovery_area/TESTSTBY/onlinelog/o1_mf_5_b45mtj39_.log
Sat Oct 25 16:55:34 2014
Incomplete Recovery applied until change 2065015 time 10/25/2014 16:54:31
Sat Oct 25 16:55:34 2014
Media Recovery Complete (TESTSTBY)
Terminal Recovery: successful completion
Forcing ARSCN to IRSCN for TR 0:2065015
Attempt to set limbo arscn 0:2065015 irscn 0:2065015
Resetting standby activation ID 2602731760 (0x9b2288f0)
Sat Oct 25 16:55:34 2014
ALTER DATABASE SWITCHOVER TO PRIMARY (TESTSTBY)
Maximum wait for role transition is 15 minutes.
Backup controlfile written to trace file /apps/oracle/diag/rdbms/teststby/TESTSTBY/trace/TESTSTBY_rsm0_3575.trc
Standby terminal recovery start SCN: 2065014
RESETLOGS after incomplete recovery UNTIL CHANGE 2065015
Online logfile pre-clearing operation disabled by switchover
Online log /apps/oracle/ORADATA/TESTSTBY/onlinelog/o1_mf_1_b45mssyc_.log: Thread 1 Group 1 was previously cleared
Online log /apps/oracle/fast_recovery_area/TESTSTBY/onlinelog/o1_mf_1_b45mstcm_.log: Thread 1 Group 1 was previously cleared
Online log /apps/oracle/ORADATA/TESTSTBY/onlinelog/o1_mf_2_b45mszjn_.log: Thread 1 Group 2 was previously cleared
Online log /apps/oracle/fast_recovery_area/TESTSTBY/onlinelog/o1_mf_2_b45mt09w_.log: Thread 1 Group 2 was previously cleared
Online log /apps/oracle/ORADATA/TESTSTBY/onlinelog/o1_mf_3_b45mt4y7_.log: Thread 1 Group 3 was previously cleared
Online log /apps/oracle/fast_recovery_area/TESTSTBY/onlinelog/o1_mf_3_b45mt5qd_.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 2065013
Sat Oct 25 16:55:34 2014
Setting recovery target incarnation to 3
Sat Oct 25 16:55:35 2014
Switchover: Complete – Database mounted as primary
Completed: ALTER DATABASE FAILOVER TO TESTSTBY
ALTER DATABASE OPEN
Data Guard Broker initializing…
Sat Oct 25 16:55:35 2014

Observer log:

DGMGRL> start observer
Observer started
16:55:32.21 Saturday, October 25, 2014
Initiating Fast-Start Failover to database “TESTSTBY”…
Performing failover NOW, please wait…
Failover succeeded, new primary is “TESTSTBY”
16:56:28.28 Saturday, October 25, 2014
DGMGRL> show configuration

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTSTBY – Primary database
Warning: ORA-16829: fast-start failover configuration is lagging

TESTCDB – (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

======================Reinstate old Primary=============

SQL> SELECT TO_CHAR(STANDBY_BECAME_PRIMARY_SCN) FROM V$DATABASE;

TO_CHAR(STANDBY_BECAME_PRIMARY_SCN)
—————————————-
2065013

Old primary:

SQL*Plus: Release 12.1.0.1.0 Production on Sat Oct 25 17:08:18 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 367439872 bytes
Fixed Size 2288488 bytes
Variable Size 255853720 bytes
Database Buffers 104857600 bytes
Redo Buffers 4440064 bytes
Database mounted.

Observer log: FSFO automatically reinstate

17:09:34.11 Saturday, October 25, 2014
Initiating reinstatement for database “TESTCDB”…
Reinstating database “TESTCDB”, please wait…
Reinstatement of database “TESTCDB” succeeded
17:10:19.75 Saturday, October 25, 2014

Old Primary alert log:
FLASHBACK DATABASE TO SCN 2065013
Sat Oct 25 17:09:40 2014
RFS[1]: Assigned to RFS process (PID:32732)
RFS[1]: Database mount ID mismatch [0x9b2bfd89:0x9b2b6c29] (2603351433:260331421
7)
RFS[1]: Not using real application clusters
Sat Oct 25 17:09:40 2014
Flashback Restore Start
Flashback Restore Complete
Flashback Media Recovery Start
Sat Oct 25 17:09:42 2014
Serial Media Recovery started
Sat Oct 25 17:09:44 2014
Recovery of Online Redo Log: Thread 1 Group 1 Seq 44 Reading mem 0
Mem# 0: /apps/oracle/ORADATA/TESTCDB/onlinelog/o1_mf_1_9vc5pl1w_.log
Mem# 1: /apps/oracle/fast_recovery_area/TESTCDB/onlinelog/o1_mf_1_9vc5plmr_.lo
g
Sat Oct 25 17:09:47 2014
Incomplete Recovery applied until change 2065014 time 10/25/2014 16:54:31
Flashback Media Recovery Complete
Completed: FLASHBACK DATABASE TO SCN 2065013
alter database convert to physical standby
Sat Oct 25 17:09:47 2014
ALTER DATABASE CONVERT TO PHYSICAL STANDBY (TESTCDB)
Clearing standby activation ID 2602731760 (0x9b2288f0)
The primary database controlfile was created using the
‘MAXLOGFILES 16’ clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE ‘srl1.f’ SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE ‘srl2.f’ SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE ‘srl3.f’ SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE ‘srl4.f’ SIZE 52428800;
Offline data file 5 marked as online during convert to standby or switchover to
standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 7 marked as online during convert to standby or switchover to
standby.
Restore of backup may be required if the file is not physically accessible.
Sat Oct 25 17:09:47 2014
Waiting for all non-current ORLs to be archived…
Sat Oct 25 17:09:47 2014
All non-current ORLs have been archived.
Clearing online redo logfile 1 /apps/oracle/ORADATA/TESTCDB/onlinelog/o1_mf_1_9v
c5pl1w_.log

Clearing online log 1 of thread 1 sequence number 44
Clearing online redo logfile 1 complete
Clearing online redo logfile 2 /apps/oracle/ORADATA/TESTCDB/onlinelog/o1_mf_2_9v
c5poxp_.log

Clearing online log 2 of thread 1 sequence number 42
Sat Oct 25 17:09:51 2014
FLASHBACK DATABASE TO SCN 2065013
ORA-1155 signalled during: FLASHBACK DATABASE TO SCN 2065013

Clearing online redo logfile 2 complete
Clearing online redo logfile 3 /apps/oracle/ORADATA/TESTCDB/onlinelog/o1_mf_3_9v
c5pslk_.log

Clearing online log 3 of thread 1 sequence number 43
Clearing online redo logfile 3 complete
WARNING: STANDBY_FILE_MANAGEMENT initialization parameter is
not set to the value “AUTO”.
This may cause recovery of the standby database to terminate
prior to applying all available redo data.
It may be necessary to use the ALTER DATABASE CREATE DATAFILE
command to add datafiles created on the primary database.
Starting background process TMON
Physical Standby Database mounted.
CONVERT TO PHYSICAL STANDBY: Complete – Database mounted as physical standby
Completed: alter database convert to physical standby

New configuration status:

DGMGRL> show configuration

Configuration – TESTBROKER

Protection Mode: MaxPerformance
Databases:
TESTSTBY – Primary database
TESTCDB – (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS
DGMGRL> show database ‘TESTSTBY’

Database – TESTSTBY

Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
TESTSTBY

Database Status:
SUCCESS

DGMGRL> show database ‘TESTCDB’;

Database – TESTCDB

Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 1 second ago)
Apply Rate: 479.00 KByte/s
Real Time Query: OFF
Instance(s):
TESTCDB

Database Status:
SUCCESS

Reference:

http://gavinsoorma.com/2010/03/11g-data-guard-broker-dgmgrl-configuration-quick-steps/

http://gavinsoorma.com/2009/06/10g-data-guard-broker-fast-start-failover/

http://www.databasejournal.com/features/oracle/article.php/3840571/Performing-Database-Failover-with-Oracle-11g-Data-Guard.htm