ORA-01410: invalid ROWID [message #494353] |
Sun, 13 February 2011 19:40 |
|
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 #494356 is a reply to message #494353] |
Sun, 13 February 2011 20:01 |
|
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 #494365 is a reply to message #494360] |
Sun, 13 February 2011 22:02 |
|
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 #494368 is a reply to message #494366] |
Sun, 13 February 2011 23:38 |
|
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 #494567 is a reply to message #494396] |
Tue, 15 February 2011 14:45 |
|
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 |
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 #494577 is a reply to message #494567] |
Tue, 15 February 2011 15:39 |
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,
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 #494581 is a reply to message #494579] |
Tue, 15 February 2011 16:13 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
vickey_sagar1 wrote on Tue, 15 February 2011 16:50This 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 |
|
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 #494664 is a reply to message #494613] |
Wed, 16 February 2011 07:20 |
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) ?
|
|
|