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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: COPY vs. OCOPY on NT

RE: COPY vs. OCOPY on NT

From: Hallas John <John.Hallas_at_btcellnet.net>
Date: Mon, 28 Jan 2002 07:45:36 -0800
Message-ID: <F001.003FD0E9.20020128062551@fatcity.com>

Try http://www.speakeasy.org/~jwilton/oracle/hot-backup.html for a view on this

John

-----Original Message-----
From: adary_at_mehish.co.il [mailto:adary_at_mehish.co.il] Sent: 28 January 2002 09:20
To: Multiple recipients of list ORACLE-L Subject: RE: COPY vs. OCOPY on NT

I seem to miss something here.
We are talking about backups that run after: alter tablespace XXX begin backup.
There are no writes to the tablespace in this situation.

Yechiel Adar, Mehish Computer Services
adary_at_mehish.co.il

> -----Original Message-----
> From: Thomas B. Cox [SMTP:tbcox23_at_yahoo.com]
> Sent: Mon, January 28, 2002 6:35 AM
> To:   Multiple recipients of list ORACLE-L
> Subject:      COPY vs. OCOPY on NT
>
>
> Your point is (I believe) that the Oracle data files are
> opened writeable by Oracle at instance startup time.  When
> you use the NT command "COPY" it will prevent additional
> writers, but not those writers that are already holding
> write locks.
>
> My comments and questions are:
>
> 1. This used to fail with an error in previous versions
> of Oracle and NT that I've worked with.
>
> 2. I'd be curious if multiple DB writers could cause
> a problem with your setup.
>
> 3. If a COPY fails/dies holding its lock, can I re-start
> either the COPY of Oracle without rebooting or manually
> clearing the lock?
>
> 4. You have demonstrated that the statement "COPY will
> always fail" is false.  But we're not yet at "COPY will
> always work" -- and that could be a problem.
>
> Cheers.

>  -Tom

