Tuesday, September 10, 2019



When ever RMAN takes backup it associate DB_UNIQUE_NAME with it.
If a backup file is not associated with any database, then the row describing it in the recovery catalog, shows null for the SITE_KEY column. By default, RMAN associates files with the target database where SITE_KEY is NULL.

Once you have cataloged the backup in the target database, then that backup is associated with the target database

In a Data Guard environment, you can offload the process of backing up control files, datafiles, and archived logs to the standby system.  By doing this you minimize the effect of backups on the primary system.  The backups taken in this way can be used to recover the primary or the standby database.

The standby database is a physical standby database, and backups are taken only on the standby database.

When you use the CONFIGURE command in conjunction with the FOR DB_UNIQUE_NAME option, then RMAN sets the CONFIGURE for the site-specific database, based on the DB_UNIQUE_NAME that was specified.

Following points are necessary  :
  • Standby database is physical standby database and backups are only taken from standby database.
  • An RMAN recovery catalog is required so backup from standby can be restored to primary database.
  • We must use spfile.
  • DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST must be configured.
  • Flashback database must be on.

***You are not required to register standby database in recovery catalog. Oracle will understand that this is standby database (even though they share same dbid)


[oracle@PRIMARY admin]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Feb 27 01:57:43 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN> connect target /
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> register database ;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

NOTE : we can not register standby database in same because standby and primary database dbid is same.
[oracle@STANDY admin]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Feb 27 01:56:01 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN> connect target /
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> register database ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 02/27/2014 01:56:39
RMAN-01005: Mounted control file type must be CURRENT to register the database

We need to configure following parameter on primary server :
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 days ;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY ;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

Configure the connect string for the primary database and all standby databases, so that RMAN can connect remotely and perform re synchronization when the RESYNC CATALOG FROM DB_UNIQUE_NAME command is used. When you connect to the target instance, you must provide a net service name.

RMAN>  CONFIGURE DB_UNIQUE_NAME 'STANDBY' CONNECT IDENTIFIER 'STANDBY' ;
new RMAN configuration parameters:
CONFIGURE DB_UNIQUE_NAME 'STANDBY' CONNECT IDENTIFIER  'STANDBY';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> LIST DB_UNIQUE_NAME OF DATABASE;
List of Databases
DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
517     PRIM     4131750714       PRIMARY          PRIM
517     PRIM     4131750714       STANDBY          STANDBY


We need to configure following parameter on standby  server :

RMAN> CONFIGURE BACKUP OPTIMIZATION ON ;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON ;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/data/backup/%U' ;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/data/backup/%U';
new RMAN configuration parameters are successfully stored


RMAN> connect target sys/mayank@prim
connected to target database: PRIM (DBID=4131750714)
RMAN> connect catalog recomanager/rman@cata
connected to recovery catalog database
RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME ALL ;
starting full resync of recovery catalog
full resync complete

resyncing from database with DB_UNIQUE_NAME STANDBY

Sunday, September 8, 2019


RMAN-05535: WARNING: All redo log files were not defined properly. ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed

When i am creating Standby database using RMAN active database option , it has thrown below Errors while creating online relogfiles .

ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: 'C:\ORACLE\ORADATA\DUMMY\REDO0101.LOG'

Solution

Use the log_file_name_convert option in RMAN duplicate command.

Ex:

RMAN>run
{
duplicate target database for standby from active database
spfile
set db_unique_name='dummy'
set control_files='M:\oracle\oradata\DUMMY\CONTROL01.CTL'
set log_file_name_convert='M:\oracle\oradata\DUMMY\',''M:\oracle\oradata\DUMMY\'
set instance_number='1'
nofilenamecheck;

}



Note: If you set the db_recovery_file_dest parameter RMAN will not give give above Error, By default online redo log files will be generated on db_recovery_file_dest parameter folder location .

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


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


select dest_id,status,error from v$archive_dest;

DEST_ID  STATUS       ERROR
------  ------------- -----------------------------------------------------------------
1       VALID
2       DISABLED      ORA-16047: DGID mismatch between destination setting and target database



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>This parameter should be the same on primary and standby <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
SQL> show parameter log_archive_config

NAME                                        TYPE         VALUE
------------------------------------ -----------  ------------------------------
log_archive_config                      string       dg_config=(PRIMARY,STANDBY)


LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIMARY,STANDBY)' ---  using the DB_UNIQUE_NAME of both databases

Saturday, September 7, 2019


Oracle Apps (ebiz) R2 Dataguard Setup
=========================

Business Continuity for Oracle E-Business Release 12 Using Oracle 11g (11gR1) Physical Standby Database (Doc ID 1545920.1)

https://oracle-base.com/articles/11g/data-guard-setup-11gr2

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...