Logical Standby databases has an annoying problem—the foriegn archived redo log files were not being cleaned up automatically.
The manual procedure is to use the
DBMS_LOGSTDBY.PURGE_SESSION to identify …all archived redo log files that have been applied to the logical standby database and are no longer needed by SQL Apply.
Then, you query from the
The following code should work for ASM 11.2:
EXEC DBMS_LOGSTDBY.PURGE_SESSION SET HEADING OFF SET FEEDBACK OFF SET PAGESIZE 0 SET LINESIZE 1024 SET TRIMSPOOL ON SET ECHO OFF SPOOL remove_old_logs.sh SELECT 'asmcmd rm -f ' || FILE_NAME as cmd FROM DBA_LOGMNR_PURGED_LOG; SPOOL OFF
As I was researching this article, I came across Automatic Deletion of Log Files.
It would appear that I should use the
DBMS_LOGSTDBY.APPLY_SET procedure as follows:
EXECUTE DBMS_LOGSTDBY.APPLY_SET('LOG_AUTO_DELETE', 'TRUE');
This value should be reflected in the following query on the
SELECT name, value FROM DBA_LOGSTDBY_PARAMETERS WHERE name = 'LOG_AUTO_DELETE';
I am sure that this parameter is set correctly. Looks I might be striking an Oracle bug. I will have to investigate further.