>
>
> --- Igor Neyman <ineyman_at_perceptron.com> wrote:
> > Now, from my other message to the list (don't know, if Eric forwarded
> > it to
> > you), it answers your questions about my experience recovering from
> > online
> > backup and why I don't like MetaLink Note explanation in regard to
> > advantages of "Ocopy" versus "Copy":
> >
> > <quote>
> > Couple years ago, when we were preparing first release of our
> > product, I
> > read of course about "NT Copy" versus "Oracle Ocopy".
> > Still I decided to test it, because not always I trust what I read,
> > and I
> > like to get proof myself.
> > Testing of online ("hot") backup/recovery scenario showed, that using
> > "NT
> > Copy" command in backup scripts is perfectly fine, when creating
> > backup set
> > of files on the disk.  And there is no problem restoring from this
> > backup.
> > Now this "disk backup" set of files could be saved on tape, using
> > NTBACKUP
> > (that's the one, that really can not copy file, if it's opened by
> > some other
> > program.  But that's not the case with prepared in advance "disk
> > backup").
> > "NT Copy" has no problems copying files opened already by Oracle, and
> > backup
> > is consistent, as long of course as I am using "alter tablespace
> > <name>
> > begin backup" before copying relevant files and "alter tablespace
> > <name> end
> > backup" after finishing files copy.
> > So, those scripts (using "NT Copy") were put into production, and now
> > have
> > been used for more than two years on more than hundred
> > installations/sites
> > (the number keeps growing).
> > From time to time, our field engineers are bringing back to me sets
> > of
> > online (can not use "cold" backup - our systems should run 24*7, I'm
> > not
> > saying they are, but we are trying to minimize downtime) backed up
> > files (db
> > files and archived RedoLog files), and I recover them with no problem
> > (we
> > need this, to test how the upgrade to next release of our product
> > will run
> > against "real" customers data).
> >
> > Now, about MetaLink Note:139327.1
> > It says:
> > <inner_quote>
> > Ocopy  opens the file using CreateFile() with the FILE_SHARE_READ and
> > FILE_SHARE_WRITE  flags. This allows writing to continue while we
> > take the
> > backup.  Inconsistencies in the backup are repaired by applying
> > archived
> > redo  during  recovery. The 'copy' command from NT doesn't use these
> > flags
> > since it  wants to  prevent writes to the file while the copy is
> > taking
> > place.
> > </inner_quote>
> >
> > I don't think, it's very accurate, and here is why:
> > When during online backup I run "NT copy" against db file, the file
> > is
> > already opened by Oracle (at moment, when I "open" the database).
> > So, even if "NT copy" opens file without FILE_SHARE_READ and
> > FILE_SHARE_WRITE  flags, all it means is that "Subsequent open
> > operations on
> > the object will fail" (quote from NT docs).  I want you to notice, it
> > says
> > "Subsequent open operations" not "Subsequent write/read operations".
> > So,
> > all it does is prohibiting some other program/process from "opening"
> > the
> > file.  But Oracle, as I mentioned, has this file already opened, and
> > it is
> > perfectly capable of reading/writing this file.
> > Of course, the image of the saved file will be "fuzzy", and that's
> > why when
> > recovering from online backup we are applying archived RedoLog files
> > (which
> > getting written much more intensely during online backup).
> > </quote>
> >
> > And yes, I agree about Oracle (un-)support.
> >
> > Igor Neyman, OCP DBA
> > ineyman_at_perceptron.com
> >
> >
> > ----- Original Message -----
> > From: "Thomas B. Cox" <tbcox23_at_yahoo.com>
> > To: <PierceED_at_csus.edu>
> > Cc: <ineyman_at_perceptron.com>
> > Sent: Friday, January 25, 2002 3:38 PM
> > Subject: Re: ORACLE-L Digest -- Volume 2002, Number 025
> >
> >
> > >
> > > Could one of you forward this to your list?  I'm not a subscriber.
> > >
> > > Also, I'm very curious if Igor can recover from his COPY hot
> > > backups, and if so, whether Oracle Support might actually be
> > > wrong.
> > >
> > > If nothing else, one might want to use OCOPY in order
> > > to get Oracle support in the case something goes wrong.  I
> > > doubt they'd be able to help if one used an unsupported backup
> > > approach...
> > >
> > > Thanks.
> > >  -Tom
> > >
> > > --- "Thomas B. Cox" <tbcox23_at_yahoo.com> wrote:
> > > >
> > > > I gave the right advice for the wrong reasons.  My bad. I'll
> > revise
> > > > the next release of the paper and credit Igor -- thanks.
> > > >
> > > > Here's the word from Oracle Support:
> > > >
> > > >
> > > > Doc ID:  Note:139327.1
> > > >
> > > > The Differences between Windows NT COPY and Oracle OCOPY When
> > Doing
> > > > Backups:
> > > >
> > >
> >
> ==========================================================================
> ==
> > > >
> > > > When doing an online backup, should you use the Windows NT COPY
> > > > command, or the Oracle OCOPY command?
> > > >
> > > > While doing online backups you should use OCOPY, or Oracle7 EBU,
> > or
> > > > Oracle8
> > > > (and later) RMAN.  With the OCOPY command you could copy to a
> > backup
> > > > directory
> > > > on the hard drive but cannot use OCOPY to copy a file to tape.
> > The
> > > > other option
> > > > if you do not want to use ocopy to perform your backup as this
> > does
> > > > require a
> > > > lot of disk space is EBU/RMAN that comes with Oracle. Depending
> > on
> > > > your
> > > > Oracle
> > > > version, the distribution includes a utility called EBU (Oracle7)
> > or
> > > > RMAN
> > > > (Oracle8 and later) that can be used for online recovery as well.
> > You
> > > > will need
> > > > to use a media management product to move the data from RMAN to
> > tape.
> > > > Legato
> > > > Storage Manager is provided however there are other products that
> > are
> > > > supported
> > > > to be used with this tool.
> > > >
> > > > To backup you will need to use the utility delivered by Oracle,
> > the
> > > > ocopy
> > > > command. Utilities like the NT commands copy, xcopy CANNOT be
> > used to
> > > > back up.
> > > > The Windows NT feature to be aware of is that NT Backup does not
> > > > allow
> > > > files in
> > > > use to be copied, so you must use the OCOPY utility that Oracle
> > > > provides to
> > > > copy the open database files to another disk location. Since
> > OCOPY
> > > > cannot copy
> > > > files directly to tape, you will then need to use NT Backup or
> > copy
> > > > or
> > > > a
> > > > similar utility to copy the files to tape, as required.
> > > >
> > > > OCOPY allows writing to continue while the backup is running. The
> > NT
> > > > COPY is a
> > > > closed copy and the files may be marked either as "fuzzy" or
> > > > "corrupt."
> > > >  Ocopy
> > > > opens the file using CreateFile() with the FILE_SHARE_READ and
> > > > FILE_SHARE_WRITE
> > > > flags. This allows writing to continue while we take the backup.
> >
> === message truncated ===
>
>
> =====
> Thomas B. Cox "Saepe in errore sed numquam in dubito"
> tbcox23@yahoo.com   http://www.geocities.com/tbcox23/
>
> "The whole aim of practical politics is to keep the
> populace alarmed (and hence clamorous to be led to
> safety) by menacing it with an endless series of
> hobgoblins, all of them imaginary." --H.L. Mencken
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Thomas B. Cox
>   INET: tbcox23_at_yahoo.com

>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>  This e-mail was scanned by the eSafe Mail Gateway
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-8?Q?=E0=E3=F8_=E9=E7=E9=E0=EC?=
  INET: adary_at_mehish.co.il


Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




=========================================================
This electronic message contains information from the mmO2 plc Group 
which may be privileged or confidential. The information is intended to be 
for the use of the individual(s) or entity named above. If you are not the 
intended recipient be aware that any disclosure, copying, distribution or 
use of the contents of this information is prohibited. If you have received 
this electronic message in error, please notify us by telephone or email 
(to the numbers or address above) immediately.
=========================================================
Received on Mon Jan 28 2002 - 09:45:36 CST

Original text of this message

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