mercredi 30 janvier 2013

How Delete Applied Standby Archived Logs Manually

On 11g2

When backups of archived redo log files are taken on the Primary database:

 



CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

2.     Issue the following command on the primary database:

Usually by Default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

 

When backups of archived redo log files are taken on the standby database:

  1. Issue the following command on the primary database:


CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

  1. Issue the following command on the standby database:


CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

 
Then :

On Primary Site :
Connect with sys and :
SQL>Alter system set  "_log_deletion_policy" = 'ALL' scope=both;

The Archivelogs will be deleted on stanby site when a "Backup Database occurs in Primary Site" !!! To be confirmed

ON 10G

Create Shell Script:

#!/bin/bash
export ORACLE_SID=cmovelproddr
export ORACLE_HOME=/export/home/oracle/product/11.2.0/cmovelproddr
rman target=/  cmdfile=del_dg_arch.rcv log=delarchdr.log
exit

Create a RMAN rcv file  del_dg_arch.rcv

CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT ARCHIVELOG ALL completed before 'SYSDATE-2/24';

ORA: 16664 - configure your Listener to Avoid error with Datagurd Configuration


CONFIGURE your Listener with
 
LISTENER_CMOVP =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))

      )

     (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1526))

      )

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      )

    )

  )

 

SID_LIST_LISTENER_CMOVP =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DB_NAME=db01_DGMGRL)  ## Put db_name_DGMGRL

      (ORACLE_HOME = /opt/app/oracle/product/11.2.0/db0)

      (SID_NAME = db01)

    )

  )