Getting ORA-01403 in dba_segments query during a trigger
Hi, Everyone --
I need to set up a process which will automatically start Oracle auditing on a table when it's created on a particular tablespace.
I've created an "after create on database" DDL trigger which will fire when (ORA_DICT_OBJ_TYPE = 'TABLE').
In this trigger, I use the DBMS_STANDARD package trigger attribute functions in a query against the dba_segments view to check if the new
table has been created in the targeted tablespace. Here' the query:
SELECT DISTINCT s.tablespace_name
INTO tablespace_name
FROM sys.dba_segments s
WHERE s.owner = ORA_DICT_OBJ_OWNER
AND s.segment_name = ORA_DICT_OBJ_NAME
AND s.segment_type IN ('TABLE', 'TABLE PARTITION')
AND s.tablespace_name = target_tablespace_name;
The only purpose of this query is to make sure that that table is contained in the targeted tablespace identified by the "target_tablespace_name" constant variable used in the WHERE clause. If the query runs without error, then my trigger creates a DBMS_SCHEDULER job that executes an "audit" command to start Oracle auditing on the new table.
To test the trigger, within the trigger code, I put the query inside a PL/SQL block with a "WHEN OTHERS" exception clause that will send formatted error detail to the alert log. Then I successfully create a test table on the targeted tablespace. The trigger fires, but the output shows that the query in my trigger failed with an "ORA-01403: no data found" error, indicating that the dba_segments view contains no records showing that the new table is on the targeted tablespace.
But when, in an already opened PL/SQL session, I immediately run the same query (with the appropriate literals in place of the trigger attribute functions) then the query works with the name of the tablespace returned as expected!
I tried an experiment with the trigger running the same query against the dba_tables view instead of the dba_segments view. It worked without error. The only problem is that if your create a partitioned table, the "tablespace_name" column in the dba_table view is NULL (which makes sense when the various table partitions can be contained in different tablepsaces). So, unfortunately, in the case of creating partitioned tables, the purpose of the query would be defeated.
Why does the trigger work when it queries the dba_tables view, but fails when it queries the dba_segments view? Is there a timing issue which causes a lag between the time the table is created and the time that the dba_segments view is updated? Would the trigger fire inside this time lag, thus causing the dba_segments query to fail? Or is there another explanation?
Thanks in advance for any advice you can give me!
Hi, Solomon --
Thanks for the confirmation! I forgot to mention in my original post that I'm running this on 11.1.0.7.
To test the hypothesis that it's a timing issue, I put a hefty "for loop" before the dba_segments query in the code of the trigger. It caused the trigger to spin its wheels for a few seconds before it ran the query. But this didn't help, because I got the ORA-01403 error again.
So it must not be a timing issue after alll. Perhaps the dba_segments query isn't updated until all triggers associated with the table creation have completed. Just guessing.
Anybody know the reason for this?
Cheers!
--JP
Similar Messages
-
Getting ORA-01403:, when it shouldn't
Greetings, i apologize beforehand for my spelling, name(takes 6 hours to change) and the headache you migth get, however,
i bring you the following code, and test results:
------Procedure wich throws the error-------
create or replace
procedure P_COLEGAS(x in number) as
ctipo varchar2(20);
asd varchar2(20);
cursor curnombre is
select nombre from unidad,elemento where (elemento.id_elem=unidad.id_elem and unidad.tipo=ctipo and elemento.ciudad=asd);
begin
select unidad.tipo, elemento.ciudad into ctipo,asd from unidad,elemento where unidad.id_elem=x and elemento.id_elem=x;
for blah in curnombre loop
DBMS_OUTPUT.PUT_LINE('nombre unidad: '||blah.nombre||' ');
end loop;
end;
-what i get when executing the procedure-
Error que empieza en la línea 1 del comando:
exec p_colegas(19)
Informe de error:
ORA-01403: no data found
ORA-06512: at "BD00.P_COLEGAS", line 9
ORA-06512: at line 1
01403. 00000 - "no data found"
*Cause:
*Action:-----------------------------------------------------------
-----------------the real problem--------------------
if in that procedure i were to write
(1)
select unidad.tipo into ctipo from unidad where unidad.id_elem=x;(2)
select elemento.ciudad into asd from elemento where elemento.id_elem=x;instead the single query i wrote, we get the following:
(1) works wonderfull, only gets the error when there are no matches for x.
(2) throws the error i showed before.
however when i do the following query in the worksheet and execute it:
(3)
select elemento.ciudad from elemento where elemento.id_elem=x;i get what i expected to get 1 row 1 column.(yes it has data)
note: in (3) the only difference is that i remove the into clause, and x is the same number i used when i execute the procedure.
--------------------the question------------------------
why in the procedure, the query (2) fail to fetch the data, the same data wich the query(3) does not fail to fetch?
i'm getting ORA-01403, when i shouldn't?
is there a work around to this problem?
--------------------what i try------------------------------
nested the query with it's own error handle exception, getting the same results, just catches the error with a different handling.
tool used: sql developer
-Example data--
tested the procedure with the following example data in a brand new workspace getting the same error.
-- DDL for Table ELEMENTO
CREATE TABLE "ELEMENTO"
( "ID_ELEM" NUMBER,
"CIUDAD" VARCHAR2(20),
"TIPO" CHAR(1),
"X" NUMBER,
"Y" NUMBER,
"FECHAHORA_CREACION" TIMESTAMP (6)
-- DDL for Table UNIDAD
CREATE TABLE "UNIDAD"
( "ID_ELEM" NUMBER,
"PORCENTAJE_SALUD" NUMBER,
"NOMBRE" VARCHAR2(20),
"TIPO" VARCHAR2(20)
REM INSERTING into ELEMENTO
SET DEFINE OFF;
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (12,'Infernalia','U',10,10,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (15,'Infernalia','U',10,7,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (19,'Infernalia','U',15,9,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (23,'Infernalia','U',16,8,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (27,'Infernalia','C',15,10,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (52,'Humania','U',26,10,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (58,'Humania','U',24,9,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (62,'Humania','U',27,11,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (64,'Humania','C',25,8,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (78,'GruntVille','U',47,32,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (84,'GruntVille','U',42,28,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (89,'GruntVille','U',43,29,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (91,'GruntVille','C',44,37,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (29,'Infernalia','C',16,7,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (90,'GruntVille','U',49,36,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
REM INSERTING into UNIDAD
SET DEFINE OFF;
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (12,100,'Grang','Soldado');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (15,100,'Krout','Médico');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (19,100,'Warf','Obrero');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (23,100,'Puaj','Obrero');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (52,100,'Marcelus','Soldado');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (58,100,'Claudius','Soldado');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (62,100,'Arturius','Obrero');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (78,100,'Klaknot','Médico');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (84,100,'Staisht','Médico');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (89,100,'Bjorkson','Soldado');
Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (90,100,'Sknot','Médico');
-- Constraints for Table ELEMENTO
ALTER TABLE "ELEMENTO" ADD CONSTRAINT "ELEMENTO_CHK1_TIPO" CHECK (TIPO IN ('U', 'C')) ENABLE;
ALTER TABLE "ELEMENTO" ADD CONSTRAINT "ELEMENTO_PK" PRIMARY KEY ("ID_ELEM") ENABLE;
ALTER TABLE "ELEMENTO" MODIFY ("ID_ELEM" NOT NULL ENABLE);
ALTER TABLE "ELEMENTO" MODIFY ("CIUDAD" NOT NULL ENABLE);
ALTER TABLE "ELEMENTO" MODIFY ("TIPO" NOT NULL ENABLE);
ALTER TABLE "ELEMENTO" MODIFY ("X" NOT NULL ENABLE);
ALTER TABLE "ELEMENTO" MODIFY ("Y" NOT NULL ENABLE);
ALTER TABLE "ELEMENTO" MODIFY ("FECHAHORA_CREACION" NOT NULL ENABLE);
-- Constraints for Table UNIDAD
ALTER TABLE "UNIDAD" MODIFY ("ID_ELEM" NOT NULL ENABLE);
ALTER TABLE "UNIDAD" MODIFY ("PORCENTAJE_SALUD" NOT NULL ENABLE);
ALTER TABLE "UNIDAD" MODIFY ("NOMBRE" NOT NULL ENABLE);
ALTER TABLE "UNIDAD" MODIFY ("TIPO" NOT NULL ENABLE);
ALTER TABLE "UNIDAD" ADD CONSTRAINT "UNIDAD_PK" PRIMARY KEY ("ID_ELEM") ENABLE;
-- Ref Constraints for Table ELEMENTO
-- Ref Constraints for Table UNIDAD
ALTER TABLE "UNIDAD" ADD CONSTRAINT "UNIDAD_ELEMENTO_FK1" FOREIGN KEY ("ID_ELEM")
REFERENCES "ELEMENTO" ("ID_ELEM") ENABLE;
/Edited by: 975362 on 06-12-2012 04:47 AM
Edited by: BluShadow on 06-Dec-2012 12:51
added {noformat}{noformat} tags for readability of code/data. Please read {message:id=9360002} and learn to do this yourself in future.
Edited by: 975362 on 06-12-2012 05:44 AM
added example data.Oops, I mi9ssed table ELEMENTO has column X. When you use:
where unidad.id_elem=x and elemento.id_elem=x;column names take precedence over PL/SQL variables wnd X is resolved as table ELEMENTO column X. not as PL/SQL procedure parameter X. Change PL/SQL procedure parameter name:
SQL> create or replace
2 procedure P_COLEGAS(x in number) as
3 ctipo varchar2(20);
4 asd varchar2(20);
5
6 cursor curnombre is
7 select nombre from unidad,elemento where (elemento.id_elem=unidad.id_elem and unidad.tipo=ctipo
and elemento.ciudad=asd);
8
9 begin
10 select unidad.tipo, elemento.ciudad into ctipo,asd from unidad,elemento where unidad.id_elem=x
and elemento.id_elem=x;
11 for blah in curnombre loop
12 DBMS_OUTPUT.PUT_LINE('nombre unidad: '||blah.nombre||' ');
13 end loop;
14 end;
15 /
Procedure created.
SQL> exec p_colegas(19)
BEGIN p_colegas(19); END;
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "SCOTT.P_COLEGAS", line 9
ORA-06512: at line 1
SQL> create or replace
2 procedure P_COLEGAS(p_x in number) as
3 ctipo varchar2(20);
4 asd varchar2(20);
5
6 cursor curnombre is
7 select nombre from unidad,elemento where (elemento.id_elem=unidad.id_elem and unidad.tipo=ctipo
and elemento.ciudad=asd);
8
9 begin
10 select unidad.tipo, elemento.ciudad into ctipo,asd from unidad,elemento where unidad.id_elem=p_
x and elemento.id_elem=p_x;
11 for blah in curnombre loop
12 DBMS_OUTPUT.PUT_LINE('nombre unidad: '||blah.nombre||' ');
13 end loop;
14 end;
15 /
Procedure created.
SQL> exec p_colegas(19)
PL/SQL procedure successfully completed.
SQL> SY. -
When merging workspace I get ORA-01403: no data found error in WMSYS.LT
Hi,
I am investigating an error in a remote system with very little info to go on apart from a stacktrace! This is what it says:
java.sql.SQLException: ORA-01403: no data found
ORA-06512: at "WMSYS.LT", line 6028
ORA-06512: at line 1
The context is an attempt to merge a child workspace into LIVE (LIVE being its direct parent).
it is on Oracle Database 11.1.0.7.
Can you advise what this error means? I am unable to dig deeper into it because the PL-SQL source code for WMSYS.LT is wrapped.
thanks
SimonHi,
Are you able to get a standard trace of the error from the remote database? ora-1403 errors can come from a number of places, so an errorstack trace is usually needed to determine the cause.
Regards,
Ben -
Getting - ORA-01403: no data found - When I Run expdp
Oracle database version 11.1.0.7.0 on Windows 32-bit.
When I run:
expdp system schemas=vms dumpfile=data_pump_dir:vms_bjw%u.dmp logfile=data_pump_dir:vms_bjw.log parallel=2
Connected to: Oracle Database 11g Enterprise Edition Release *11.1.0.7.0* - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user SYSTEM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 736
ORA-39080: failed to create queues "" and "" for Data Pump job
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPC$QUE_INT", line 1665
ORA-01403: no data found
I turned on tracing like this:
1.) Set the Error Stack 1403 to know exactly which SQL is failing:-
SQL> alter system set events '1403 trace name errorstack level 3';
Re-ran the datapump export to reproduce the error then disable the events.
SQL> alter system set events '1403 trace name errorstack off';
The trace file, oddly enough, shows that this is the failing SQL:
Error Stack Dump
ORA-01403: no data found
Current SQL Statement for this session (sql_id=3n58uzvnuw2hj) -----
SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET'
Under that, I get the call stack.
I ran this SQL manually and I get:
SQL> SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
VALUE
AL32UTF8
Any ideas as to why I'm getting the ORA-01403 when I run expdp?
Thank youHello,
Your error looks like what is descibed into the Metalink Note 345198.1.
But this note apply to 10.1.0.4 not to 11.1.0.7.
So, you should open an issue to My Oracle Support.
Best regards,
Jean-Valentin -
I am getting ORA-01403: no data found error while calling a stored procedur
Hi, I have a stored procedure. When I execute it from Toad it is successfull.
But when I call that from my java function it gives me ORA-01403: no data found error -
My code is like this -
SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
IF L_N_CNT >0 THEN
DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
RETURN;
ELSE
DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
INSERT INTO TLSI_SI_MAST
( CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
VALUES( R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN, R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
END IF;Hi,
I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
Regards, Gerwin -
Can anyone help decoding this error and how to resolve this ?
<ERROR> <![CDATA[37162: ORA-37162: OLAP errorORA-01403: no data foundXOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_AGGREGATE_CONSISTENT"ORA-06512: at "SYS.DBMS_CUBE", line 234ORA-06512: at "SYS.DBMS_CUBE", line 316ORA-06512: at line 1]]>></ERROR>
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Following is the cube_build_log rows when the error occurs
BUILD_ID STATUS COMMAND BUILD_OBJECT BUILD_OBJECT_TYPE OUTPUT_TXT
9921 FAILED BUILD BUILD <ERROR> <![CDATA[XOQ-01707: Oracle job "A$9921_JOB$_501362" failed while executing slave build "ORSFHR_PRDBI.RESV_PACE_BI USING (LOAD PRUNE, SOLVE PARALLEL) AS OF SCN 10311831493648" with error "37162: ORA-37162: OLAP errorORA-01403: no data foundXOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_AGGREGATE_CONSISTENT"ORA-06512: at "SYS.DBMS_CUBE", line 234ORA-06512: at "SYS.DBMS_CUBE", line 316ORA-06512: at line 1".]]>></ERROR>
9921 COMPLETED DETACH AW BUILD
9921 STARTED DETACH AW BUILD
9921 COMPLETED ROLLBACK BUILD
9921 STARTED ROLLBACK BUILD
9921 COMPLETED REATTACH AW RW WAIT BUILD
9921 STARTED REATTACH AW RW WAIT BUILD
9921 FAILED SLAVE RESV_PACE_BI CUBE <ERROR> <![CDATA[37162: ORA-37162: OLAP errorORA-01403: no data foundXOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_AGGREGATE_CONSISTENT"ORA-06512: at "SYS.DBMS_CUBE", line 234ORA-06512: at "SYS.DBMS_CUBE", line 316ORA-06512: at line 1]]>></ERROR>
9921 COMPLETED DETACH AW RESV_PACE_BI CUBE
9921 FAILED BUILD BUILD <ERROR> <![CDATA[ORA-01403: no data foundXOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_AGGREGATE_CONSISTENT"]]>></ERROR>
9921 STARTED DETACH AW RESV_PACE_BI CUBE
9921 FAILED SOLVE PARALLEL RESV_PACE_BI CUBE <SolveStatistics IS_EMPTY="no" CHANGED_VALUES="yes" CHANGED_RELATIONS="no"/><ERROR> <![CDATA[ORA-01403: no data foundXOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_AGGREGATE_CONSISTENT"]]>></ERROR>
9921 STARTED SOLVE PARALLEL RESV_PACE_BI CUBE
9921 COMPLETED LOAD RESV_PACE_BI CUBE <CubeLoad LOADED="4114188" REJECTED="0"/>Please enter a service request with regard to this issue with Oracle Support.
thanks,
Ken -
Getting ORA-03001 on cube query
I am getting a ORA-03001 error on the following query - I am utlizing a cube query and the main data view (subquery) is using a connect by. I believe it is the connect by which is causing the problem as I have tried the query with the table data (BASEDATA) and it works fine. I also tried removing the having clause, and that worked. Looks like a bug. I am on 10gR2.
SELECT progm.attrib_id,NH.workstream1_parent_id, nh.cost_type, nh.cost_benefit, eh.expense_majorgroup_id, eh.expense_group_id, b.year_,b.period_id, b.measure, data_type_id,
Sum(Value) value
,grouping_id( b.cost_centre_id, NH.workstream1_parent_id, progm.attrib_id) NH_ID
,grouping_id( b.Expense_type_id, EH.expense_group_id, EH.expense_majorgroup_id) EH_ID
,grouping_id( b.year_,period_id) yRPER_ID
,grouping_id( nh.cost_Type, nh.cost_benefit) Cost_ID
FROM projectmeasure_data B, nomlocationhierarchy NH, nomexpenseshierarchy EH
, (SELECT workstream1_parent_id, wspa.attrib_id FROM workstream1_parent_attrib WSPA inner join
attributes AA ON WSPA.attrib_id=AA.attrib_id WHERE attribType_id=28) Progm
WHERE B.cost_centre_id=nh.cost_centre_id AND
b.expense_type_id=eh.expensetype_id AND
b.measure_id=cm.measure_id AND
progm.workstream1_parent_id=nh.workstream1_parent_id
group BY b.measure, b.data_type_id,
cube ( b.cost_centre_id, nh.workstream1_parent_id, progm.attrib_id,
b.expense_type_id, eh.expense_group_id, eh.expense_majorgroup_id,
b.YEAR_,period_id, nh.cost_type, nh.cost_benefit)
HAVING
(grouping_id( b.cost_centre_id, NH.workstream1_parent_id, progm.attrib_id) IN (4,6,7))
AND
(grouping_id( b.Expense_type_id, EH.expense_group_id, EH.expense_majorgroup_id) IN (4,6,7) )
AND
( grouping_id( b.year_, b.period_id) IN (3,1,0))
AND
(grouping_id( nh.cost_Type, nh.cost_benefit) in (1,0))
where
ProjectMeasure_data is
SELECT
A.Cost_Centre_ID,
A.Expense_Type_ID,
A.Period_ID,
A.Year_,
A.Data_Type_ID,
M.RptSlot AS Measure,
A.Value,
H.Measure_ID
FROM ( SELECT Cost_Centre_ID, Expense_Type_ID, Period_ID, Year_, Data_Type_ID, measure_id, BASEDATA.Value
FROM BASEDATA
WHERE ((Year_=2004 AND Measure_ID=1) or ( Year_ >= 2005)) and BASEDATA.Data_Type_ID in (1,2) ) A , qrycurrentmeasures M,
(select connect_by_root(measure_id) root_id, measure_id, CASE LEVEL WHEN 1 THEN switch_year*100+switch_per ELSE Decode(PRIOR(end_period),13,PRIOR(end_year)+1,PRIOR(end_year))*100+Decode(PRIOR(end_period),13,1,PRIOR(end_period)+1) END switchyrper, PRIOR(end_year)*100+PRIOR(end_period) prior_endyrper, end_year*100+end_period endyrper, LEVEL D
FROM measuretypes
CONNECT BY NOCYCLE PRIOR future_measure_id = measure_id
union
SELECT root_id, measure_id, switchyrper, prior_endyrper, endyrper, D FROM
(SELECT connect_by_root(measure_id) root_id, measure_id, switch_year*100+switch_per switchyrper, Decode(end_period,1,end_year-1,end_year)*100+Decode(end_period,1,13,end_period-1) prior_endyrper, Decode(PRIOR(switch_per),1,PRIOR(switch_year)-1,PRIOR(switch_year))*100+Decode(PRIOR(switch_per),1,13,PRIOR(switch_per)-1) endyrper, LEVEL D
FROM measuretypes
CONNECT BY NOCYCLE PRIOR hist_measure_id = measure_id) WHERE D <> 1
) H
WHERE
(m.measure_id=H.root_id) AND
(H.measure_id=a.measure_id ) AND
( (yearperiod(a.year_,a.period_id) BETWEEN H.switchyrper AND h.endyrper) OR
(h.switchyrper IS NULL AND yearperiod(a.year_,a.period_id) <= h.endyrper) )
I ended up using a temporary table to store the results of projectmeasure_data. Does anyone know a way around this? to me it looks like a bug.I'm still wondering about this one.
-
Getting ORA-01403: no data found while saving records
Hi,
I have a customized tabular form using APEX_ITEM API and I created a process to save the records as follows :
-- currently not doing any saving for debugging.
/* Formatted on 2009/03/18 14:52 (Formatter Plus v4.8.8) */
DECLARE
vclass_id NUMBER (10) := NULL;
vattribute_id NUMBER (10) := NULL;
vscore1st NUMBER (2, 1) := 0;
vscore2nd NUMBER (2, 1) := 0;
vrank1st NUMBER (1) := NULL;
vrank2nd NUMBER (1) := NULL;
vcomment VARCHAR2 (4000) := NULL;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT -- numberofline
LOOP
IF apex_application.g_f01 (i) = 2 -- score row
THEN
vclass_id := apex_application.g_f02 (i);
vattribute_id := apex_application.g_f02 (i);
vscore1st := apex_application.g_f05 (i);
vscore2nd := apex_application.g_f06 (i);
ELSIF apex_application.g_f01 (i) = 3
THEN -- rank row
vrank1st := apex_application.g_f05 (i);
vrank2nd := apex_application.g_f06 (i);
ELSIF apex_application.g_f01 (i) = 4
THEN -- comment row
vcomment := apex_application.g_f04 (i);
END IF;
END LOOP;
END;1. Without doing any saving, I am getting NoDataFound error. Can anyone enlighten me why?
2. How can I print the value into the page for debugging?
THanks.HI Denes,
Thanks for replying :)
I debugged this, and it's due to my array list (f01,f02,..) is not having the same number of value.
The following is the SQL that generate my tabular form.
SELECT APEX_ITEM.DISPLAY_AND_SAVE(1,rectype) rectype,
APEX_ITEM.DISPLAY_AND_SAVE(2,class_id) class_id,
APEX_ITEM.DISPLAY_AND_SAVE(3,attribute_id) attribute_id,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||title||'</p>',
2,'<p><b><i><big>'||title||'</b></i></big></p>',
3,replace(title,chr(13)||chr(10),'</br>'),
apex_item.textarea(4,title,5,200)) title,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||review1st||'</p>',
2,apex_item.text(5,review1st,3,3),
3,APEX_ITEM.SELECT_LIST_FROM_LOV(5,review1st,'ARTIST_RANK',null,'NO'),
apex_item.hidden(5,review1st)) review1st,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||review2nd||'</p>',
2,apex_item.text(6,review2nd,3,3),
3,APEX_ITEM.SELECT_LIST_FROM_LOV(6,review2nd,'ARTIST_RANK',null,'NO'),
apex_item.hidden(6,review2nd)) review2nd
FROM TABLE (pkg_artist_review.f_artist_skillreview (:P21_ARTIST_SEQ, :P21_ARTIST_DISCIPLINE,:P21_REVIEW_YEAR))I can't find a way to use APEX_ITEM.DISPLAY_AND_SAVE with HTML formatting implementation so I think I need to be smarter with my PLSQL Save process.
My save process save all records. So I don't use checkbox.
The processing point is ON Submit - After Computations and Validations.
Thanks again Denes. -
create or replace trigger prm_tr_emp_active
before update or insert on prm_m_employee
referencing NEW as new_data OLD as old_data
for each row
declare
v_tag number ;
--PRAGMA AUTONOMOUS_TRANSACTION;
begin
select NVL2( PMEP_FATHER_NAME, 1, 0) * NVL2( PMEP_MOTHER_NAME, 1, 0) *
NVL2( PMEP_NATIONALITY, 1, 0) * NVL2( PMEP_RELIGION_CODE, 1, 0)*
NVL2( PMEP_SEX, 1, 0) * NVL2( PMEP_DOB, 1, 0) * NVL2( PMEP_QUALIFICATION, 1, 0) *
NVL2( PMEP_APPOINTMENT_TYPE, 1, 0) * NVL2( PMEP_DESIGNATION, 1, 0) *
NVL2( PMEP_DOJ, 1, 0) * NVL2( PMEP_LOCATION_CODE, 1, 0) * NVL2( PMEP_SKILL_CODE, 1, 0) *
NVL2( PMEP_GRADE_CODE, 1, 0) * NVL2( PMEP_ONSITE_TAG, 1, 0) * NVL2( PMEP_NIL_SALARY_TAG, 1, 0) *
NVL2( PMEP_HOLD_EBC_TAG, 1, 0) * NVL2( PMEP_EX_SERVICE_MAN, 1, 0) *
NVL2( PMEP_NRI_STATUS, 1, 0) * NVL2( PMEP_PAYMENT_CURRENCY, 1, 0) *
NVL2( PMEP_TAX_BY_COMPANY, 1, 0) * NVL2( PMEP_FNF_SETTLED, 1, 0) *
NVL2( PMEP_PAN_NO, 1, 0) * NVL2( PMEP_STATE_CODE, 1, 0) * NVL2( PMEP_MARITAL_STATUS, 1, 0)*
NVL2( PMEP_SAF_MEMBER, 1, 0) * NVL2( PMEP_SAF_THRU_SALARY, 1, 0) *
NVL2( PMEP_SAF_ENCASHMENT, 1, 0) * NVL2( PMEP_TDS_ON_PF_INT, 1, 0) *
NVL2( PMEP_PROCESS_BY_SSC, 1, 0) * NVL2( PMEP_CITY_CODE, 1, 0)
into v_tag
from prm_m_employee
where pmep_emp_id = :new_data.pmep_emp_id ;
if v_tag = 1 then
update prm_m_employee set
pmep_active = 'Y'
where pmep_emp_id = :new_data.pmep_emp_id ;
else
update prm_m_employee set
pmep_active = 'N'
where pmep_emp_id = :new_data.pmep_emp_id ;
end if ;
--COMMIT;
end ;Assuming that pmep_emp_id is the primary key of the table, it doesn't appear that you need to do a SELECT against the table or an UPDATE against the table. If that is the primary key, then you should just need to manipulate the :new.column_name values for the row you are modifying, i.e.
v_tag := NVL2( :new.pmep_father_name, 1, 0 ) * NVL2( :new.pmep_mother_name, 1, 0 ) *
NVL2( :new.pmep_nationality, 1, 0 ) * ...
IF( v_tag = 1 )
THEN
:new.pmep_active := 'Y';
ELSE
:new.pmep_active := 'N';
END IF;You would absolutely want to avoid trying to use an autonomous transaction here. The autonomous transaction would not be able to see data inserted by the current transaction and commits happen outside the scope of the calling transaction. Barring a logging operation where you want the log to remain even if the logging event is rolled back (i.e. log attempts to delete a row even if the attempt fails), you should not use autonomous transactions in triggers. And you should not be using autonomous transactions to work around mutating trigger errors.
Justin
Edited by: Justin Cave on Mar 11, 2009 2:23 AM -
Help with ORA-01403: no data found please.
First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
I've included the entire script below for your entertainment ;-)
Thanks
Phil.
create or replace
function mygetannualholidayentitlement
( v_empNo in varchar2
, v_inputDate in DATE
) return number as
-- Declare variables here
v_entitlement FLOAT(53);
v_holidayPlan VARCHAR2(20);
v_contServiceOption VARCHAR2(255);
v_postNo CHAR(16);
v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
v_empStartDate DATE;
-- Load up our loacal variable for each row in the loop and the final value is the one we want.
v_selectedLOF FLOAT(53);
v_selectedDateEffective DATE;
v_selectedAmount FLOAT(53);
v_effectiveDate DATE;
-- Cursor declaration
-- Holiday plan details are also keyed on DATE_EFFECTIVE. Need to identify which row is active as at our @effectiveDate.
CURSOR holDefCursor
IS SELECT length_of_service,
date_effective,
amount
FROM holiday_plan_def
WHERE hplan_code = v_holidayPlan
AND length_of_service < v_lengthOfService
ORDER BY date_effective ASC,
length_of_service ASC;
BEGIN
-- Initialise variables --
-- truncate any hours/Mins & secs from effective date
v_effectiveDate := trunc(v_inputdate);
v_entitlement := 0;
v_contServiceOption := 0;
v_lengthOfService := 0;
BEGIN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM APPT_HOLIDAY_BALANCE
WHERE emp_no = v_empNo
-- post_no = @postNo and
AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_holidayplan:=NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
IF v_holidayPlan IS NULL THEN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM ABS_SYSTEM_CONTROLS ;
END IF;
BEGIN
SELECT OPTION_VALUE
INTO v_contServiceOption
FROM PS_OPTIONS
WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_contServiceOption := 'N' ;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
IF v_contServiceOption = 'Y' THEN
BEGIN
-- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
BEGIN
SELECT CONTINUOUS_SERVICE_DATE
INTO v_empStartDate
FROM person
WHERE emp_no = v_empNo;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_empStartDate := NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
IF v_empStartDate IS NULL THEN
BEGIN
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
END IF;
END;
ELSE
BEGIN
-- Need to use employees DATE_OF_START when calculating length of service
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
END;
END IF;
-- Now we can get length of service
v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
OPEN holDefCursor;
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
LOOP
BEGIN
IF v_selectedDateEffective < v_effectiveDate THEN
v_entitlement := v_selectedAmount;
END IF;
-- Get the next value.
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
END;
END LOOP;
CLOSE holDefCursor;
-- Return the result of the function
RETURN v_entitlement;
END;Edited by: user4395499 on 27-Oct-2008 04:04
Edited by: user4395499 on 27-Oct-2008 04:05
Edited by: user4395499 on 27-Oct-2008 07:10Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column. -
ORA-01403: no data found in alert.log
Dear All,
I am getting ORA-01403: no data found in alert.log.Could you pls help me out what could be reasons behind it..Due to this i m getting loads of alerts.Pls suggest.
ThanksORA-01403 No Data Found
Typically, an ORA-01403 error occurs when an apply process tries to update an existing row and the OLD_VALUES in the row LCR do not match the current values at the destination database.
Typically, one of the following conditions causes this error:
Supplemental logging is not specified for columns that require supplemental logging at the source database. In this case, LCRs from the source database might not contain values for key columns. You can use a DML handler to modify the LCR so that it contains the necessary supplemental data. See "Using a DML Handler to Correct Error Transactions". Also, specify the necessary supplemental logging at the source database to prevent future errors.
There is a problem with the primary key in the table for which an LCR is applying a change. In this case, make sure the primary key is enabled by querying the DBA_CONSTRAINTS data dictionary view. If no primary key exists for the table, or if the target table has a different primary key than the source table, then specify substitute key columns using the SET_KEY_COLUMNS procedure in the DBMS_APPLY_ADM package. You also might encounter error ORA-23416 if a table being applied does not have a primary key. After you make these changes, you can reexecute the error transaction.
The transaction being applied depends on another transaction which has not yet executed. For example, if a transaction tries to update an employee with an employee_id of 300, but the row for this employee has not yet been inserted into the employees table, then the update fails. In this case, execute the transaction on which the error transaction depends. Then, reexecute the error transaction.
There is a data mismatch between a row LCR and the table for which the LCR is applying a change. Make sure row data in the table at the destination database matches the row data in the LCR. When you are checking for differences in the data, if there are any DATE columns in the shared table, then make sure your query shows the hours, minutes, and seconds. If there is a mismatch, then you can use a DML handler to modify an LCR so that it matches the table. See "Using a DML Handler to Correct Error Transactions".
Alternatively, you can update the current values in the row so that the row LCR can be applied successfully. If changes to the row are captured by a capture process at the destination database, then you probably do not want to replicate this manual change to destination databases. In this case, complete the following steps:
Set a tag in the session that corrects the row. Make sure you set the tag to a value that prevents the manual change from being replicated. For example, the tag can prevent the change from being captured by a capture process.
EXEC DBMS_STREAMS.SET_TAG(tag => HEXTORAW('17'));
In some environments, you might need to set the tag to a different value.
Update the row in the table so that the data matches the old values in the LCR.
Reexecute the error or reexecute all errors. To reexecute an error, run the EXECUTE_ERROR procedure in the DBMS_APPLY_ADM package, and specify the transaction identifier for the transaction that caused the error. For example:
EXEC DBMS_APPLY_ADM.EXECUTE_ERROR(local_transaction_id => '5.4.312');
Or, execute all errors for the apply process by running the EXECUTE_ALL_ERRORS procedure:
EXEC DBMS_APPLY_ADM.EXECUTE_ALL_ERRORS(apply_name => 'APPLY');
If you are going to make other changes in the current session that you want to replicate destination databases, then reset the tag for the session to an appropriate value, as in the following example:
EXEC DBMS_STREAMS.SET_TAG(tag => NULL);
In some environments, you might need to set the tag to a value other than NULL. -
Update conflict resoltion ORA-01403: no data found
I have set up multimaster replication environment with two database and I have implemented Update conflict resolution on a table using DISCARD method(Oracle provided) as below.
Some how it is not able to resolve the conflict and I am getting erro ORA-01403: no data found.
On MDS(M1) I run the follwing SQL
update menu_code
set ipp_uid = 20
where id = 4;
commit;
on master(M2) database in table menu_code row with ID=4 doesn't exsit.
When I apply deffred transaction that gnerated by above SQL
I get ORA-01403: no data found and ofcourse trnsaction doesn't apply to db and goes to deferror. Since I am using DISCARD method
it should be resolved and not to gnerate error message.
Here is detail info.
Table name: menu_code
--creating column group
BEGIN
DBMS_REPCAT.MAKE_COLUMN_GROUP (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
column_group => 'MENU_CODE_CG1',
list_of_column_names => 'id,ipp_uid');
END;
-- adding update conflict resolution
BEGIN
DBMS_REPCAT.ADD_UPDATE_RESOLUTION (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
column_group => 'MENU_CODE_CG1',
sequence_no => 1,
method => 'DISCARD',
parameter_column_name => 'id,ipp_uid');
END;
--regenerating support for the table.
BEGIN
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
type => 'TABLE',
min_communication => TRUE);
END;
Thanks.
PravinYou are absolutely right. Now we decided not to write any conflict resolution routine at all.
Non MDS database is read-only till fail over. After fail over non MDS (other master) will allow insert/update operation.
To fail back to MDS we will write our procedure/function, out side of Oracle conflict resolution( both database will be in Read only mode during synchronizing).
We will delete all deferred transaction/error form the queue and once data transfer is complete, again MDS becomes primary database to use.
Oracle conflict resolutions are to complicated and has lots of overhead and maintenance.
Thanks.
Pravin -
ORA-01403: no data found when calling a web service from HTMLDB
I am working through Section 6 How to Implement a Web Service of the HTML DB 2 Day Developer tutorial. I can get the first example to work but not the second one. I am able to add the web reference and create the form and report. However, when I run the page and click submit, I get ORA-01403: no data found.
When I test the service, this is what shows in the Message Request:
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header><namesp1:Header xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Username xsi:type="xsd:string"></namesp1:Username><namesp1:Password xsi:type="xsd:string"></namesp1:Password><namesp1:Tracer xsi:type="xsd:string"></namesp1:Tracer></namesp1:Header></SOAP-ENV:Header><SOAP-ENV:Body><namesp1:ListFuturesByExchange xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Exchange xsi:type="xsd:string">NYMEX</namesp1:Exchange></namesp1:ListFuturesByExchange></SOAP-ENV:Body></SOAP-ENV:Envelope>
Nothing shows in the Message Response.
I have also tried to call a simple web service that I created in .NET. It exhibits the same behavior. I am able to add the reference and create the form. But when I click the submit button, I get ORA-01403: no data found.
Windows 2000
HTMLDB 2.0.0.00.49
Oracle9i 9.2.0.6.0
Any help will be greatly appreciated.I'm having a similar problem!, Although, distressing as it is to observe the lack of response this thread has had for 9 months, I'm still seeking help here!
I created a web service reference according to the following WSDL : "http://OgAppExpress:[email protected]:5555/invoke/OgAdminUtils.pub:WSDL_HLR" (operation name="getSubscriberInfoByMSISDN") and a form on that web service, all of which went very nicely. But! When I ran the form, inserted the value ("3546933599") into the parameter and pressed submit.... => "ORA-01403: no data found"
The debug action displays very limited information and sheds no light on the problem :( Multiple attempts, on recreating the project from scratch, have resulted in the same utter failure! Needless to say, this nulls the affect of my Prozac proscription....
Is there anybody out there who can help me and defend APEX's reputation? -
ORA-01403: no data found error hile inserting into a table
Hi,
I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
Please someone help me. Below is the code.
CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
IS
BEGIN
IF t_array.count> 0 THEN
FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
FOR i IN t_array.FIRST..t_array.LAST
LOOP
INSERT INTO XXDL_TEST
VALUES(t_array(i).name )
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
END;Thanks
AlakaIt looks like your Array is sparsely populated:
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(2) := 'B';
8 l_tab(3) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
B
C
PL/SQL procedure successfully completed.
SQL>
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(3) := 'B';
8 l_tab(4) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
You should also be using the FORALL syntax with INDICES OF. Check out The Docs -
ORA-01403: no data found for default value
I have the following pl/sql function body for setting the default value of a select list.
DECLARE
selected VARCHAR2(100);
BEGIN
select person_id into selected from ht_people
where :app_user=flow_user;
RETURN selected ;
END;
It works perfectly until the user who is logged in is not on the list and then I get:
ORA-01403: no data found
ERR-9131 Error in PLSQL function body for item default code, item=P7_IDENTIFIED_BY
Is there an item property I can set to handle this or must this be done in PL/SQL?This will throw no error if user not found:
DECLARE
selected VARCHAR2 (100);
BEGIN
FOR c IN (SELECT person_id
FROM ht_people
WHERE :app_user = flow_user)
LOOP
selected := c.person_id;
END LOOP;
RETURN selected;
END;Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------
Maybe you are looking for
-
Dear Experts, I am facing 2 issues in relevant for solman in EP. 1) I have created Portal standard Component for (com.sap.portal.epsolman)(solution Manger) create support message from EP. I have mentioned all connection properties. when I click on th
-
Second Display Menu Font sizing bug...
A bug that's been around far too long has to do with menu text on the second display screen not adjusting when the custom identity font is changed (reduced in our case). It would make sense for the font size to be the same on both displays. The fon
-
IE7 locks onto Mobil layout vs desktop layout
I am developing a new site and using the fluid grid layout. I have tested it on my laptop in Firefox v18, Internet Explorer 9, and Chrome v24. Everything was fine until I tested it on an XP desktop. Everything looked fine in Firefox v18 on the des
-
Permission changes won't take effect
Using 10.4.11 on my iMac, I'm trying to change permissions for my iTunes folder (and many others). It's in Users>MBP>Music, having been moved from a previous user. I went into Get Info, unlocked it, switched it to MBP for read/write, and clicked "App
-
WPF Report Viewer Thrown an Exception After PrintToPrinter() method
When I send to report for print from calling PrintToPrinter method after print report that exception show on first time Then reprint report that exception show.