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

Home -> Community -> Usenet -> c.d.o.misc -> REPOST: Re: ORACLE rowid ?

REPOST: Re: ORACLE rowid ?

From: Stefan Roesch <sroesch3_at_attbi.com>
Date: Wed, 26 Dec 2001 05:17:07 GMT
Message-ID: <2$--$$_--%-%$%-_-$@news.noc.cabal.int>


Hi Pieter,

you should have a trace file. Normally you will get ora-1578 or something similar and a trace file will be automatically generated. Look in the trace file and then select with the rowid hint around this location to create a new table. In the trace file there is normally also a block dump, so it may be possible to get even data from the corrupt row. There are several articles in metalink which describe the procedure in detail.

Stefan

Jim Kennedy wrote:

> Are you asking if when you select rows from a table will the rowids be
> sequential?
>
> Rowids identify the actual location in the database where a row is. So if
> you get a set of records in a particular order then no the rowids of those
> records will probably not be sequential. (Since the storage of the rows
> is not "sequential" but in a heap.)
>
> Where rownum=1000 is meaningless outside of a specific ordered set. Since
> records (excluding IOT's) are unordered then the 1,000th record could be
> any record.
>
> But to solve your problem try exporting the table with the exp utility.
> It
> will fail on the bad record. The failure might tell you which rowid is
> bad. Also you can create another table as select and do it by the primary
> key in
> order of the primary key. Or write pl/sql to do so and commit on each
> record. Then you can tell which one. (it will fail on the bad one. Since
> you have the primary key..._)
> Jim
> "Pieter Agenbag" <pieter.agenbag_at_cpt.softwarefutures.com> wrote in message
> news:3c28c37e$0$233_at_hades.is.co.za...

>> 1] Are the Oracle ROWIDs gauranteed to be sequential ??
>> 2] What is sequetial ROWIDs? ie. Does it work on the ASCII values of the
>> alphanumeric chars ? Only A-Z & a-z ??
>>
>> OR
>>
>> 3] How can I select a specific row on rownum ??
>> Like I would select where rowid = 'ABCABCABCabcabcabc' I want to be able

> to
>> select where rownum = 1000
>>
>> -------------------------
>>
>> We had a disk failure - yes yes no shadowing , no backups - for various
>> reasons - so I'm trying to restore what data I can from the effected

> table.
>>
>> The only way I could think of doing this was to step through each record
>> based on rowid or rownum - if I can select the record , it's not

> corrupted -
>> select the row and insert into a temp table.
>>
>> Until now I've done it like so.
>> select from table1 where rowid > last_rowid and rownum <= 1 order by

> rowid;
>>
>> However when I reach a corrupt record I don't have the "last rowid" for

> the
>> corrupt record , so I cannot move on to the next one.
>> That's why I want to know how I can manually increment the rowid.
>>
>> If anyone has any other ideas how to get the data out .. Please let me
>> know...!!!
>>
>> note: I'm not a DBA , I'm a C++ developer - so please explain carefully.

> :)
>>
>> ANOTHER NOTE:
>>  Please reply by email .. I'll be busy trying to figure this out - thus I
>> won't be checking into the newsgroup regularly for replies.
>>
>> Thanx !!
>> PLEASE help .. I don't want to work on Christmas anymore :(
>>
>>
>>

This message was cancelled from within Mozilla. Received on Tue Dec 25 2001 - 23:17:07 CST

Original text of this message

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