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: rowid problem

Re: rowid problem

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 12 May 2005 07:50:55 -0700
Message-ID: <1115909455.354421.205690@z14g2000cwz.googlegroups.com>

Richard Foote wrote:
> <omavideniz_at_hotmail.com> wrote in message
> news:1115892862.634764.325770_at_g44g2000cwa.googlegroups.com...
> > thanks for your answer. i was suspicious if a backup/restore may
behave
> > like an export/import so considered whether backup/restore affects
> > rowids. in fact, we didn't develop this application. it has been
used
> > for a long time and its data growth is considerably much but it has
> > never been backed up because of that risk in mind. now, we have a
> > problem, how this problem took place is not important but we should
> > look for ways to getting rid of it before we are looking for ways
to
> > get rid of the application itself. for confidence can you point out
a
> > reference from oracle that backup will not affect the rowid's.
> > thanks in advance.
> >
>
> I totally agree with David that using rowids as some kinda FK device
is
> generally a *very* bad idea.
>
> However, regarding your question, do restore of backups alter rowids
?
> Assuming you mean *physical* backups and restores, just spend a
moment
> pondering exactly what constitutes a rowid. Again, assuming extended
rowids,
> they're made up of:
>
> Data Object Id (would they change after a restore of a datafile,
*no*, data
> still belongs to the same object)
>
> Data File No (would it change after a restore of a datafile, *no*,
data
> still lives in the same datafile)
>
> Block Id (would it change after a restore of a datafile, *no*, data
must
> still reside in the same corresponding data block within the
datafile)
>
> Row slot (would it change after a restore of a datafile, *no*, data
must
> still be addressed within the same slot id).
>
> Therefore, *no*, a simple physical restore and recovery of the
database will
> not effect the rowid of recovered data.
>
> Perhaps the most worrying thing for me about all this is that fact
that the
> database has "never been backed up because of that risk in mind". Not

> backing up a database for fear you may not be able to recover it
sounds a
> tad dangerous !! It's a little bit like saying you don't have any
lifeboats
> on your ship because you're not sure if lifeboats float or sink ...
Perhaps
> you should change your thinking around a little and begin to back it
up just
> in case you could in fact recover it (which of course you can with a
tad
> less risk to your current application)
>
> My advice, learn ASAP how to backup and *recover* your database.
Also, do a
> little research and determine the various cases when indeed a rowid
could
> possibly change on you. There's only the odd scenario where this
could
> happen, although a basic physical database backup/recovery isn't one
of
> them.
>
> Good luck !!
>
> Richard

I have a strong suspicion that they thought backup/restore ONLY means export/import and they know doing that will change the rowid's so they just sat on it for all this time hoping that nothing will go wrong... and so far they have lucked out.

Regards
/Rauf Received on Thu May 12 2005 - 09:50:55 CDT

Original text of this message

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