?
Solved

Delete archive logs from standby server and v$archived_log

Posted on 2002-03-07
4
Medium Priority
?
5,325 Views
Last Modified: 2008-03-03
What steps do I need to take to delete archive logs from a standby server. I think that I cannot just delete the archive log files because that will leave entries in the v$archived_log table.
 Also, on the PRIMARY database enteries remain in the v$archived_log table for both the primary archive and the secondary archive log destinations. The "DELETED" column from the V$ARCHIVED_LOG table shows "YES" for those archive logs going to the primary destination because I use RMAN to back up this database with the "delete input" option which deletes the archive logs once they are backed up. The secondaries shows a "DELETED" value of "NO". So what is supposed to happen here. Is the V$ARCHIVED_LOG table just supposed to grow forever? There must be some way to clean up, but how?
Mike
0
Comment
Question by:mmoore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:kelfink
ID: 6847915
The parameter CONTROL_FILE_RECORD_KEEP_TIME in your init.ora file controls the number of days records stay in the history.

After this many days, the records get removed (or overwritten) so you shouldn't see this grow all that much.

0
 
LVL 3

Author Comment

by:mmoore
ID: 6847991
So, on the standby server, do you think it would be okay if I just deleted the physical archive logs once they had been applied? It sounds, from what you are telling me, that I could write a script to read the filenames out of v$archived_log and they physically delete those files off the disk. V$ARCHIVEED_LOG will clean itself based on CONTROL_FILE_RECORD_KEEP_TIME ... right?
Mike
0
 
LVL 5

Accepted Solution

by:
kelfink earned 800 total points
ID: 6848060
Yes, you should be able to manually delete those files.

Before that, though, read up on this doc:

http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76990/troubler.htm#444834

I think your scenario matches the "RMAN Fails to Delete All Archived Logs" section there.  If so, this will be a much more controlled way to get rid of the unnecessary files.

0
 
LVL 3

Author Comment

by:mmoore
ID: 6848589
I don't see how there solution ...
run {
     allocate channel t1 type 'sbt_tape';
     allocate channel t2 type 'sbt_tape';
     backup
       archivelog like '/oracle/arch/dest1/%' channel t1 delete input
       archivelog like '/oracle/arch/dest2/%' channel t2 delete input;
}

... could work when the second archive is defined as:
log_archive_dest_2 = "SERVICE=DEAP_STANDBY MANDATORY"
In other words, the second destination is defined
as a SERVICE, and not a LOCATION. I suspect that RMAN is not going to reach out to the remoted standby machine and physically delete the archives! After all, how would RMAN know if the remote archive had even been applied?
thanks for your help, further comments are most welcome.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question