QUOTE (burleson @ Apr 18 2011, 02:50 PM)
>> I have entries in the v$archived_log table where the column name is NULL?Which column?
Run the script on this page please:http://www.dba-oracle.com/t_sql_redo_log_switch_reports.htm
The v$archived_log view shows details of the progress of the managed recovery process for individual archived logs.
The following query can be used to see the status of an individual archived log on the standby site. ‘RFS’ in the REGISTRAR column shows that these logs are transferred from the primary site by log transfer services.
It's the name column in the v$archived_log table where I am seeing some columns, which have
NULL values. This is not a standby database. As for the query, here is a sample of the output.
Th# Seq# APPLIED REGISTR
---- -------- --------- -------
1 186 NO ARCH
187 NO ARCH
188 NO ARCH
2,452 NO ARCH
2,453 NO ARCH
2,454 NO ARCH
Note: APPLIED=NO and REGISTRAR=ARCH for all the columns in the above-mentioned query.
One more thing I would like to mention. This DB was actively cloned from my production database.
Everything appears to be working fine... I have NO problem backing up archive files via RMAN.
To give you a bit of backgroud we use the following code to backup archive files.
sql "alter system archive log current";
backup filesperset 5 archivelog until time 'sysdate-$KEEP_ARCHIVE_HOURS/24'
delete input ;
The variable KEEP_ARCHIVE_HOURS is passed in the cron and can be any number (0,1,2,...)
If there are no archive logs available based on sysdate-KEEP_ARCHIVE_HOURS/24 rman
throws an error.
I want to use the query below to deteremine if there are any .arc logs to backup
select count(1) from v$archived_log
where COMPLETION_TIME < sysdate-$KEEP_ARCHIVE_HOURS/24
and backup_count = 0;
but as you can see based on the above-results of the query it will always find .arc files to backup
even though there are none on disk.
I do have a work around, by checking on disk and getting the .arc file and checking the time
but I would like to use the my query to drive the backup but I am unsure as to why I have all
these entries in the v$archived_log table.
Thanks in advance for your comments and thoughts