CONVERTING PHYSICAL STANDBY DATABASE TO SNAPSHOT STANDBY DATABASE USING BROKER DGMGRL



CONVERTING PHYSICAL STANDBY DATABASE TO SNAPSHOT STANDBY DATABASE


         Using Datagurad Broker DGMGRL to Convert Physical Standby to Snapshot Standby 




Connect to primary database  over listener
dgmgrl sys/xxxxx@PRIMARY.ORACLE.COM


Disable Fast Start Failover
DGMGRL> DISABLE FAST_START FAILOVER;


Change to maximum performance:
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPERFORMANCE;

Convert to snapshot standby
DGMGRL> CONVERT DATABASE STANDBY TO SNAPSHOT STANDBY;



Convert back to Physical standby.
dgmgrl sys/xxxxx@PRIMARY.ORACLE.COM

DGMGRL> CONVERT DATABASE STANDBY TO PHYSICAL STANDBY;


Change back to maximum availability and enable FSFO

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;

DGMGRL> ENABLE FAST_START FAILOVER;

Error: ORA-16541: database is not enabled

ORA-16541: database is not enabled


DGMGRL> disable configuration;
Disabled.
DGMGRL> enable configuration;
ORA-16541: database is not enabled

Configuration details cannot be determined by DGMGRL
DGMGRL> remove configuration;
Error: ORA-16541: database is not enabled

Failed.
DGMGRL> show configuration;
ORA-16541: database is not enabled

Configuration details cannot be determined by DGMGRL

The configuration was already broken and therefore you need to recreate the configuration

Solution:-
Remove the configuration from partner database eg if remove configuration is failing from primary try remove configuration from standby

DGMGRL> remove configuration
Removed configuration

If you try to create the configuration from standby you will encounter below error therefore please always create the configuration from current primary

DGMGRL>  CREATE CONFIGURATION 'ANDY_conf' AS PRIMARY DATABASE IS 'ANDYS1' CONNECT IDENTIFIER IS 'ANDYS1.oracle.com';
Error: ORA-16584: operation cannot be performed on a standby database

DGMGRL>  CREATE CONFIGURATION 'ANDY_conf' AS PRIMARY DATABASE IS 'ANDYS1' CONNECT IDENTIFIER IS 'ANDYS1.oracle.com';
Configuration "ANDY_conf" created with primary database "ANDYS1"
DGMGRL>
DGMGRL> ENABLE CONFIGURATION;
Enabled.

DGMGRL>  ADD DATABASE ANDYP AS CONNECT IDENTIFIER IS 'ANDYP.oracle.com' MAINTAINED AS PHYSICAL;
Database "ANDYP" added
DGMGRL> show configuration;

Configuration - ANDY_conf

  Protection Mode: MaxAvailability
  Databases:
    ANDYS1 - Primary database
    ANDYP  - Physical standby database (disabled)

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL>  ENABLE DATABASE ANDYP
Enabled.
DGMGRL>  show configuration;

Configuration - ANDY_conf

  Protection Mode: MaxAvailability
  Databases:
    ANDYS1 - Primary database
    ANDYP  - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

ORA-00261: log 12 of thread 1 is being archived or modified

                         drop standby logfile group reporting ORA-00261 and ORA-00312


------------------------------------------------------------------------------------------------------------

SQL>  alter database drop standby logfile group 12;
 alter database drop standby logfile group 12
*
ERROR at line 1:
ORA-00261: log 12 of thread 1 is being archived or modified
ORA-00312: online log 12 thread 1:
'/ora01_data1/STDBY1P/flash/STDBY1PP/onlinelog/o1_mf_12_bohc1hts_.log'

Solution

SQL> alter database clear logfile group 12;

Database altered.

SQL>  alter database drop standby logfile group 12;

Database altered.

SQL>  alter database add standby logfile  group 12 '/ora04_STDBY1P/data1/redo/STDBY_redoG12M1.rdo';

