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: Online Backup Doubt

Re: Online Backup Doubt

From: J Jacob <jenijacob_at_hotmail.com>
Date: 1 Jan 2002 22:24:31 -0800
Message-ID: <f88104c0.0201012224.1c4e0f18@posting.google.com>


Hi,

This one is an interesting observation. May be anybody else around who have solaris also can try it out.

The usage of trace files to bring up hot db backup, I guess it's possible. But not sure how. May be Howard can help on this.

Cheers
J Jacob

kunjaathi_at_hotmail.com (Augustine Joseph) wrote in message news:<bde72cc6.0112302129.3f4e979a_at_posting.google.com>...
> Hi,
>
> I made a mistake when I mentioned about DB restoration. What I
> actually meant was I've tried "DB recovery".
>
> I've tried a DB recovery and I got "... needa media recovery" when my
> backup script has got the 'host copy ..' statement which was executed
> inside the oracle. That's how I assumed the backup has been invalid.
>
> I've done few tests and I'm very much sure that the problem was there.
> But what I don't understand why this DB file was not synhcronised.
>
> Below is how I tested.
>
> My Original script(Backup was invalid in this case, prompted for the
> media recovery for system01.dbf)
>
> svrmgrl <<EOF
> connect internal
> alter tablespace SYSTEM begin backup;
> host `cp -p /u01/datafiles/DB/system01.dbf /u02/backup/DB/.`
> alter tablespace SYSTEM end backup;
> ....................
> quit
> EOF
>
>
> My test script (This time system01.dbf was OK. But the next DB file
> tools01.dbf
> prompted for media recovery, for which 'copy' was executed within
> oracle)
>
> svrmgrl <<EOF
> connect internal
> alter tablespace SYSTEM begin backup;
> quit
> EOF
> cp -p /u01/datafiles/DB/system01.dbf /u02/backup/DB/.
>
> svrmgrl <<EOF
> connect internal
> alter tablespace SYSTEM end backup;
>
> alter tablespace tools begin backup;
> .....
>
> quit
> EOF
>
> Regarding the control trace file I'm confused. If I've a hot backup
> and control trace, and say all my control files been corrupted, can
> you please suggest what are the steps I need to follow to recreate the
> control files and bring up the DB?
>
> Tx
> Augustine
>
>
>
>
>
> "Howard J. Rogers" <dba_at_hjrdba.com> wrote in message news:<3c2f64e9$0$2599$afc38c87_at_news.optusnet.com.au>...
> > Restoring a backup doesn't test anything, apart from your abilities to issue
> > appropriate restore commands. The real test comes when Oracle proclaims
> > that "file X is inconsistent and needs media recovery"... if you are, at
> > that point, unable to apply archives/redo to the file to make it consistent,
> > and can't thereafter issue the 'alter database open' command then sure, the
> > file was toast. But if you get the 'media recovery complete' message, and
> > are then able to open the database successfully, it would suggest the file
> > was fine.
> >
> > If you read my original reply again, you'll notice that the discussion about
> > when the tracefile backup of the controlfile is useful contained not one
> > mention of hot or cold backups. The question of whether to take the trace
> > version as opposed to the binary version backup is a matter of the eventual
> > use that can be made of each version during a recovery scenario. Either
> > method works fine hot or cold. The trace script is useful for those rare
> > occasions when all multiplexed versions of the controlfile are lost or are
> > corrupt; the binary backup is useful for when user errors result in a
> > physical alteration to the database (such as inadvertently dropping a
> > tablespace). You should do both.
> >
> > Regards
> > HJR
> > --
> > ----------------------------------------------
> > Resources for Oracle: http://www.hjrdba.com
> > ===============================
> >
> >
> > "Augustine Joseph" <kunjaathi_at_hotmail.com> wrote in message
> > news:bde72cc6.0112292010.6a9c3b00_at_posting.google.com...
> > > Hi,
> > >
> > > The trace file is useful in the case of cold backup. Is it corrct?
> > >
> > > ">> I'd be interested to know how you *know* the backup is invalid."
> > >
> > > I tested the backup by restoring it.
> > >
> > > Tx
> > > Augustine
> > >
> > >
> > > "Howard J. Rogers" <dba_at_hjrdba.com> wrote in message
> news:<3c2e3cbd$0$5269$afc38c87_at_news.optusnet.com.au>...
> > > > Comments below
> > > > HJR
> > > > --
> > > > ----------------------------------------------
> > > > Resources for Oracle: http://www.hjrdba.com
> > > > ===============================
> > > >
> > > >
> > > > "Augustine Joseph" <kunjaathi_at_hotmail.com> wrote in message
> > > > news:bde72cc6.0112282014.40efabf3_at_posting.google.com...
> > > > > Hi,
> > > > >
> > > > > 1) For online backup is it mandatory that the 'backup controlfile' be
> > > > > executed at the end of the backup process. I mean after all the
> > > > > tablespacess are backed up.
> > > > >
> > > >
> > > > Nothing is "mandatory". It's up to you whether you want a backup of
> your
> > > > control file -which happens to be just as an intrinsic part of your
> database
> > > > as the datafile/tablespaces you've carefully backed up. Commonsense
> would
> > > > suggest that you *should* take a backup of it, though whther that's a
> binary
> > > > backup or atrace file backup is more open to discussion. Personally,
> I'd
> > > > recommend nightly trace file backups and weekly binary ones. The point
> > > > being is that the trace file version is an extremely easy way of
> recovering
> > > > from total controlfile loss, but the binary version is useful if a
> > > > tablespace ever gets dropped.
> > > >
> > > > > 2) I've this statement in my unix script(Solaris)
> > > > >
> > > > > Alter tablespace AJAPP begin backup;
> > > > > host`cp /u01/datafiles/db/aj.dbf /bkp/datafiles/aj/aj.dbf`
> > > > > Alter tablespace AJAPP end backup;
> > > > >
> > > > > does the oracle waits the copy to be completed before proceeds with
> > > > > the 'alter' statement.
> > > >
> > > > I rather think it depends on Unix. Al I can tell you is that, on
> Windows
> > > > 2000, if you have a SQL script containing the lines...
> > > >
> > > > alter tablespace system begin backup;
> > > > host copy d:\oracle\oradata\db2\system01.dbf d:\backup1.dbf
> > > > alter tablespace system end backup;
> > > >
> > > > ...then SQL Plus performs the actions synchronously, waiting for each
> one to
> > > > finish before moving on to the next (meaning the backup is useful and
> > > > valid). I can't comment as to whether Solaris works the same way -though
> > > > it's not difficult to knock up a three-line script and then run it
> within
> > > > SQL Plus and watch to see what happens. If this is a *shell* script
> you're
> > > > running, and not a SQL script, someone who knows the O/S will have to
> > > > comment.
> > > >
> > > > >I'm getting invalid online backup. My doubt is
> > > > > here.
> > > > >
> > > >
> > > > I'd be interested to know how you *know* the backup is invalid.
> > > >
> > > > Regards
> > > > HJR
> > > >
> > > >
> > > >
> > > > > If i come out of oracle(svrmgrl) after alter begin statement and does
> > > > > a OS copy, backup is valid.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > Thanks
> > > > > Augusitne
Received on Wed Jan 02 2002 - 00:24:31 CST

Original text of this message

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