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: Richard Foote <richard.foote_at_bigpond.nospam.com>
Date: Thu, 12 May 2005 14:19:21 GMT
Message-ID: <JBJge.877$E7.54@news-server.bigpond.net.au>

<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 Received on Thu May 12 2005 - 09:19:21 CDT

Original text of this message

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