Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: oldest online log file
You need the current logfile at the start of the backup
spool startlog
select sequence# from v\$log where status = 'CURRENT';
spool off
and the current at the end of the backup, but before you do a log switch at the end of the backup
spool endlog
select sequence# from v\$log where status = 'CURRENT';
spool off
You then need all the logs in between as well as these 2
something like
read STARTSEQ < $HOT_BACKUP_DIR/startlog.lst
read ENDSEQ < $HOT_BACKUP_DIR/endlog.lst
I=${STARTSEQ}
while [ $I -le $ENDSEQ ]
do
find $ARCH_DEST/*$I.arc* | backup -i -b256 -q -v -f /dev/rmt0.1
etc
etc
etc
Regards
Alex
On Tue, 25 Jan 2000 14:34:50 +0000, NeilC <neilc-olops_at_btinternet.com> wrote:
>Hi,
>
>has anyone got a piece of code that determines the oldest online log
>sequence number (as given by Archive log list command in svrmgrl), and
>is able to use this to pick up the start Archive log file to backup as
>part of a hot backup. I guess it would have to also know the
>log_archive_format to know where abouts in the archive log filename this
>number appears.
>Or is there an easier way to make sure you have a list of all the
>archive log files required as part of a hot backup ?
>This is running under unix by the way (HP or solaris) and V7.3.4 to
>8.1.5
>
>Thanks
>
>
>NeilC
Received on Tue Jan 25 2000 - 10:39:30 CST
![]() |
![]() |