Solved

Delete archive logs from standby server and v$archived_log

Posted on 2002-03-07
4
5,131 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
  • 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 200 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cannot open form error 6 66
unable to get sorting resultset 15 68
SQL Retrieve Values 4 57
use lov values 2 33
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now