GoldenGate – RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process.

1- One of the obsolete integrated extract was causing Rman not to delete expired archive logs. orcl:/u02/DBA/scripts ->./delete_arch.sh The Oracle base remains unchanged with value /u01/app/oracle Recovery Manager: Release 12.1.0.2.0 – Production on Fri Feb 9 15:25:15 2018 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1450870477) RMAN> 2> 3> 4> 5> 6> using target database control … Continue reading GoldenGate – RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process.

How to tell/find if the instance is Primary/Standby?

By querying v$database one can tell if the host is primary or standby For primary testdb> select database_role from v$database; DATABASE_ROLE —————- PRIMARY For Standby – Note you may need to connect to as sys as sysdba if the instance is in mount state testd> select database_role from v$database; DATABASE_ROLE —————- PHYSICAL STANDBY OR On Primary database the value of controlfile_type in V$database is “CURRENT” … Continue reading How to tell/find if the instance is Primary/Standby?

Script to delete arch logs from the Standby database host after applied

#!/usr/bin/ksh ################################################################################################################## # # This script is to delete the arch logs for the standby database after it has applied the logs to the instance. # ################################################################################################################## script=`basename $0` export ORACLE_SID=$1 dir=/oracle/EPW/${ORACLE_SID}/temp/arch tmpf=$dir/.$script.tmp logcount=50 function GetAppliedLogfileSequenceNumber { sqlplus -S /nolog <<EOF > $tmpf connect / as sysdba set head off set pages 0 select max(sequence#) from v\$archived_log where applied = ‘YES’; select resetlogs_id from v\$database_incarnation … Continue reading Script to delete arch logs from the Standby database host after applied