November 9, 2015

How to modify db_file_name_convert parameter value on standby using DGMGRL

1) Check the value of the db_file_name_convert parameter

SQL> show parameter db_file_name_convert

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string      +P1PROD_DATA/p1prod/datafile/,
    +F1PROD_DATA/f1prod/datafile

2. Change the db_file_name_convert  according to the your requirement in sql prompt
SQL> alter system set db_file_name_convert='+P1PROD_DATA/p1prod/datafile/','+F1PROD_DATA/f1prod/datafile/','+P1PROD_DATA2/p1prod/datafile/','+F1PROD_DATA2/f1prod/datafile/' scope=spfile;

Once you change the parameter value in sql prompt then you need to update the same in DGMGRL prompt other wise  you will get the error for the incosistent properties.

DGMGRL> show database f1prod inconsistentproperties
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE
         f1prod    DbFileNameConvert +P1PROD_DATA/p1prod/datafile/, +F1PROD_DATA/f1prod/datafile

DGMGRL> show configuration

Configuration - p1prod_dg

  Protection Mode: MaxPerformance
  Members:
  p1prod - Primary database
    f1prod - Physical standby database
      Warning: ORA-16792: configurable property value is inconsistent with database setting

Fast-Start Failover: DISABLED

Configuration Status:
WARNING   (status updated 37 seconds ago)

DGMGRL> show database f1prod

Database - f1prod

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          0 seconds (computed 1 second ago)
  Average Apply Rate: 886.00 KByte/s
  Real Time Query:    ON
  Instance(s):
    f1prod
      Warning: ORA-16675: database instance restart required for property value modification to take effect
      Warning: ORA-16714: the value of property DbFileNameConvert is inconsistent with the database setting

Database Status:
WARNING

3) Change the parameter value in DGMGRL prompt

DGMGRL> edit DATABASE "f1prod" SET PROPERTY DbFileNameConvert='+P1PROD_DATA/p1prod/datafile/,+F1PROD_DATA/f1prod/datafile/,+P1PROD_DATA2/p1prod/datafile/,+F1PROD_DATA2/f1prod/datafile/';
Warning: ORA-16675: database instance restart required for property value modification to take effect

Property "dbfilenameconvert" updated

Once you changed the parameter value then you need to restart the database in order to take the modified values to effect.

4) Stop and start the database using SRVCTL

$ srvctl stop database -d f1prod
[oracle@prodora02:/home/oracle f1prod]>
$ srvctl start database -d f1prod
You have new mail in /var/spool/mail/oracle
[oracle@prodora02:/home/oracle f1prod]>
$ srvctl status database -d f1prod
Database is running.

5) Now you can see that the inconsistent properties value is cleared as after database restart the parameter will effected with the new value.

DGMGRL> show configuration

Configuration - p1prod_dg

  Protection Mode: MaxPerformance
  Members:
  p1prod - Primary database
    f1prod - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 48 seconds ago)

DGMGRL> show database f1prod inconsistentproperties
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE


Happy Learning :)

No comments:

Post a Comment