Strange ORA-03001 error
I have a create table query. It runs fine. All I do is take off the create table as line and run the query and it gives me ORA-03001 feature not implemented. What's going on?
Please be more detailed: what statement, how do you run it, what is "taking off", and what versions (DB, sqldev) are you using?
K.
Similar Messages
-
Hi Guys,
I'm getting a very strange ORA-01044 error:
Oracle.DataAccess.Client.OracleException ORA-01044: size 87160000 of buffer bound to variable exceeds maximum 288212783965667328 at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src, String procedure)*
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src)*
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
As you can see, the buffer size does not exceed the maximum stated, yet it is still causing an exception.
Some background.. A new parameter has been added to a stored proc that was originally working fine, this new parameter is an associative array of numbers.
On the ODP.Net side, I create a parameter that has a collection type of "*PLSQLAssociativeArray*" and Oracle DB Type of "*Int32*".
Any ideas as to what might be causing this problem?Hi,
What db version?
There is an older bug where this error would be raised if the requested buffer size exceeded the granule size of the SGA. That was from the 9.2 timeframe as I recall.
Regards,
Mark -
I added a column to a tabular form and its underlying table, and now the tabular form is showing:
failed to parse SQL query:
ORA-03001: unimplemented feature
when I press the "ADD" button.
What do I need to do to get this working, or will it be faster just to rebuild the page based on the new table definition?Hi,
Whenever I've needed to update a tabular form I adjust the SQL statement, apply changes, go back in and edit the new column(s) to ensure that they are pointing to the correct table and field and apply changes again.
Occasionally, I have had to clear the in my browser after loading the page for the first time, but that has only been needed if I've done something to a field that uses a LOV in a Select List. Otherwise, I don't have any problems if I follow the above.
Regards
Andy -
ORA-03001 "unimplemented feature" error for SQL when using view
Our ERP allows us (IT staff) to create Information Access Layers which are basically views. These can be "live" where the view is like your tradiitonal one or non-live, where a table of data is replicated on a schedule and a view is available over that table.
The following SQL runs fine with a non-live IAL but gives an ORA-03001 error when using a live one.
Any ideas why please? We are using 9.2.0.6
Thanks
with
d_list as
select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
from
ifsinfo.cust_ord_salescodes
where
site LIKE 'OKM' || '%'
and
line_date_entered >=TO_DATE ('01/06/2007','DD/MM/YYYY')
AND
line_date_entered <ADD_MONTHS (TO_DATE ('01/06/2007','DD/MM/YYYY'),2)+(1-1/(60*60*24))
AND
sub_division = 'GAS'
AND
line_item_no <= 0
AND
line_status != 'Cancelled'
group by
territory, customer_name, order_no, catalog_desc
select
d_list.territory,
d_list.customer_name,
d_list.order_no,
d,
0 as sum_value,
d_list.v
from
(select d_list.order_no, sum(V) sv from d_list having sum(V) > max(3000) group by d_list.order_no) s_list,
d_list
where
s_list.order_no=d_list.order_no
order by
d_list.territory, d_list.customer_name, d_list.order_no,d
/Note: If I run the following it is fine, but obviously does not provide what I want:
with
d_list as
select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
from
ifsinfo.cust_ord_salescodes
where
site LIKE 'OKM' || '%'
and
line_date_entered >=TO_DATE ('01/06/2007','DD/MM/YYYY')
AND
line_date_entered <ADD_MONTHS (TO_DATE ('01/06/2007','DD/MM/YYYY'),2)+(1-1/(60*60*24))
AND
sub_division = 'GAS'
AND
line_item_no <= 0
AND
line_status != 'Cancelled'
group by
territory, customer_name, order_no, catalog_desc
select
d_list.territory,
d_list.customer_name,
d_list.order_no,
d,
0 as sum_value,
d_list.v
from
--(select d_list.order_no, sum(V) sv from d_list having sum(V) > max(3000) group by d_list.order_no) s_list,
d_list
--where
--s_list.order_no=d_list.order_no
order by
d_list.territory, d_list.customer_name, d_list.order_no,d
/Thanks David. The actual SQL is as follows:
with
p_list as
(select * from
(select 'OKM' p_company,
'GAS' p_subdiv,
'01/06/2007' p_startdate,
2 p_months,
3000 p_minval,
DECODE(UPPER('OKM'),'OKM','DD/MM/YYYY','KMI','DD/MM/YYYY','OIA','MM/DD/YYYY') p_datefmt
from dual)
d_list as
select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
from
ifsinfo.cust_ord_salescodes,
p_list
where
site LIKE p_company || '%'
and
line_date_entered >=TO_DATE (p_startdate,p_datefmt)
AND
line_date_entered <ADD_MONTHS (TO_DATE (p_startdate,p_datefmt),p_months)+(1-1/(60*60*24))
AND
sub_division = p_subdiv
AND
line_item_no <= 0
AND
line_status != 'Cancelled'
group by
territory, customer_name, order_no, catalog_desc
select d_list.territory, d_list.customer_name, d_list.order_no, d, decode(lag(d_list.order_no) over (order by d_list.territory, d_list.customer_name, d_list.order_no),d_list.order_no,0,s_list.sv) as sum_value, d_list.v from
(select d_list.order_no, sum(V) sv from d_list, p_list having sum(V) > max(p_minval) group by d_list.order_no) s_list,
d_list
where
s_list.order_no=d_list.order_no
order by
d_list.territory, d_list.customer_name, d_list.order_no,d
/the mystery is why it works for a view over a table (created by SQL A) but not a view (which is SQL A).
The actual VIEW is:
SELECT
SUBSTR(co.contract,1,3) company,
co.contract site,
co.order_no order_no,
co.order_id order_type_code,
co.currency_code currency_code,
ROUND(1/col.currency_rate,x_curr_rounding_dp) currency_rate,
co.customer_po_no customer_po_no,
co.date_entered head_date_entered,
co.authorize_code coordinator,
NVL(co.market_code,coc.market_code) customer_market_code,
NVL(co.district_code,x_def_district_code) customer_district_code,
co.customer_no customer_no,
ifsapp.cust_ord_customer_api.get_name(co.customer_no) customer_name,
co.state head_status,
decode(co.state,'Cancelled','N','Invoiced/Closed','N','Y')
head_open_status,
ROUND (
ifsapp.customer_order_api.get_total_base_price(co.order_no)
,x_rounding_dp) total_order_value,
------- co.salesman_code head_salesman_code,
col.line_no line_no,
col.rel_no rel_no,
col.line_item_no line_item_no,
NVL(col.part_no,x_def_inv_part) inventory_part_no,
col.catalog_no sales_part_no,
col.catalog_desc catalog_desc,
col.date_entered line_date_entered,
col.catalog_type sales_part_type,
col.planned_ship_date line_planned_ship_date,
col.planned_delivery_date line_planned_delivery_date,
col.promised_delivery_date line_promised_delivery_date,
col.real_ship_date,
------- col.ref_id line_salesman_code,
col.state line_status,
decode(col.state,'Cancelled','N','Invoiced/Closed','N','Y')
line_open_status,
nvl(col.ref_id,co.salesman_code) salesman_code,
nvl(col.C_Salesman_Region_Code,sps.region_code) region_code,
nvl(col.C_Salesman_Division,sps.division) division,
nvl(col.C_Salesman_Sub_Division,sps.sub_division) sub_division,
nvl(col.C_Salesman_Territory,sps.territory) territory,
NVL2 (
ifsapp.customer_group_api.get_description(co.priority),co.priority,coc.cust_grp
) customer_group_code,
NVL(col.discount,0) discount_percentage,
NVL(col.order_discount,0) order_discount_percentage,
(1-NVL(col.discount,0)/100) *
(1-NVL(col.order_discount,0)/100) discount_factor,
1-(1-NVL(col.discount,0)/100) *
(1-NVL(col.order_discount,0)/100) less_discount_factor,
ROUND (
(DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
,x_rounding_dp) line_discount_amount,
ROUND (
greatest(col.buy_qty_due-col.qty_invoiced,0)*(DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
,x_rounding_dp) rem_line_discount_amount,
col.buy_qty_due buy_qty_due,
col.qty_invoiced qty_invoiced,
greatest(
col.buy_qty_due-col.qty_invoiced,0
) qty_remaining,
qty_shipped,
greatest(
col.buy_qty_due-col.qty_shipped,0
) qty_not_shipped,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)
,x_rounding_dp) unit_line_price,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)-
ROUND (
(DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
,x_rounding_dp)
,x_rounding_dp) unit_line_price_less_disc,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)
,x_rounding_dp) total_line_price,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)-
ROUND (
(DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
,x_rounding_dp)
,x_rounding_dp) total_line_price_less_disc,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,greatest(col.buy_qty_due-col.qty_invoiced,0)*col.base_sale_unit_price*col.price_conv_factor)
,x_rounding_dp) rem_total_line_price,
ROUND (
DECODE(SIGN(col.line_item_no),1,0,greatest(col.buy_qty_due-col.qty_invoiced,0)*col.base_sale_unit_price*col.price_conv_factor)-
ROUND (
greatest(col.buy_qty_due-col.qty_invoiced,0)*(DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
,x_rounding_dp)
,x_rounding_dp) rem_total_line_price_less_disc,
NVL(co.commission_percentage,0) commission_percent,
1-NVL(co.commission_percentage,0)/100 commission_factor,
NVL(co.commission_percentage,0)/100 less_commission_factor,
col.cost
FROM
ifsapp.customer_order_line col,
ifsapp.customer_order co,
ifsapp.sales_part_salesman sps,
ifsapp.cust_ord_customer coc,
(select
2 x_rounding_dp,
6 x_curr_rounding_dp,
'9999999' x_def_inv_part,
'Domestic' x_def_district_code
from
dual) constants
WHERE
col.order_no=co.order_no
AND
co.customer_no = coc.customer_no
AND
(NVL(col.ref_id,co.salesman_code) = sps.salesman_code or sps.salesman_code is null)
------AND
------ co.state != 'Cancelled'
------AND
------ col.state !='Cancelled'
------AND
------ col.line_item_no <=0I suspect it is the level of complexity that Oracle cannot handle. I have seen notes about Oracle errors with views generating that ORA 03001, maybe I should log it with Oracle... -
Hi all,
After we restarted portal,we cannot start jcontrol,and we get a strange ORA-00001 error,when we check the log:
Here is the log defaulttrace:
Date : 12/10/2007
Time : 15:13:26:500
Message : ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
com.sap.caf.eu.gp.base.exception.EngineException: ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.AbstractLocalProcessPersistence.createBlockInputLocal(AbstractLocalProcessPersistence.java:904)
at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.LocalProcessPersistence.createBlock(LocalProcessPersistence.java:250)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.startBlock(StatusWriter.java:984)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.startActivity(StatusWriter.java:927)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.changeParentBlockStatus(StatusWriter.java:2710)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.changeParentBlockStatus(StatusWriter.java:2728)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.updateProcessStatusUserDecisionBlock(StatusWriter.java:2574)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.updateProcessStatus(StatusWriter.java:2235)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.completeAction(StatusWriter.java:223)
at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.LocalWorkflowConnector.completeAction(LocalWorkflowConnector.java:247)
at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.BackGroundActionProcessorHelper.processAction(BackGroundActionProcessorHelper.java:223)
at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.queue.BackgroundCOQueueProcessor.run(BackgroundCOQueueProcessor.java:269)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:259)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.AbstractLocalProcessPersistence.createBlockInputLocal(AbstractLocalProcessPersistence.java:901)
... 15 more
And i also check the startlog.It seems ok.
Someone knows what's happening and how to solve this?
Best regards
delmaHi,Shikhil
Thank you for your reply.
But actually,we just install a WEB AS FOR JAVA on the portal server,no ABAP at all.
I think it may be the database problem.
Thank you.
Best regards
delma -
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.
-
Error- ORA-03001: unimplemented feature
Hi,
I am getting ORA-03001:unimplemented feature error in my code.My code is generatiing a clob object.
I have used(Xmlelement
"ABC",
Xmlforest
nvl(to_char(Column_name, 'HHMMSS' ),' ')
The same code is working in other database.But in my current Database i am getting the above error.And moreover both the database has same version(11g release2)
Can any one please let me know what might be the root cause whether any utility pkg is not installed properly or any other issue.Post exact version and a snippet of SQL*Plus showing your statement along with all errors. For example:
SQL> select *
2 from v$version
3 /
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> select Xmlelement(
2 "ABC",
3 Xmlforest(
4 nvl(to_char(hiredate,'HHMMSS' ),' ') d
5 )
6 )
7 from emp
8 /
XMLELEMENT("ABC",XMLFOREST(NVL(TO_CHAR(HIREDATE,'HHMMSS'),'')D))
<ABC><D>121200</D></ABC>
<ABC><D>120200</D></ABC>
<ABC><D>120200</D></ABC>
<ABC><D>120400</D></ABC>
<ABC><D>120900</D></ABC>
<ABC><D>120500</D></ABC>
<ABC><D>120600</D></ABC>
<ABC><D>120400</D></ABC>
<ABC><D>121100</D></ABC>
<ABC><D>120900</D></ABC>
<ABC><D>120500</D></ABC>
XMLELEMENT("ABC",XMLFOREST(NVL(TO_CHAR(HIREDATE,'HHMMSS'),'')D))
<ABC><D>121200</D></ABC>
<ABC><D>121200</D></ABC>
<ABC><D>120100</D></ABC>
14 rows selected.
SQL> SY. -
PL/SQL: ORA-04052: error occurred when looking up remote object.
Hi All,
I'm getting the following error message while executing a PL/SQL Block.
PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
ORA-00604: error occurred at recursive SQL level 1
ORA-03106: fatal two-task communication protocol error
ORA-02063: preceding line from FTSStatement
declare
v_coun number;
begin
select count(*) into v_coun
from updluser.filestatushistory@fts;
end;Back ground of the situation as follows,
My DataBase version 10.2.0.3 DB Name :DB1
Table Owner : UPLDUSER
Table Name : FILESTATUSHISTORY
I have a report user on the same database and I have grant all on the above table to report user
Report User : RPT_FTS
SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
Database version : 9.2.0.8
DB Name : DB2
User Name : RPT_REPORTS
I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now the strange about this is that I have Created a new table on DB1 db like below;
SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
Just wants To know what whould have been the cause for this .
Cheers
KanchanaHi Kanchana,
Perhaps following link of google search has answer to your query
ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
HTH!
*009* -
ORA-00604: error occurred at recursive SQL when calling proc via db_link
Hi,
I'm on 9.2.0.8 and got strange issue with simple test case
on source db:
CREATE OR REPLACE PROCEDURE ADMIN.gg_ref(out_tokens OUT SYS_REFCURSOR) is
BEGIN
OPEN out_tokens for select dummy from dual;
END ;
Now testing code localy:
SQL> var r refcursor
SQL> declare
2 output sys_refcursor;
3 begin
4 adminx.gg_ref(output);
5 :r:=output;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> print r
D
X
So its working.
I've got db_link to that db , and now call that proc via dblink from other 9.2.0.8 DB:
var r refcursor
1 declare
2 output sys_refcursor;
3 begin
4 admin.gg_ref@LINK_NAME(output);
5 :r:=output;
6* end;
SQL> /
declare
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00900: invalid SQL statementWhats wrong with my code ?
Are there any restriction I'm not aware of ?
Regards
GregGGregG wrote:
What should my code look like now ?
Should I rewrite this as function returning index by collection or something ?You can use DBMS_SQL - but use the remote package and not the local one. This is a little bit more complex ito call interface than using a ref cursor, but is the very same thing on the server side. DBMS_SQL also provides a more comprehensive set of features than using the ref cursor interface.
The main issue though is additional coding - as DBMS_SQL is a lower level interface (a lot closer to the real Oracle Call Interface/OCI):
--// on remote database the procedure returns a DBMS_SQL cursor instead of a ref cursor
SQL> create or replace procedure FooProc( cur in out number, deptID number ) is
2 rc number;
3 begin
4 cur := DBMS_SQL.open_cursor;
5
6 DBMS_SQL.parse(
7 cur,
8 'select ename from emp where deptno = :deptID',
9 DBMS_SQL.native
10 );
11
12 DBMS_SQL.Bind_Variable( cur, 'deptID', deptID );
13
14 rc := DBMS_SQL.Execute( cur );
15 end;
16 /
Procedure created.
--// from the local database side we call this remote proc
SQL> declare
2 c number; --// instead of using sys_refcursor
3 empName varchar2(10); --// buffer to fetch column into
4 begin
5 FooProc@testdb( c, 10 ); --/ call the proc that creates the cursor
6
7 --// we need to define our fetch buffer for the 1st column in the
8 --// SQL projection of that cursor (10 byte fetch buffer for 1st column)
9 DBMS_SQL.define_column@testdb( c, 1, empName, 10 );
10
11 --// we now fetch from this cursor, but via the DBMS_SQL
12 --// interface
13 loop
14 --// fetch the row (exit when 0 rows are fetched)
15 exit when DBMS_SQL.Fetch_Rows@testdb( c ) = 0;
16
17 --// copy value of 1st column in row into the local PL/SQL buffer
18 DBMS_SQL.column_value@testdb( c, 1, empName );
19
20 --// record value it via dbms output
21 DBMS_OUTPUT.put_line( 'name='||empName||' deptID=10' );
22 end loop;
23
24 --// close it explicitly as you would a ref cursor
25 DBMS_SQL.Close_Cursor@testdb( c );
26 end;
27 /
name=CLARK deptID=10
name=KING deptID=10
name=MILLER deptID=10
PL/SQL procedure successfully completed.
SQL> -
Re: BUG? APEX 4.0: ORA-20503 error editing report with 400+ columns
Hello Everyone.
I've run into something quite strange and am hoping you can help me.
I am using Apex 4.0.1 and Oracle version 10.2.0.5. I've created a "classical" report in which the underlying SQL is a very simple:
select * from pvtabThe Oracle table pvtab consists of 419 columns, all of which are varchar2(88) and number type. That's it.
When I run the report, al of the columns show up as expected.
However, when I go into the "Report Attributes" tab and click on one of the fields (any of them, it doesn't matter which one), I immediately get the following error:
ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "598CAA7B68746A66F4B99E1512C36DED" application checksum = "0"If if replace the "*" with a few actual column names, then I am able to access any of these columns without problem.
If I put back the "*", I then encounter this error again.
I have never seen this error with other SQL SELECT statements in which I use the "*" qualifier to retrieve all columns from the table.
And so, I am wondering if the error is caused because of the large number of columns (419) in my table.
I've seen this same error mentioned in connection with forms but never with a report.
So, is there some limit to the number of columns one can have in a "classic" or interactive report?
Any idea why I would be getting this error?
Here is the DDL for my table pvtab:
CREATE TABLE "PVTAB"
( "MICRO" VARCHAR2(4),
"PRIM" VARCHAR2(4),
"UNIT" NUMBER,
"SEC_REF_1" NUMBER,
"SECN_1" VARCHAR2(88),
"SEC_REF_2" NUMBER,
"SECN_2" VARCHAR2(88),
"SEC_REF_3" NUMBER,
"SECN_3" VARCHAR2(88),
"SEC_REF_4" NUMBER,
"SECN_4" VARCHAR2(88),
"SEC_REF_5" NUMBER,
"SECN_5" VARCHAR2(88),
"SEC_REF_6" NUMBER,
"SECN_6" VARCHAR2(88),
"SEC_REF_7" NUMBER,
"SECN_7" VARCHAR2(88),
"SEC_REF_8" NUMBER,
"SECN_8" VARCHAR2(88),
"SEC_REF_9" NUMBER,
"SECN_9" VARCHAR2(88),
"SEC_REF_10" NUMBER,
"SECN_10" VARCHAR2(88),
"SEC_REF_11" NUMBER,
"SECN_11" VARCHAR2(88),
"SEC_REF_12" NUMBER,
"SECN_12" VARCHAR2(88),
"SEC_REF_13" NUMBER,
"SECN_13" VARCHAR2(88),
"SEC_REF_14" NUMBER,
"SECN_14" VARCHAR2(88),
"SEC_REF_15" NUMBER,
"SECN_15" VARCHAR2(88),
"SEC_REF_16" NUMBER,
"SECN_16" VARCHAR2(88),
"SEC_REF_17" NUMBER,
"SECN_17" VARCHAR2(88),
"SEC_REF_18" NUMBER,
"SECN_18" VARCHAR2(88),
"SEC_REF_19" NUMBER,
"SECN_19" VARCHAR2(88),
"SEC_REF_20" NUMBER,
"SECN_20" VARCHAR2(88),
"SEC_REF_21" NUMBER,
"SECN_21" VARCHAR2(88),
"SEC_REF_22" NUMBER,
"SECN_22" VARCHAR2(88),
"SEC_REF_23" NUMBER,
"SECN_23" VARCHAR2(88),
"SEC_REF_24" NUMBER,
"SECN_24" VARCHAR2(88),
"SEC_REF_25" NUMBER,
"SECN_25" VARCHAR2(88),
"SEC_REF_26" NUMBER,
"SECN_26" VARCHAR2(88),
"SEC_REF_27" NUMBER,
"SECN_27" VARCHAR2(88),
"SEC_REF_28" NUMBER,
"SECN_28" VARCHAR2(88),
"SEC_REF_29" NUMBER,
"SECN_29" VARCHAR2(88),
"SEC_REF_30" NUMBER,
"SECN_30" VARCHAR2(88),
"SEC_REF_31" NUMBER,
"SECN_31" VARCHAR2(88),
"SEC_REF_32" NUMBER,
"SECN_32" VARCHAR2(88),
"SEC_REF_33" NUMBER,
"SECN_33" VARCHAR2(88),
"SEC_REF_34" NUMBER,
"SECN_34" VARCHAR2(88),
"SEC_REF_35" NUMBER,
"SECN_35" VARCHAR2(88),
"SEC_REF_36" NUMBER,
"SECN_36" VARCHAR2(88),
"SEC_REF_37" NUMBER,
"SECN_37" VARCHAR2(88),
"SEC_REF_38" NUMBER,
"SECN_38" VARCHAR2(88),
"SEC_REF_39" NUMBER,
"SECN_39" VARCHAR2(88),
"SEC_REF_40" NUMBER,
"SECN_40" VARCHAR2(88),
"SEC_REF_41" NUMBER,
"SECN_41" VARCHAR2(88),
"SEC_REF_42" NUMBER,
"SECN_42" VARCHAR2(88),
"SEC_REF_43" NUMBER,
"SECN_43" VARCHAR2(88),
"SEC_REF_44" NUMBER,
"SECN_44" VARCHAR2(88),
"SEC_REF_45" NUMBER,
"SECN_45" VARCHAR2(88),
"SEC_REF_46" NUMBER,
"SECN_46" VARCHAR2(88),
"SEC_REF_47" NUMBER,
"SECN_47" VARCHAR2(88),
"SEC_REF_48" NUMBER,
"SECN_48" VARCHAR2(88),
"SEC_REF_49" NUMBER,
"SECN_49" VARCHAR2(88),
"SEC_REF_50" NUMBER,
"SECN_50" VARCHAR2(88),
"SEC_REF_51" NUMBER,
"SECN_51" VARCHAR2(88),
"SEC_REF_52" NUMBER,
"SECN_52" VARCHAR2(88),
"SEC_REF_53" NUMBER,
"SECN_53" VARCHAR2(88),
"SEC_REF_54" NUMBER,
"SECN_54" VARCHAR2(88),
"SEC_REF_55" NUMBER,
"SECN_55" VARCHAR2(88),
"SEC_REF_56" NUMBER,
"SECN_56" VARCHAR2(88),
"SEC_REF_57" NUMBER,
"SECN_57" VARCHAR2(88),
"SEC_REF_58" NUMBER,
"SECN_58" VARCHAR2(88),
"SEC_REF_59" NUMBER,
"SECN_59" VARCHAR2(88),
"SEC_REF_60" NUMBER,
"SECN_60" VARCHAR2(88),
"SEC_REF_61" NUMBER,
"SECN_61" VARCHAR2(88),
"SEC_REF_62" NUMBER,
"SECN_62" VARCHAR2(88),
"SEC_REF_63" NUMBER,
"SECN_63" VARCHAR2(88),
"SEC_REF_64" NUMBER,
"SECN_64" VARCHAR2(88),
"SEC_REF_65" NUMBER,
"SECN_65" VARCHAR2(88),
"SEC_REF_66" NUMBER,
"SECN_66" VARCHAR2(88),
"SEC_REF_67" NUMBER,
"SECN_67" VARCHAR2(88),
"SEC_REF_68" NUMBER,
"SECN_68" VARCHAR2(88),
"SEC_REF_69" NUMBER,
"SECN_69" VARCHAR2(88),
"SEC_REF_70" NUMBER,
"SECN_70" VARCHAR2(88),
"SEC_REF_71" NUMBER,
"SECN_71" VARCHAR2(88),
"SEC_REF_72" NUMBER,
"SECN_72" VARCHAR2(88),
"SEC_REF_73" NUMBER,
"SECN_73" VARCHAR2(88),
"SEC_REF_74" NUMBER,
"SECN_74" VARCHAR2(88),
"SEC_REF_75" NUMBER,
"SECN_75" VARCHAR2(88),
"SEC_REF_76" NUMBER,
"SECN_76" VARCHAR2(88),
"SEC_REF_77" NUMBER,
"SECN_77" VARCHAR2(88),
"SEC_REF_78" NUMBER,
"SECN_78" VARCHAR2(88),
"SEC_REF_79" NUMBER,
"SECN_79" VARCHAR2(88),
"SEC_REF_80" NUMBER,
"SECN_80" VARCHAR2(88),
"SEC_REF_81" NUMBER,
"SECN_81" VARCHAR2(88),
"SEC_REF_82" NUMBER,
"SECN_82" VARCHAR2(88),
"SEC_REF_83" NUMBER,
"SECN_83" VARCHAR2(88),
"SEC_REF_84" NUMBER,
"SECN_84" VARCHAR2(88),
"SEC_REF_85" NUMBER,
"SECN_85" VARCHAR2(88),
"SEC_REF_86" NUMBER,
"SECN_86" VARCHAR2(88),
"SEC_REF_87" NUMBER,
"SECN_87" VARCHAR2(88),
"SEC_REF_88" NUMBER,
"SECN_88" VARCHAR2(88),
"SEC_REF_89" NUMBER,
"SECN_89" VARCHAR2(88),
"SEC_REF_90" NUMBER,
"SECN_90" VARCHAR2(88),
"SEC_REF_91" NUMBER,
"SECN_91" VARCHAR2(88),
"SEC_REF_92" NUMBER,
"SECN_92" VARCHAR2(88),
"SEC_REF_93" NUMBER,
"SECN_93" VARCHAR2(88),
"SEC_REF_94" NUMBER,
"SECN_94" VARCHAR2(88),
"SEC_REF_95" NUMBER,
"SECN_95" VARCHAR2(88),
"SEC_REF_96" NUMBER,
"SECN_96" VARCHAR2(88),
"SEC_REF_97" NUMBER,
"SECN_97" VARCHAR2(88),
"SEC_REF_98" NUMBER,
"SECN_98" VARCHAR2(88),
"SEC_REF_99" NUMBER,
"SECN_99" VARCHAR2(88),
"SEC_REF_100" NUMBER,
"SECN_100" VARCHAR2(88),
"SEC_REF_101" NUMBER,
"SECN_101" VARCHAR2(88),
"SEC_REF_102" NUMBER,
"SECN_102" VARCHAR2(88),
"SEC_REF_103" NUMBER,
"SECN_103" VARCHAR2(88),
"SEC_REF_104" NUMBER,
"SECN_104" VARCHAR2(88),
"SEC_REF_105" NUMBER,
"SECN_105" VARCHAR2(88),
"SEC_REF_106" NUMBER,
"SECN_106" VARCHAR2(88),
"SEC_REF_107" NUMBER,
"SECN_107" VARCHAR2(88),
"SEC_REF_108" NUMBER,
"SECN_108" VARCHAR2(88),
"SEC_REF_109" NUMBER,
"SECN_109" VARCHAR2(88),
"SEC_REF_110" NUMBER,
"SECN_110" VARCHAR2(88),
"SEC_REF_111" NUMBER,
"SECN_111" VARCHAR2(88),
"SEC_REF_112" NUMBER,
"SECN_112" VARCHAR2(88),
"SEC_REF_113" NUMBER,
"SECN_113" VARCHAR2(88),
"SEC_REF_114" NUMBER,
"SECN_114" VARCHAR2(88),
"SEC_REF_115" NUMBER,
"SECN_115" VARCHAR2(88),
"SEC_REF_116" NUMBER,
"SECN_116" VARCHAR2(88),
"SEC_REF_117" NUMBER,
"SECN_117" VARCHAR2(88),
"SEC_REF_118" NUMBER,
"SECN_118" VARCHAR2(88),
"SEC_REF_119" NUMBER,
"SECN_119" VARCHAR2(88),
"SEC_REF_120" NUMBER,
"SECN_120" VARCHAR2(88),
"SEC_REF_121" NUMBER,
"SECN_121" VARCHAR2(88),
"SEC_REF_122" NUMBER,
"SECN_122" VARCHAR2(88),
"SEC_REF_123" NUMBER,
"SECN_123" VARCHAR2(88),
"SEC_REF_124" NUMBER,
"SECN_124" VARCHAR2(88),
"SEC_REF_125" NUMBER,
"SECN_125" VARCHAR2(88),
"SEC_REF_126" NUMBER,
"SECN_126" VARCHAR2(88),
"SEC_REF_127" NUMBER,
"SECN_127" VARCHAR2(88),
"SEC_REF_128" NUMBER,
"SECN_128" VARCHAR2(88),
"SEC_REF_129" NUMBER,
"SECN_129" VARCHAR2(88),
"SEC_REF_130" NUMBER,
"SECN_130" VARCHAR2(88),
"SEC_REF_131" NUMBER,
"SECN_131" VARCHAR2(88),
"SEC_REF_132" NUMBER,
"SECN_132" VARCHAR2(88),
"SEC_REF_133" NUMBER,
"SECN_133" VARCHAR2(88),
"SEC_REF_134" NUMBER,
"SECN_134" VARCHAR2(88),
"SEC_REF_135" NUMBER,
"SECN_135" VARCHAR2(88),
"SEC_REF_136" NUMBER,
"SECN_136" VARCHAR2(88),
"SEC_REF_137" NUMBER,
"SECN_137" VARCHAR2(88),
"SEC_REF_138" NUMBER,
"SECN_138" VARCHAR2(88),
"SEC_REF_139" NUMBER,
"SECN_139" VARCHAR2(88),
"SEC_REF_140" NUMBER,
"SECN_140" VARCHAR2(88),
"SEC_REF_141" NUMBER,
"SECN_141" VARCHAR2(88),
"SEC_REF_142" NUMBER,
"SECN_142" VARCHAR2(88),
"SEC_REF_143" NUMBER,
"SECN_143" VARCHAR2(88),
"SEC_REF_144" NUMBER,
"SECN_144" VARCHAR2(88),
"SEC_REF_145" NUMBER,
"SECN_145" VARCHAR2(88),
"SEC_REF_146" NUMBER,
"SECN_146" VARCHAR2(88),
"SEC_REF_147" NUMBER,
"SECN_147" VARCHAR2(88),
"SEC_REF_148" NUMBER,
"SECN_148" VARCHAR2(88),
"SEC_REF_149" NUMBER,
"SECN_149" VARCHAR2(88),
"SEC_REF_150" NUMBER,
"SECN_150" VARCHAR2(88),
"SEC_REF_151" NUMBER,
"SECN_151" VARCHAR2(88),
"SEC_REF_152" NUMBER,
"SECN_152" VARCHAR2(88),
"SEC_REF_153" NUMBER,
"SECN_153" VARCHAR2(88),
"SEC_REF_154" NUMBER,
"SECN_154" VARCHAR2(88),
"SEC_REF_155" NUMBER,
"SECN_155" VARCHAR2(88),
"SEC_REF_156" NUMBER,
"SECN_156" VARCHAR2(88),
"SEC_REF_157" NUMBER,
"SECN_157" VARCHAR2(88),
"SEC_REF_158" NUMBER,
"SECN_158" VARCHAR2(88),
"SEC_REF_159" NUMBER,
"SECN_159" VARCHAR2(88),
"SEC_REF_160" NUMBER,
"SECN_160" VARCHAR2(88),
"SEC_REF_161" NUMBER,
"SECN_161" VARCHAR2(88),
"SEC_REF_162" NUMBER,
"SECN_162" VARCHAR2(88),
"SEC_REF_163" NUMBER,
"SECN_163" VARCHAR2(88),
"SEC_REF_164" NUMBER,
"SECN_164" VARCHAR2(88),
"SEC_REF_165" NUMBER,
"SECN_165" VARCHAR2(88),
"SEC_REF_166" NUMBER,
"SECN_166" VARCHAR2(88),
"SEC_REF_167" NUMBER,
"SECN_167" VARCHAR2(88),
"SEC_REF_168" NUMBER,
"SECN_168" VARCHAR2(88),
"SEC_REF_169" NUMBER,
"SECN_169" VARCHAR2(88),
"SEC_REF_170" NUMBER,
"SECN_170" VARCHAR2(88),
"SEC_REF_171" NUMBER,
"SECN_171" VARCHAR2(88),
"SEC_REF_172" NUMBER,
"SECN_172" VARCHAR2(88),
"SEC_REF_173" NUMBER,
"SECN_173" VARCHAR2(88),
"SEC_REF_174" NUMBER,
"SECN_174" VARCHAR2(88),
"SEC_REF_175" NUMBER,
"SECN_175" VARCHAR2(88),
"SEC_REF_176" NUMBER,
"SECN_176" VARCHAR2(88),
"SEC_REF_177" NUMBER,
"SECN_177" VARCHAR2(88),
"SEC_REF_178" NUMBER,
"SECN_178" VARCHAR2(88),
"SEC_REF_179" NUMBER,
"SECN_179" VARCHAR2(88),
"SEC_REF_180" NUMBER,
"SECN_180" VARCHAR2(88),
"SEC_REF_181" NUMBER,
"SECN_181" VARCHAR2(88),
"SEC_REF_182" NUMBER,
"SECN_182" VARCHAR2(88),
"SEC_REF_183" NUMBER,
"SECN_183" VARCHAR2(88),
"SEC_REF_184" NUMBER,
"SECN_184" VARCHAR2(88),
"SEC_REF_185" NUMBER,
"SECN_185" VARCHAR2(88),
"SEC_REF_186" NUMBER,
"SECN_186" VARCHAR2(88),
"SEC_REF_187" NUMBER,
"SECN_187" VARCHAR2(88),
"SEC_REF_188" NUMBER,
"SECN_188" VARCHAR2(88),
"SEC_REF_189" NUMBER,
"SECN_189" VARCHAR2(88),
"SEC_REF_190" NUMBER,
"SECN_190" VARCHAR2(88),
"SEC_REF_191" NUMBER,
"SECN_191" VARCHAR2(88),
"SEC_REF_192" NUMBER,
"SECN_192" VARCHAR2(88),
"SEC_REF_193" NUMBER,
"SECN_193" VARCHAR2(88),
"SEC_REF_194" NUMBER,
"SECN_194" VARCHAR2(88),
"SEC_REF_195" NUMBER,
"SECN_195" VARCHAR2(88),
"SEC_REF_196" NUMBER,
"SECN_196" VARCHAR2(88),
"SEC_REF_197" NUMBER,
"SECN_197" VARCHAR2(88),
"SEC_REF_198" NUMBER,
"SECN_198" VARCHAR2(88),
"SEC_REF_199" NUMBER,
"SECN_199" VARCHAR2(88),
"SEC_REF_200" NUMBER,
"SECN_200" VARCHAR2(88),
"SEC_REF_201" NUMBER,
"SECN_201" VARCHAR2(88),
"SEC_REF_202" NUMBER,
"SECN_202" VARCHAR2(88),
"SEC_REF_203" NUMBER,
"SECN_203" VARCHAR2(88),
"SEC_REF_204" NUMBER,
"SECN_204" VARCHAR2(88),
"SEC_REF_205" NUMBER,
"SECN_205" VARCHAR2(88),
"SEC_REF_206" NUMBER,
"SECN_206" VARCHAR2(88),
"SEC_REF_207" NUMBER,
"SECN_207" VARCHAR2(88),
"SEC_REF_208" NUMBER,
"SECN_208" VARCHAR2(88)
);Thank you for any help/advice.
Elie
Edited by: EEG on Jun 12, 2011 2:09 PMSo, is there some limit to the number of columns one can have in a "classic" or interactive report?Yes. See Oracle® Application Express Application Builder User's Guide Release 4.0, Appendix B: Oracle Application Express Limits.
Any idea why I would be getting this error?No, but I've replicated it in APEX 4.0.2.00.07 on 11.2.0.1.0 EE using a table of 420 <tt>varchar2(88)</tt> columns:
>
ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "50C9BDC0AA1AEF0EB272E9158B2117B4" application checksum = "0"
>
Happens whether using <tt>select *</tt> or including all column names in the query. (I know you don't want to type all the column names, but I'd never use <tt>select *</tt> in a production application: always use a proper column list. You can get one without typing by drag-and-drop of a table in most IDEs, or a query from <tt>user_tab_columns</tt>.)
I hit the problem at 274 columns. Such an arbitrary number leads me to think that the problem is not one of the number of columns per se, but is due to some other limit (possibly a 32K VARCHAR2/RAW buffer somewhere).
Workaround:
Updates to the report column attributes are actually being saved, and you can navigate them using the Page Definition tree view as described in Appendix B.
Getting More Help:
This is probably a bug. If you have a support agreement with Oracle raise an SR with Oracle Support.
Also:
<li>Search the forum using the "ORA-20503" code and other possible terms to see if there's anything relevant. I had a quick look but the only thread in this context recommended an upgrade on an Oracle 9 DB version that's not compatible with APEX 4.0.
<li>To get the attention of the Oracle APEX team or anyone else who may know more about this problem than we do, edit your original post and change the Subject to be more specific about the actual nature of the problem: <em>BUG? APEX 4.0: ORA-20503 error editing report with 400+ columns</em>, and include your database version/edition and the definition of the <tt>PVTAB</tt> table.
Finally:
Somebody's bound to ask, so we might as well get started:
<li>Why so many columns?
<li>What requirement is this trying to fulfil? -
Why am I getting an ORA-04052 error when I try to compile a Procedure?
Hi,
The following procedure I'm getting an ORA-04052 error when I try to compile the following procedure.
CREATE OR REPLACE PROCEDURE APPS.Find_String (
pin_referenced_name IN dba_dependencies.referenced_name%TYPE)
IS
cursor cur_get_dependancy
is
SELECT distinct owner, name, type
FROM [email protected] -- prod.world
WHERE lower(referenced_name) = lower(pin_referenced_name) --'ftbv_salesrep_all_1d'
AND referenced_type <> 'SYNONYM'
AND owner <> 'SYS'
order by name;
v_owner varchar2(40);
v_name varchar2(50);
v_type varchar2(40);
BEGIN
dbms_output.put_line(upper(pin_referenced_name)||' is found in the following objects.');
dbms_output.put_line(' ');
dbms_output.put_line(RPAD('OWNER', 30, ' ')||RPAD('NAME', 60, ' ')||RPAD('OBJECT TYPE', 30, ' '));
dbms_output.put_line('-------------------------------------------------------------------------------------------------------------------');
FOR i IN cur_get_dependancy
LOOP
v_owner := RPAD(i.owner, 30, ' ');
v_name := RPAD(i.name, 45, ' ');
v_type := RPAD(i.type, 30, ' ');
dbms_output.put_line(v_owner ||v_name|| v_type);
END LOOP;
END find_string;I'm using the link [email protected]. The procedure compiles for other database links used in the cursor including the one commented to the right of the code 'prod.world'.
What's even stranger is that I took the SELECT statement
SELECT distinct owner, name, type
FROM [email protected] -- prod.world
WHERE lower(referenced_name) = lower(pin_referenced_name) --'ftbv_salesrep_all_1d'
AND referenced_type <> 'SYNONYM'
AND owner <> 'SYS'
order by name;out of the procedure and ran it on the command line using the @pinp.world link, the SQL statement ran just fine. But when I tried to compile the above procedure with that exact same SQL statement with the exact same link I get the following string of errors.
ORA-04052: error occurred when looking up remote object [email protected]
ORA-00604: error occurred at recursive SQL level 1
ORA-02068: following severe error from PINP
ORA-03113: end-of-file on communication channelHow can the link work just fine in a regular SQL statement but then cause an error when its compiled in code that otherwise compile just fine when using any other link or even just a plain database. Does anyone have any suggestions?OK Justin,
Here's the query by itself run in another database using the @pinp.world link and querying the dba_dependencies table in the pinp.world database. As you can see the query using this link works just fine returning the requested rows. I can't figure out why the compiler is having an issue with essentially this same query when I try to compile it in a cursor in TOAD. Also this is the database (dev1.world) that I'm trying to compile this Procedure in.
By the way I'm in an Oracle 9.2.0.6 database and TOAD v9.2.
SQL> conn apps/apps1@dev1
Connected.
SQL> SELECT distinct owner, name, type
2 FROM [email protected]
3 WHERE lower(referenced_name) = lower('ALL_USERS')
4 AND referenced_type <> 'SYNONYM'
5 AND owner <> 'SYS'
6 order by name;
OWNER NAME TYPE
PUBLIC ALL_USERS SYNONYM
XDB DBMS_XDBUTIL_INT PACKAGE BODY
XDB DBMS_XDBZ0 PACKAGE BODY
SYSTEM MVIEW_EVALUATIONS VIEW
SYSTEM MVIEW_EXCEPTIONS VIEW
SYSTEM MVIEW_FILTER VIEW
SYSTEM MVIEW_LOG VIEW
SYSTEM MVIEW_RECOMMENDATIONS VIEW
SYSTEM MVIEW_WORKLOAD VIEW
ORASSO WWCTX_API PACKAGE BODY
PORTAL WWCTX_API PACKAGE BODY
ORASSO WWEXP_UTL PACKAGE BODY
PORTAL WWEXP_UTL PACKAGE BODY
PORTAL WWPOB_API_PAGE PACKAGE BODY
PORTAL WWPOF PACKAGE BODY
ORASSO WWPRO_PROVIDER_VALIDATION PACKAGE BODY
PORTAL WWPRO_PROVIDER_VALIDATION PACKAGE BODY
PORTAL WWSBR_EDIT_ATTRIBUTE PACKAGE BODY
PORTAL WWSBR_FOLDER_PORTLET PACKAGE BODY
PORTAL WWSBR_USER_PAGES_PORTLET PACKAGE BODY
ORASSO WWUTL_API_PARSE PACKAGE BODY
OWNER NAME TYPE
PORTAL WWUTL_API_PARSE PACKAGE BODY
PORTAL WWUTL_EXPORT_IMPORT_LOV PACKAGE BODY
ORASSO WWUTL_LOV PACKAGE BODY
PORTAL WWUTL_LOV PACKAGE BODY
PORTAL WWV_CONTEXT PACKAGE BODY
PORTAL WWV_CONTEXT_UTIL PACKAGE BODY
PORTAL WWV_DDL PACKAGE BODY
PORTAL WWV_GENERATE_UTL PACKAGE BODY
PORTAL WWV_GLOBAL PACKAGE
PORTAL WWV_MONITOR_DATABASE PACKAGE BODY
PORTAL WWV_PARSE_AS_SPECIFIC_USER PACKAGE BODY
PORTAL WWV_PARSE_AS_USER PACKAGE BODY
PORTAL WWV_SYS_DML PACKAGE BODY
PORTAL WWV_SYS_RENDER_HIERARCHY PACKAGE BODY
PORTAL WWV_THINGSAVE PACKAGE BODY
PORTAL WWV_UTIL PACKAGE BODY
PORTAL WWV_UTLVALID PACKAGE BODY
38 rows selected.
SQL>Let me know what you think.
Thanks again. -
I installed 9i Developer Suite. I did not install the net configuration manger. The installation said it was not required. I am using forms builder and can compile the form. I connect to the database. However, when running the form I receive a ORA-12560 error. Also, the logon appears and I am prompted to connect to the database. Any help would be greatly appreciated.
The URL looks quite strange to me:
http://lap_top:8888/forms90/f90servlet?form=E:\cis355@userid=scott\tiger@buffer_records=no@debug_message
Looks like the "@" is used to separate the parameters which is new to me. Normally it's either "&" or "+". You can set the separator somewhere, cannot thou remember where? Registry? Also the userid isn't complete. The database name is missing, and even if it was there. How could the server know what's what? I mean, connect is done by user/pass@db, and if "@" is used as a separator...
Try this URL:
http://lap_top:8888/forms90/f90servlet?form=E:\cis355.fmx&userid=scott/tiger@orcl
Regards,
Martin Malmstrom -
Oracle 9i and xmltype, ora-03001
I get this message: 'ora-03001 unimplemented feature' when i
trying to create a table with this statement: create table
purchaseorder(podocument sys.xmltype);
-The user has the following roles:
connect, resource, javauserpriv, query rewrite, create any
directory.
-And execute privilege on xmlparser and xmldom (granted by sys).
-The init.ora file is included with query_rewrite_enabled=true,
query_rewrite_integrity=trusted.
What's wrong?Colleague, I had problem the same that its, also with the postagem of a message here in this forum. I have the successfully installed Oracle 9i EE, after two weeks of very work, in IBM to xServer 220, with SuSE 7.2 This error occurred due to the fact of incorrect parameters of the init.ora, as well as, through some definite parameters incorrectly, in that if it says respect the 0 variable of environment of the ORACLE. One remembers to modify parameter REMOTE_LOGIN... of EXCLUSIVE for NONE and of preference it comments this in its archive INIT.ORA. Of one looked at in check list of installation of the Oracle, as well as in the specific manual of pattern for its distribution for the correct definition of the parameters of its archive of pattern.
-
While using the Old syntax of outer join i encountered Ora-01719 error .
This is quite strange when i used the Old way of using Outer Joins(+), i encountered the Ora-01719 error saying Outer Joins not allowed in Or and IN operator.Whereas when i use the ANSI sql i query gets executed without any error.Any idea what might be the reason..is it that i myself is making mistake.
Please find the select statement below..
SELECT d4.c2, d4.c8, vw_rpt_prod_ln_grp.prod_grp_desc, d4.c10, d4.c5, d4.c3,
CASE
WHEN d4.c6 = 'Closed'
THEN d4.c6
WHEN d4.c6 = 'Closed (w/o Action)'
THEN d4.c6
WHEN d4.c6 =
'Closed, Supporting Process(es) Active'
THEN d4.c6
WHEN d4.c6 = 'Cancelled'
THEN d4.c6
WHEN t3.workflow_compnt_id = 1
THEN 'Definition'
WHEN t3.workflow_compnt_id = 2
THEN 'Root Cause'
WHEN t3.workflow_compnt_id = 3
THEN 'Solution'
WHEN t3.workflow_compnt_id = 4
THEN 'Implementation'
WHEN t3.workflow_compnt_id = 5
THEN 'Feedback'
WHEN t3.workflow_compnt_id = 9
THEN 'Preliminary Root Cause'
WHEN t3.workflow_compnt_id = 2001
THEN 'Report'
WHEN t3.workflow_compnt_id = 2002
THEN 'Sent'
WHEN t3.workflow_compnt_id = 2003
THEN 'Add. Info Needed'
WHEN t3.workflow_compnt_id = 2004
THEN 'Open'
WHEN t3.workflow_compnt_id = 2007
THEN 'Solution Feedback'
END issue_workflow_status,
CASE
WHEN d4.c6 = 'Closed'
THEN 0
WHEN d4.c6 = 'Closed (w/o Action)'
THEN 0
WHEN d4.c6 =
'Closed, Supporting Process(es) Active'
THEN 0
WHEN d4.c6 = 'Cancelled'
THEN 0
ELSE t3.workflow_compnt_id
END issue_workflow_status_code,
d4.c6, d4.c9,
CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END target_date,
CASE
WHEN CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END IS NULL
THEN 'N'
WHEN CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END < TRUNC (CURRENT_DATE)
THEN 'Y'
ELSE 'N'
END step_is_late,
t3.orig_user_full_nm, t3.champ_user_full_nm, t3.champ_org_nm,
vw_rpt_defntn.modl_yr_nbr, vw_rpt_vpps_lvl.level1_vpps_desc,
vw_rpt_vpps_lvl.level2_vpps_desc, vw_rpt_vpps_lvl.level3_vpps_desc,
vw_rpt_vpps_lvl.level4_vpps_desc,
Mv_RPT_CONCAT_ENGN_OPTN_ALL.concat_engn_optn,
vw_rpt_incdnt_src_three_level.level1_incdnt_src_desc,
vw_rpt_incdnt_src_three_level.level2_incdnt_src_desc,
vw_rpt_incdnt_src_three_level.level3_incdnt_src_desc,
vw_rpt_warranty_labr_code.concat_warranty_labr_code_desc, d4.c4, d4.c7,
vw_cust_survey_type.cust_survey_type_desc,
vw_complaint_ctg.complaint_ctg_cd,
vw_prob_main_cause.prob_main_cause_desc, soltn_step.confidence_lvl_id,
d4.c12, d4.c13
FROM (SELECT DISTINCT vw_rpt_issue.project_id c0,
vw_rpt_issue.prts_prod_ln_id c1,
vw_rpt_issue.issue_id c2,
vw_rpt_issue.disply_issue_nbr c3,
vw_rpt_issue.issue_sevrty_cd c4,
vw_rpt_issue.proj_nbr c5,
vw_rpt_issue.issue_status_cd c6,
vw_rpt_issue.primry_metric_score_nbr c7,
vw_rpt_issue.issue_type_cd c8, vw_rpt_issue.title c9,
vw_rpt_issue.prts_prod_ln_desc c10,
vw_rpt_leadtime.issue_id c11,
vw_rpt_leadtime.definition_start_dt c12,
vw_rpt_leadtime.definition_close_dt c13,
vw_rpt_leadtime.root_cause_start_dt c14,
vw_rpt_leadtime.root_cause_close_dt c15,
vw_rpt_leadtime.solution_start_dt c16,
vw_rpt_leadtime.solution_end_dt c17,
vw_rpt_leadtime.implementation_start_dt c18,
vw_rpt_leadtime.implementation_close_dt c19,
vw_rpt_leadtime.feedback_start_dt c20,
vw_rpt_leadtime.feedback_end_dt c21,
vw_rpt_leadtime.prc_start_dt c22,
vw_rpt_leadtime.prc_end_dt c23,
defntn_step.issue_id c24,
defntn_step.workflow_compnt_id c25,
defntn_step.complaint_ctg_id c26,
defntn_step.contnmt_actn_plan_id c27,
defntn_step.direct_run_imprvm_pct c28,
defntn_step.direct_run_loss_pct c29,
defntn_step.drive_type_id c30,
defntn_step.driving_cond_id c31,
defntn_step.eng_pgm_nbr c32,
defntn_step.engn_serial_nbr c33,
defntn_step.envrnmtl_cond_id c34,
defntn_step.ergo_rating_id c35,
defntn_step.evaltn_complt_pct c36,
defntn_step.evaltn_procdr_id c37,
defntn_step.gca_50_or_safety_issue_flag c38,
defntn_step.gca_value_amt c39,
defntn_step.gm_rating_id c40,
defntn_step.hardware_stage_id c41,
defntn_step.incdnt_discvrd_by_nm c42,
defntn_step.incdnt_discvr_dept_nm c43,
defntn_step.incdnt_discvr_ph_nbr c44,
defntn_step.incdnt_first_rptd_dt c45,
defntn_step.incdnt_src_id c46,
defntn_step.intrnl_measmt_info_owner_nm c47,
defntn_step.intrnl_measmt_plt_faclty_id c48,
defntn_step.intrnl_measmt_rpt_dt c49,
defntn_step.issue_clasfn_id c50,
defntn_step.issue_ctg_id c51,
defntn_step.issue_intgrtn_id c52,
defntn_step.modl_yr_id c53,
defntn_step.modl_yr_qtr_id c54,
defntn_step.odmtr_msmt_unit_id c55,
defntn_step.odmtr_rdng_msmt_unit_id c56,
defntn_step.odmtr_rdng_nbr c57,
defntn_step.odmtr_rdng_beginning_nbr c58,
defntn_step.odmtr_rdng_ending_nbr c59,
defntn_step.part_drblty_msmt_unit_id c60,
defntn_step.part_drblty_nbr c61,
defntn_step.part_test_msmt_unit_id c62,
defntn_step.part_test_nbr c63,
defntn_step.pe_me_trial_issue_flag c64,
defntn_step.pim_nbr c65,
defntn_step.plt_asmbly_doc_nbr c66,
defntn_step.productivity_nbr c67,
defntn_step.suspect_parts_avbl_flag c68,
defntn_step.suspect_parts_loc_txt c69,
defntn_step.trnsmn_serial_nbr c70,
defntn_step.veh_ident_nbr c71,
defntn_step.veh_proprt_nbr c72,
defntn_step.veh_test_msmt_unit_id c73,
defntn_step.veh_test_nbr c74,
defntn_step.vpps_id_nbr c75,
defntn_step.wrkstn_id c76,
defntn_step.road_surface_id c77,
defntn_step.cost_redctn_rpt_dt c78,
defntn_step.cost_redctn_trackg_nbr c79,
defntn_step.cost_redctn_type_id c80,
defntn_step.cust_survey_dt c81,
defntn_step.warnty_impct_rpt_dt c82,
defntn_step.field_prod_rpt_nbr c83
FROM (SELECT DISTINCT mv_rpt_issue_all.project_id
project_id,
mv_rpt_issue_all.prts_prod_ln_id
prts_prod_ln_id,
mv_rpt_issue_all.issue_id issue_id,
mv_rpt_issue_all.disply_issue_nbr
disply_issue_nbr,
mv_rpt_issue_all.issue_sevrty_cd
issue_sevrty_cd,
mv_rpt_issue_all.proj_nbr proj_nbr,
mv_rpt_issue_all.issue_status_cd
issue_status_cd,
mv_rpt_issue_all.primry_metric_score_nbr
primry_metric_score_nbr,
mv_rpt_issue_all.issue_type_cd
issue_type_cd,
mv_rpt_issue_all.title title,
mv_rpt_issue_all.prts_prod_ln_desc
prts_prod_ln_desc
FROM mv_rpt_issue_all,
vw_sec_acs_grp_proj acs_grp_proj
WHERE acs_grp_proj.acs_grp_id IN
(1,
4,
42,
43,
44,
51,
52,
53,
54,
266,
366,
386,
526,
546,
547,
548,
566,
846,
946,
966,
1006,
1066,
1087
AND mv_rpt_issue_all.prts_prod_ln_id =
acs_grp_proj.prts_prod_ln_id
AND mv_rpt_issue_all.project_id =
acs_grp_proj.project_id
AND mv_rpt_issue_all.issue_type_cd =
'Current Production') vw_rpt_issue,
vw_rpt_leadtime,
vw_defntn_step defntn_step
WHERE vw_rpt_issue.issue_id = vw_rpt_leadtime.issue_id
AND vw_rpt_issue.issue_id = defntn_step.issue_id) d4,
vw_rpt_incdnt_src_three_level,
vw_rpt_warranty_labr_code,
vw_rpt_prod_ln_grp,
(SELECT t1.issue_id issue_id, t1.workflow_compnt_id workflow_compnt_id,
t1.issue_step_status_cd issue_step_status_cd,
t1.step_target_closed_dt step_target_closed_dt,
t1.step_target_submit_dt step_target_submit_dt,
t1.orig_user_full_nm orig_user_full_nm,
t1.champ_user_full_nm champ_user_full_nm,
t1.champ_org_nm champ_org_nm
FROM prts_syst.vw_rpt_issue_step_dtl_all t1
WHERE t1.current_step_flag = 'Y') t3,
vw_complaint_ctg,
root_cause_step,
vw_prob_main_cause,
Mv_RPT_CONCAT_ENGN_OPTN_ALL,
vw_rpt_vpps_lvl,
soltn_step,
vw_rpt_defntn_all vw_rpt_defntn,
vw_cust_survey_impct_dtl cust_survey_impct_dtl,
vw_cust_survey_type
WHERE d4.c46 = vw_rpt_incdnt_src_three_level.level3_incdnt_src_id(+)
Or d4.c46=vw_rpt_incdnt_src_three_level.level2_incdnt_src_id(+))
And vw_rpt_incdnt_src_three_level.level3_incdnt_src_id IS NULL
AND d4.c2 = vw_rpt_warranty_labr_code.issue_id(+)
AND d4.c1 = vw_rpt_prod_ln_grp.prts_prod_ln_id(+)
AND d4.c2 = t3.issue_id(+)
AND d4.c26 = vw_complaint_ctg.complaint_ctg_id(+)
AND d4.c2 = root_cause_step.issue_id(+)
AND root_cause_step.prob_main_cause_id = vw_prob_main_cause.prob_main_cause_id(+)
AND d4.c2 = Mv_RPT_CONCAT_ENGN_OPTN_ALL.issue_id(+)
AND d4.c75 = vw_rpt_vpps_lvl.vpps_id_nbr(+)
AND d4.c2 = soltn_step.issue_id(+)
AND d4.c2 = vw_rpt_defntn.issue_id(+)
AND d4.c2 = cust_survey_impct_dtl.issue_id(+)
AND cust_survey_impct_dtl.cust_survey_type_id = vw_cust_survey_type.cust_survey_type_id(+)
AND vw_rpt_prod_ln_grp.prod_grp_desc IN
('DB Admin', 'GM - All Vehicles', 'GMAP - DAT', 'GMAP - Holden')
AND d4.c6 IN
('Cancelled',
'Closed',
'Closed (w/o Action)',
'Closed, Supporting Process(es) Active',
'Draft',
'Open'
);Hi,
Maestro_Vineet wrote:
This is quite strange when i used the Old way of using Outer Joins(+), i encountered the Ora-01719 error saying Outer Joins not allowed in Or and IN operator.Whereas when i use the ANSI sql i query gets executed without any error.Any idea what might be the reason..is it that i myself is making mistake.No, I don't think you're making any mistake. Some things are simply not allowed with the "+" outer-join syntax.
There are work-arounds, but they are harder to code and slower to run than simply using ANSI syntax.
I recommend always using ANSI syntax, especially for outer joins. -
ORA-20100: ORA-01116: error in opening database file
Hi -
I'm hitting this error for the first time. Anyone encountered this before? Any suggestions will be very appreciated. Thanks!
141 EXCEPTION
142
143 when others then
144 raise_application_error('-20100',SQLERRM);
145 End;
146 /
20080207
20080312
Declare
ERROR at line 1:
ORA-20100: ORA-01116: error in opening database file
ORA-06512: at line 144Thanks Satish for your reply.
I let the DBA know and he was first suspecting a corrupted data file, but found no errors in the log. So, he was not sure why we got the error.
We just re-ran and it went through fine the next time. strange though...
Maybe you are looking for
-
Firefox after upgrade/restart behaves like crazy...
Hi! When restarting Firefox, tabs are always blank, no tab history, but "normal" browsing history OK. When bookmarking all tabs, this kind of warning appears : Assertion Failed ASSERT: undefined Stack Trace: for every tab that was open. After them a
-
Can anyone help with a very slow iMac?
I'm getting increasingly frustrated by this computer, it takes an age to start up and then the processor makes it's noise for quite some time before allowing me to do anything. Often the beachball is whirling around too. I'm pretty useless when it
-
(HR) 연말정산 작업후 소득자료제출집계표의 과세및 비과세 값을 분석할수 있는 SCRIPT
제품 : HR_PER 작성날짜 : 2006-05-15 (HR) 연말정산 작업후 소득자료제출집계표의 과세및 비과세 값을 분석할수 있는 SCRIPT ================================================== PURPOSE 연말정산 작업후 소득자료제출집계표의 내용을 분석할수 있는 Script Explanation Input값은 "&business_place_id" 입니다. set serveroutput on decla
-
hi all, is there any table related to fields 'material', 'movement type' and 'PO posting date' ? regards saurabh.
-
How to see mail NOT SENT?
i am trying to troubleshoot an issue where i am not sure if mail i write on the phone is getting sent out. is there a way to check for email that was written on the phone but not sent? also, is there a way to change a setting so that i get a confirma