Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oraback.sh archive log issue

Re: oraback.sh archive log issue

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 15 Apr 2003 10:57:02 +1000
Message-ID: <QCIma.14508$1s1.237591@newsfeeds.bigpond.com>


"Tom" <tomNOSPAM_at_teameazyriders.com> wrote in message news:TrDma.21917$%i6.162582761_at_news-text.cableinet.net...
>
> > My guess is you are using the log_archive_dest_<n> init.ora parameters
> > and oraback isn't. The default location for log_archive_dest is ?/dbs
>
> yes thats right i am using that parameter, how can i get oraback to pick
> this parameter up when there does not seem to be any way to specify it to
> oraback?
>
> thanks

I notice that oraback.sh does 'connect internal' (deprecated since version 8.0, and utterly impossible with 9i) and also has a rather interesting section where it copies the *online* redo logs. That's a big no-no. Online logs should never be copied.

It might be me reading the shell script, but I think it only does the copy only during cold backups (I certainly hope so), but even that's unnecessary. At the very least, it should ask you whether you want them backed up.

I have, as you may guess, reservations about the quality of this script (and that it can't get log archive destination parameters which have been around since version 8i is also a bit of a worry).

But since you ask, the bit of the file that does the damage is this:

#List archiving info
$SVRMGR <<EOF_ARCHIVE >$TMP/$X.lf
connect internal;
archive log list;
exit;
EOF_ARCHIVE
awk '/^Ar/ {print $3}' $TMP/$X.lf |sed "s-\?-$ORACLE_HOME-" \> $CWD/$LOGFILE_LIST ...and using "archive log list" to determine where Oracle is archiving to is positive archaic, not to mention slightly incompetent (since archive log list only ever shows the first directory, and only then when log_archive_dest is set, otherwise it shows the default archiving destination, which is simply ORACLE_HOME/dbs).

My shell-scripting is rather weak, however, so I have no idea how you go about correcting this. Maybe you should approach the author directly, and update him or her with one or two pertinent facts about archiving since Oracle 8.0. (As it stands, the script won't even work properly in 8.0, being aware only of the LOG_ARCHIVE_DEST, and not the LOG_ARCHIVE_DUPLEX_DEST that may have been set).

A better approach would have been to parse the init.ora, and extract the log_archive_dest_n parameter values directly. But that won't then work if you have an spfile! Or it could have logged onto the database and extracted the DEST_NAME from v$archive_dest.. though that *only* lists the dest_n parameters, and not the Standard Edition log_archive_dest or _duplex_dest.

Have you considered RMAN??

;-)
Regards
HJR Received on Mon Apr 14 2003 - 19:57:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US