Database altered.


ORA-19809: limit exceeded for recovery files:RMAN Duplicate

ORA-19809: limit exceeded for recovery files:RMAN Duplicate


Error Message
-----------------------------------------------------------------------------------------
ORACLE error from auxiliary database: ORA-19809: limit exceeded for recovery fils
ORA-19804: cannot reclaim 1073741824 bytes disk space from 5242880000 limit
RMAN-05535: WARNING: All redo log files were not defined properly.
-----------------------------------------------------------------------------------------
Cause:- 
RMAN fails to restore the archive logs used for media recovery because it is not able to allocate space in FRA to restore those archive logs because of mismatch size of FRA between target and auxiliary database.
Also this is listed as oracle bug
Bug 13741583 – RMAN duplication erroneously fails with ORA-19804 using fast recovery area [ID 13741583.8].

------------------------------------------------------------------------------------------------
Solution:
Increase the FRA size at auxiliary database to equals or grater than the target database



ORA-16792 configuration property value is inconsistent with database setting

ORA-16792 configuration property value is inconsistent with database setting



Having datagurad broker enabled it is recommended to change any parameter using DGMGRL only if not done so there might be a possibility that the values of one or more configuration properties were inconsistent with database in-memory settings or server parameter file settings

DGMGRL> show configuration

Configuration - PRODCONFIG

  Protection Mode: MaxPerformance
  Databases:
    PROD1P- Primary database
    PROD1PS1- Physical standby database
      Warning: ORA-16792: configurable property value is inconsistent with database setting

Fast-Start Failover: DISABLED

Configuration Status:
WARNING

Solution:

Step1> Disable and enable broker

first on standby

SQL[PROD1PS1]> alter  system set dg_broker_start=false

Wait for a minute and the enable

SQL[PROD1PS1]> alter  system set dg_broker_start=true

Check if the problem is resolved

Step2> If the problem not resolved after step 1 perform the step1 for primary as well and again check if the problem is resolved

Step3> If the problem is not resolved after step 2 also then
Identify the parameter which is inconsistent and manually set the parameter using dgmgrl if eg. say the db_file_name_convert is inconsistent then correct as mentioned below

DGMGRL> edit DATABASE "PROD1P" SET PROPERTY DbFileNameConvert = ‘/u01/app/Oradata’, ‘/u02/app/Oradata’

Creating a Database with Silent DBCA


Creating a Database with Silent DBCA


dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname test.oracle.com -sid test -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 30

Enter SYSTEM user password:
password
Enter SYS user password:
password

Copying database files
1% complete
3% complete
11% complete
18% complete

100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/test/test.log" for further details.

[oracle@prod ~]$ dbca -help

dbca  [-silent | -progressOnly] { }  | { [ [options] ] -responseFile   } [-continueOnNonFatalErrors ]

  : -createDatabase | -configureDatabase | -createTemplateFromDB | -createCloneTemplate | -generateScripts | -deleteDatabase | -createPluggableDatabase | -unplugDatabase | -deletePluggableDatabase | -configurePluggableDatabase


How to Find Oracle Database Component Version Installed

How to Find Oracle Database Component Version Installed 


Checking Your Current oraceRelease Number



To identify the release of Oracle Database that is currently installed and to see the release levels of other database components you are using,

query the data dictionary view PRODUCT_COMPONENT_VERSION. (You can also query the V$VERSION view to see component-level information.)



COL PRODUCT FORMAT A40

COL VERSION FORMAT A15

COL STATUS FORMAT A15

SELECT * FROM PRODUCT_COMPONENT_VERSION;



PRODUCT VERSION STATUS

---------------------------------------- ----------- -----------

NLSRTL 12.1.0.0.1 Production

Oracle Database 12c Enterprise Edition 12.1.0.0.1 Production

PL/SQL 12.1.0.0.1 Production