Hi,
Does any body have a script which can be used to delete
the archive logs automatically on Windows2000.
Printable View
Hi,
Does any body have a script which can be used to delete
the archive logs automatically on Windows2000.
u need to write a batch program and then following example script u can modify as per your needs to delete the archive logs.
set DELETE_STR=
if "%SCHED2%"=="" then DELETE_STR=delete input
echo Running first backup >> %LOG_FILE%
(
echo RUN {
echo ALLOCATE CHANNEL "ch00" TYPE 'SBT_TAPE' %ALLOC1%;
echo ALLOCATE CHANNEL "ch01" TYPE 'SBT_TAPE' %ALLOC1%;
echo BACKUP
echo %BACKUP_TYPE%
echo FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
echo DATABASE;
echo RELEASE CHANNEL "ch00";
echo RELEASE CHANNEL "ch01";
echo # Backup all archive logs
echo ALLOCATE CHANNEL "ch00" TYPE 'SBT_TAPE' %ALLOC1%;
echo sql 'alter system archive log current';
echo BACKUP
echo FILESPERSET 150
echo FORMAT 'arch-s%%s-p%%p'
echo ARCHIVELOG ALL %DELETE_STR%;
echo RELEASE CHANNEL "ch00";
The schedule is how many days of archive logs u want to keep on your local disk.