Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: batch job to automatically delete old archive files under NT?
I use some Unix utilities for NT to find archive logs older than x days and
delete them.
--
Terry Dykstra
Canadian Forest Oil Ltd.
Joe Long wrote in message <37FE09A5.BE8FE709_at_cticallcenter.com>...
>I use a batch file job in the NT Scheduler (c:\winnt\tasks) to both do
>my backup and delete the old files.
>Here is the contents of the batch file:
>CALL DEL e:\DB\backup\*.1
>CALL DEL e:\DB\backup\*.ora
>CALL DEL e:\DB\backup\*.trc
>CALL DEL k:\DB\backup\*.1
>CALL DEL k:\DB\backup\*.ora
>CALL DEL k:\DB\backup\*.trc
>CALL MOVE e:\DB\files\archive\*.1 e:\DB\backup\
>CALL MOVE k:\DB\files\archive\*.1 k:\DB\backup\
>CALL SET ORACLE_SID=<OurSid>
>CALL SVRMGR30.EXE COMMAND="@c:\db_admin\BACKUP.SQL"
>CALL COPY k:\DB\backup\*.ora e:\DB\backup\
>CALL COPY k:\DB\files\trace\*.trc e:\DB\backup\
>CALL COPY k:\DB\files\trace\*.trc k:\DB\backup\
>CALL COPY e:\DB\files\archive\*.1 e:\DB\backup\
>CALL COPY k:\DB\files\archive\*.1 k:\DB\backup\
>
>First I clear out all of the backed up files from yesterday (which have
>already been written to tape) from the E: and K: drives (I believe in
>having duplicates of everything). Then I move todays archived log files
>to the backup directory. Next I run my hot backup script, backing up
>all data files and the control file (including to trace) to one of the
>drives. I then copy those files to the other drive again for
>duplication. Next I copy my trace files to both backup directories.
>Finally, I copy any new archived logs into the backup directories so I
>have any logs that were in use when I started the backup procedure. I
>know it may seem a little anal retentive, but it has really made my life
>easier during problems to have everything, and have it in two seperate
>locations. And I just schedule the whole thing through NTs scheduler.
>If you are not familiar with it, just go to c:\winnt\tasks and double
>click on 'Add Scheduled Task'. Hope it helps.
>
>Joe Long
>
>David Spaisman wrote:
>>
>> Hello:
>>
>> I am working on an application under Oracle 8.0.4 under NT. We are
>> testing hot backups and rather than manually go to the archive directory
>> and delete out-of-date archive logs manually, I was wondering if
>> any one has or uses a batch job that delete old archive log files based
>> on a certain number of days?
>>
>> Thanks.
>> .
>>
>> David Spaisman
Received on Fri Oct 08 1999 - 10:56:41 CDT
![]() |
![]() |