Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01410: invalid ROWID (oracle,9i,unix)
ORA-01410: invalid ROWID [message #494353] Sun, 13 February 2011 19:40 Go to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi All,

We have two jobs. one job insert the data in X table and Second job use X table in select statement.

Second job aborting due to ORA-01410: invalid ROWID error. When we restart it again, it is completed successfully

Could you please advice what I have to check or do to prevent this error.

Thanks in Advance,
Sagar
Re: ORA-01410: invalid ROWID [message #494354 is a reply to message #494353] Sun, 13 February 2011 19:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Could you please advice what I have to check or do to prevent this error.
Some/many/most/(all?) folks can not debug code they can not see.
I am part of that group.

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: ORA-01410: invalid ROWID [message #494356 is a reply to message #494353] Sun, 13 February 2011 20:01 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi BlackSwan,

PSB select statment which is throwing error.

SELECT   MSI.INVENTORY_ITEM_ID,
         V.PID_CODE,
         SDATE,
         NVL (TOTAL_V_REV, 0),
         NVL (TOTAL_V_NREV, 0),
         PUBLISH_DATE
  FROM   WEEKLY_table V, SYSTEM_ITEMS MSI, ITEMS DT
 WHERE       MSI.AUTO_CREATED_CONFIG_FLAG = 'N'
         AND MSI.INVENTORY_ITEM_ID = DT.INVENTORY_ITEM_ID
         AND MSI.ORGANIZATION_ID LIKE MSI.ORGANIZATION_ID
         AND MSI.ORGANIZATION_ID = 1
         AND MSI.INVENTORY_ITEM_STATUS_CODE NOT IN
                  ('DEA', 'E.O.L.', 'OBSOLETE')
         AND V.PID_CODE = MSI.SEGMENT1
         AND global_name LIKE global_name
         AND MSI.SEGMENT1 = DT.PID_CODE
         AND MSI.CUSTOMER_ORDER_FLAG = 'Y'
         AND MSI.BOM_ITEM_TYPE NOT IN (12, 13, 15)
         AND MSI.SERVICE_ITEM_FLAG = 'N'
         AND MSI.INVENTORY_ITEM_ID = DT.INVENTORY_ITEM_ID
         AND DT.HARD_SOFT = 'Hard'
         AND SDATE BETWEEN '02/13/2011 00:00:00' AND '05/06/2012 00:00:00'
         AND V.PUBLISH_DATE = (SELECT   MAX (PUBLISH_DATE) FROM WEEKLY_table)
         AND EXISTS
               (  SELECT   PID_CODE
                    FROM   WEEKLY_table V2
                   WHERE   V2.PUBLISH_DATE = V.PUBLISH_DATE
                           AND V2.PID_CODE = V.PID_CODE
                           AND SDATE BETWEEN '02/13/2011 00:00:00'
                                         AND  '05/06/2012 00:00:00'
                GROUP BY   V2.PID_CODE
                  HAVING   SUM (NVL (TOTAL_V_REV, 0)) > 0
                           OR SUM (NVL (TOTAL_V_NREV, 0)) > 0)

Thanks,
Sagar
Re: ORA-01410: invalid ROWID [message #494360 is a reply to message #494356] Sun, 13 February 2011 20:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
First I'll start with an observation that has nothing to do with problem at hand.

>SDATE BETWEEN '02/13/2011 00:00:00' AND '05/06/2012 00:00:00'

With Oracle characters between single quote marks are STRINGS!
'This is a string, 2009-12-31, not a date'
When a DATE datatype is desired, then use TO_DATE() function.

WRT - reported ORA-01410: invalid ROWID error

One of the following is a possibility

1) the reported error does not come from posted SELECT
2) the reported error does come from posted SELECT & results from a bug

a) I do not see how posted SELECT can throw ORA-01410 error. Of course, I could be mistaken & in error.
b) If posted SELECT generates ORA-01410 error & since V9 is obsoleted, you need to upgade or live with the bug.
Re: ORA-01410: invalid ROWID [message #494365 is a reply to message #494360] Sun, 13 February 2011 22:02 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi BlackSwan,

This select statement executed by Informatica source qualifier tool.So date format which you have mentioned is handled by informatica tool. Informatica read 50400 rows after that it got error out with same error. PSB informatica logs

Quote:
WRT_8036 Target: TAG_WEEKLY (Instance Name: [TAG_WEEKLY])
WRT_8038 Inserted rows - Requested: 50400 Applied: 50400 Rejected: 0 Affected: 50400

2011-02-12 12:30:18 : ERROR : (25031 | READER_1_1_1) : (IS | EA_Eng_Prod_811_Int_Service) : node01_info-prod-02 : RR_4035 : SQL Error [
ORA-01410: invalid ROWID

ORA-01410: invalid ROWID

Database driver error...

Function Name : Fetch
SQL Stmt : SELECT   MSI.INVENTORY_ITEM_ID,
         V.PID_CODE,
         SDATE,
         NVL (TOTAL_V_REV, 0),
         NVL (TOTAL_V_NREV, 0),
         PUBLISH_DATE
  FROM   WEEKLY_table V, SYSTEM_ITEMS MSI, ITEMS DT
 WHERE       MSI.AUTO_CREATED_CONFIG_FLAG = 'N'
         AND MSI.INVENTORY_ITEM_ID = DT.INVENTORY_ITEM_ID
         AND MSI.ORGANIZATION_ID LIKE MSI.ORGANIZATION_ID
         AND MSI.ORGANIZATION_ID = 1
         AND MSI.INVENTORY_ITEM_STATUS_CODE NOT IN
                  ('DEA', 'E.O.L.', 'OBSOLETE')
         AND V.PID_CODE = MSI.SEGMENT1
         AND global_name LIKE global_name
         AND MSI.SEGMENT1 = DT.PID_CODE
         AND MSI.CUSTOMER_ORDER_FLAG = 'Y'
         AND MSI.BOM_ITEM_TYPE NOT IN (12, 13, 15)
         AND MSI.SERVICE_ITEM_FLAG = 'N'
         AND MSI.INVENTORY_ITEM_ID = DT.INVENTORY_ITEM_ID
         AND DT.HARD_SOFT = 'Hard'
         AND SDATE BETWEEN '02/13/2011 00:00:00' AND '05/06/2012 00:00:00'
         AND V.PUBLISH_DATE = (SELECT   MAX (PUBLISH_DATE) FROM WEEKLY_table)
         AND EXISTS
               (  SELECT   PID_CODE
                    FROM   WEEKLY_table V2
                   WHERE   V2.PUBLISH_DATE = V.PUBLISH_DATE
                           AND V2.PID_CODE = V.PID_CODE
                           AND SDATE BETWEEN '02/13/2011 00:00:00'
                                         AND  '05/06/2012 00:00:00'
                GROUP BY   V2.PID_CODE
                  HAVING   SUM (NVL (TOTAL_V_REV, 0)) > 0
                           OR SUM (NVL (TOTAL_V_NREV, 0)) > 0)


Thanks,
Sagar

[Updated on: Mon, 14 February 2011 01:06] by Moderator

Report message to a moderator

Re: ORA-01410: invalid ROWID [message #494366 is a reply to message #494365] Sun, 13 February 2011 22:24 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I still fail to see how or where any ROWID is involved with posted SELECT.
I will accept the reality that ORA-01410 occurs, but I need to be convinced that the posted SELECT actually produces it.
Re: ORA-01410: invalid ROWID [message #494368 is a reply to message #494366] Sun, 13 February 2011 23:38 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Table used in select statement is uploaded by previous job. Is it possible below issue in this scenario?

The issue can occur when a index block delete is not completed.
ROWID's are found in the index block leaf.
Re: ORA-01410: invalid ROWID [message #494370 is a reply to message #494368] Sun, 13 February 2011 23:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
The axiom is Readers do not block writers & writers do not block readers.

If posted SELECT generates ORA-01410 error & since V9 is obsoleted, you need to upgrade or live with the bug.
Re: ORA-01410: invalid ROWID [message #494372 is a reply to message #494370] Mon, 14 February 2011 00:21 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Last Question- If i analyze the table before running the job, will it help if it is really issue with select statement?
Re: ORA-01410: invalid ROWID [message #494373 is a reply to message #494372] Mon, 14 February 2011 00:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>If i analyze the table before running the job, will it help if it is really issue with select statement?
You will know for sure after doing so.
Re: ORA-01410: invalid ROWID [message #494396 is a reply to message #494373] Mon, 14 February 2011 03:55 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
If it really is that select then you've probably got a corrupted index.
Re: ORA-01410: invalid ROWID [message #494567 is a reply to message #494396] Tue, 15 February 2011 14:45 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi cookiemonster,

Thanks for reply.

My job scheduled weekly once so i can not test it now. I have some questions

1) So when i restart the job then oracle internally fixed the corrupted index because after that my job got completed

2) Is there any way i can ensure my job should not fail. Like execute the same query on toad before executing the job or scan all indexes

3) Is there any way i can check which index have problem

Thanks in Advance,
Sagar
Re: ORA-01410: invalid ROWID [message #494575 is a reply to message #494567] Tue, 15 February 2011 15:27 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
vickey_sagar1 wrote on Tue, 15 February 2011 20:45

1) So when i restart the job then oracle internally fixed the corrupted index because after that my job got completed

Which job? you have two.

vickey_sagar1 wrote on Tue, 15 February 2011 20:45

2) Is there any way i can ensure my job should not fail. Like execute the same query on toad before executing the job or scan all indexes

Assuming it is a corrupted index then it's probably because of an oracle bug, in which case you'll need to contact oracle support.

vickey_sagar1 wrote on Tue, 15 February 2011 20:45

3) Is there any way i can check which index have problem


Running sqltrace on the session while the query is running might give that info.
Re: ORA-01410: invalid ROWID [message #494576 is a reply to message #494575] Tue, 15 February 2011 15:31 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Sorry cookiemonster,
aborted one (second job)
Re: ORA-01410: invalid ROWID [message #494577 is a reply to message #494567] Tue, 15 February 2011 15:39 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
I doubted you have bad index. There are many ways to get invalid rowid exception - many of them are result of bad code:

SQL> create table t1 (id number primary key, res varchar2(10));

Table created.

SQL> insert into t1 
  2  select level, 'a' from dual connect by level <10;

9 rows created.

SQL> commit;

Commit complete.

SQL> declare
  2   id1 number;
  3   cursor curs is
  4    select t1.id from t1 where id<5 for update;
  5  begin
  6   open curs;
  7  loop
  8   exit when curs%notfound;
  9   fetch curs into id1;
 10    update t1 set res = 'b'||to_char(id1) where current of curs;
 11  end loop;
 12  close curs;
 13  end;
 14  /
declare
*
ERROR at line 1:
ORA-01410: invalid ROWID
ORA-06512: at line 10


SQL> 


You see,

exit when curs%notfound;


in wrong place and here we go... Corrected code runs with no issues:

SQL> drop table t1;

Table dropped.

SQL> create table t1 (id number primary key, res varchar2(10));

Table created.

SQL> insert into t1 
  2  select level, 'a' from dual connect by level <10;

9 rows created.

SQL> commit;

Commit complete.

SQL> declare
  2   id1 number;
  3   cursor curs is
  4    select t1.id from t1 where id<5 for update;
  5  begin
  6   open curs;
  7  loop
  8   fetch curs into id1;
  9   exit when curs%notfound;
 10    update t1 set res = 'b'||to_char(id1) where current of curs;
 11  end loop;
 12  close curs;
 13  end;
 14  /

PL/SQL procedure successfully completed.

SQL> 


SY.
Re: ORA-01410: invalid ROWID [message #494579 is a reply to message #494577] Tue, 15 February 2011 15:50 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi SY,

This error coming in select statment not in update.

Thanks,
Sagar
Re: ORA-01410: invalid ROWID [message #494581 is a reply to message #494579] Tue, 15 February 2011 16:13 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
vickey_sagar1 wrote on Tue, 15 February 2011 16:50
This error coming in select statment not in update.


Well, didn't you post "Function Name : Fetch"? So do you have a cursor you open and then call some function to fetch rows? Then it is possible fetch logic malfunctions resulting in invalid rowid.

SY.

[Updated on: Tue, 15 February 2011 16:14]

Report message to a moderator

Re: ORA-01410: invalid ROWID [message #494582 is a reply to message #494581] Tue, 15 February 2011 16:20 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi Sy,

I am using informatica tool. Tool is having a option where you can specicy your query and database connection details. Based on connection it execute the query and
extract the data from database and load into some target table.

Thanks,
sagar
Re: ORA-01410: invalid ROWID [message #494596 is a reply to message #494353] Tue, 15 February 2011 23:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This error can also happen if you have an index rebuild online concurrently running.

What is your Oracle version with 4 decimals?

Regards
Michel
Re: ORA-01410: invalid ROWID [message #494605 is a reply to message #494596] Tue, 15 February 2011 23:50 Go to previous messageGo to next message
vickey_sagar1
Messages: 77
Registered: August 2007
Location: pune
Member

Hi Michel

my oracle version is 9.2.0.8.

thanks,
Sagar
Re: ORA-01410: invalid ROWID [message #494613 is a reply to message #494605] Wed, 16 February 2011 01:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have you only ORA-1410 or along with another error code like "ORA-08103: object no longer exists".

Regards
Michel
Re: ORA-01410: invalid ROWID [message #494664 is a reply to message #494613] Wed, 16 February 2011 07:20 Go to previous message
knw15pwr
Messages: 134
Registered: March 2010
Senior Member
1. Are you sure the other 2 tables (SYSTEM_ITEMS MSI, ITEMS DT) are not being updated at the time you run your query?
2. Are you using parallel anywhere in the index creation(if index exists) ?
Previous Topic: Update in Join condition
Next Topic: WM_CONCAT
Goto Forum:
  


Current Time: Fri Apr 19 15:29:35 CDT 2024