Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: oldest online log file
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
Try this shell code:
---
echo "Check the oldest online log sequence ..."
logOld=`echo "connect internal
archive log list" |
svrmgrl |
sed -n 's/^Oldest online log sequence //p' |
while read logN
do
echo ${logN}
done`
--- -- ----------------------------
![]() |
![]() |