Friday, September 2, 2016

warning: RMAN-08591:Invalid archivelog deletion policy


RMAN-08591: WARNING: invalid archived log deletion policy

If getting error when taken backup of rman for archive log deletion policy dont upset your datagurd broker binding parameter value may be set optional . For remove this warning from backup follow below steps:

[oracle@drawdbadm01 ~]$ dgmgrl sys/***
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration

Configuration - ORCL_PRIMARY

  Protection Mode: MaxPerformance
  Databases:
    ORCL    - Primary database
    ORCLSTBY - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS



DGMGRL> show configuration

check verbosely only stand by database [here my stand by db name orclstby]

Check the  binding value  for the standby database on DR side.




DGMGRL> show database verbose 'ORCLSTBY';

Database - AWCTGFO

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   50 minutes 52 seconds (computed 1 second ago)
  Apply Lag:       50 minutes 53 seconds (computed 0 seconds ago)
  Apply Rate:      471.00 KByte/s
  Real Time Query: ON
  Instance(s):
    orclstby11 (apply instance)
    orclstby2

  Properties:
    DGConnectIdentifier             = 'orclstby_dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '10'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    LogFileNameConvert              = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName(*)
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Database Status:
SUCCESS

DGMGRL>


Now just change the bindinf value from optional to mandatory with datguard broker.


DGMGRL> edit database 'ORCLSTBY' set property Binding='mandatory';
Property "binding" updated
DGMGRL> exit






dgmgrl sys/********


DGMGRL> show configuration

check verbosely only stand by database [here my stand by db name orclstby]

DGMGRL> show database verbose 'ORCLSTBY';

Database - ORCSTBY

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   50 minutes 52 seconds (computed 1 second ago)
  Apply Lag:       50 minutes 53 seconds (computed 0 seconds ago)
  Apply Rate:      471.00 KByte/s
  Real Time Query: ON
  Instance(s):
    orclstby11 (apply instance)
    orclstby2

  Properties:
    DGConnectIdentifier             = 'orclstby_dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '10'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    LogFileNameConvert              = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName(*)
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Database Status:
SUCCESS

DGMGRL>


Now just change the binding  value from optional to mandatory with dataguard broker.


DGMGRL> edit database 'ORCLSTBY' set property Binding='mandatory';
Property "binding" updated


Now check the binbind parameter value changed mandatory .






DGMGRL> show database verbose 'AWCTGFO';

Database - AWCTGFO

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   1 hour(s) 30 minutes (computed 1 second ago)
  Apply Lag:       1 hour(s) 30 minutes 1 second (computed 1 second ago)
  Apply Rate:      466.00 KByte/s
  Real Time Query: ON
  Instance(s):
    awctgfo1 (apply instance)
    awctgfo2

  Properties:
    DGConnectIdentifier             = 'awctgfo_dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'mandatory'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '10'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO_DRAW'
    LogFileNameConvert              = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO_DRAW'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName(*)
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Database Status:
SUCCESS
second option to reset the value for binding
Sqlplus / as sysdba
SQL>alter system set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST mandatory';
System altered.
RMAN> show ARCHIVELOG DELETION POLICY ;
Reset the value using configure with clear option. 
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY clear;
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete





Thursday, September 1, 2016

Static listener vs Dynamic listener differences

Difference between Static listener and Dynamic listener registrations

Database can be registered in two ways with a listener

1. Static Registration :- A static registration of database to a listener is used when we want to remotely start our database. Static registration is like hardcoding a instance details in listener.ora file. In a static registration an instance is registered with the listener whether its up or not. When a client request comes listener opens a dedicated connection , and server later find out that instance is not up then it gives error message as "Oracle not available". 

2. Dynamic Registration :- In Dynamic registration , registration is performed by PMON process. Once a Database instance starts, its PMON process registers instance details with associated listener. Dynamic registration does not require any manual configuration in the listener.ora file where as Static configuration does.From Oracle 8i dynamic configuration introduced. 

PFB listener.ora file having static configuration :-

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = DCPROD)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    )
    (SID_DESC =
      (SID_NAME = DCPROD)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.26.241)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /oracle_home/oracle
PFB listener.ora file having dynamic configuration :-
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.26.242)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /oracle_home/oracle
 
As we can see dynamic configuration is more simple then static configuration.

PFB listener status details when using Dynamic regitration :-

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 23:19:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.26.241)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-SEP-2016 23:07:46
Uptime                    0 days 0 hr. 11 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.26.241)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DCPROD" has 2 instance(s).
  Instance "DCPROD", status UNKNOWN, has 2 handler(s) for this service...
  Instance "dcprod", status READY, has 1 handler(s) for this service...
Service "dcprodXDB" has 1 instance(s).
  Instance "dcprod", status READY, has 1 handler(s) for this service...
The command completed successfully
Above status as "READY" resembles that listener has checked instance details and found its status as up or running to handle client request.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
Start Date                01-DEC-2013 16:42:04
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File  /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /oracle_home/oracle/diag/tnslsnr/new/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.26.242)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Above status resembles that either Instance is not up, or its not been registered with listener.
PFB commands to register database instance with listerner if its not automatically registering with listener :-
 [oracle@dbrac1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 1 23:22:18 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter system register;

System altered.

SQL> exit
 
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
[oracle@dbrac1  lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 23:19:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.26.241)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-SEP-2016 23:07:46
Uptime                    0 days 0 hr. 11 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.26.241)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DCPROD" has 2 instance(s).
  Instance "DCPROD", status UNKNOWN, has 2 handler(s) for this service...
  Instance "dcprod", status READY, has 1 handler(s) for this service...
Service "dcprodXDB" has 1 instance(s).
  Instance "dcprod", status READY, has 1 handler(s) for this service...
The command completed successfully


PFB listener status details when using static regitration also 
 
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 23:19:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.26.241)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-SEP-2016 23:07:46
Uptime                    0 days 0 hr. 11 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.26.241)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DCPROD" has 2 instance(s).
  Instance "DCPROD", status UNKNOWN, has 2 handler(s) for this service...
  Instance "dcprod", status READY, has 1 handler(s) for this service...
Service "dcprodXDB" has 1 instance(s).
  Instance "dcprod", status READY, has 1 handler(s) for this service...
The command completed successfully


Above status as "UNKNOWN" means that listener has not checked instance status details that whether its up or not, it has just registered the details of instance. So listener is not sure that whether instance can handle client request or not.