Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redo Logs 1

Status
Not open for further replies.

TidyTrax

Programmer
Jul 11, 2001
263
AU
Is there a way to automate purging of the redo logs?
 
What operating system?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
This is cryptic isn't it?

For what it's worth, in unix I usually blow away logs older than 5 days through a cron job, and having verified as far as possible that my backups are readable first. I don't know too much about Win2k (for shame!), but assume that there's some sort of scheduling facility (like the NT 'at' perhaps?) which might allow you to do the same? If you're worried about the disk space used, you could perhaps Winzip the older files to save space before you get rid of them - this might enable you to keep more logfiles available at one time than otherwise.

The exact requirement might be dependant on your backup schedule, of course.
 
RMAN provides a way to delete archived logs after they are stored on an archive media.

Stefan
 
Stefan's suggestion of using RMAN is an excellent method of accomplishing your objective within the Oracle World.

As an alternative, on Windows, I use "Robocopy" to manage archived redo log files. Robocopy (which you probably already have on your W2K system) also allows you to automate the process since you can schedule the process (unter the Windows Task Scheduler) and specify the minimum age (in days) of the log files that you want "spun off" elsewhere or deleted.

Step 1: I create a Robocopy control file (simply a flat text file with Robocopy commands inside). For example:
Code:
ROBOCOPY "\\<source server name>\<drive>$\<fully qualified source path>" "\\<target server name>\<drive>$\<fully qualified target path>" *.arc /move /minage:1
So, the above specification directs Robocopy to take all of the files ending in file-type "*.arc" that are 1 day old, from the source location and move those files to the target location. If you want to leave those moved archive files in the target location, you need say nothing more. If you want the files deleted, then you can add just add a Windows "erase" command to the file:
Code:
erase \\<target server name>\<drive>\<fully qualified target path>

Step 2: Implementation step is to schedule the execution of the Robocopy control file in the Windows Task Scheduler:
Code:
Start..Settings..Control Panel..Scheduled Tasks..Add Scheduled Task. Then, fill in details of the file from step 1, above.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Thanks, Santa. First I've heard of ROBOCOPY. Now, what price ROBOCOPY 2, the sequel - 'Even in the future of copying files there is room for improvement'!
 
[rofl]

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Thanks for your help everyone - i was working under the assumption that my backup agent did the clearing of the logs - and it appears it should do - but aint doing it properly!!!!! I will create a script - thanks for the info
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top