ORA-32031: illegal reference of a query name in WITH clause

Oracle tutorial : http://www.oracle.com/technology/pub/articles/hartley-recursive.html#4
When Executing this Query 6: Using a Recursive WITH Clause
WITH C (CNO, PCNO, CNAME) AS
(SELECT CNO, PCNO, CNAME -- initialization subquery
FROM COURSEX
WHERE CNO = 'C22' -- seed
UNION ALL
SELECT X.CNO, X.PCNO, X.CNAME -- recursive subquery
FROM C, COURSEX X
WHERE C.PCNO = X.CNO)
SELECT CNO, PCNO, CNAME
FROM C;
Error: ORA-32031: illegal reference of a query name in WITH clause
kindly suggest what need to do in case of recursion using subquery

SCOTT@orcl> ed
Wrote file afiedt.buf
  1  with c as
  2  (
  3  select empno,ename from emp
  4  where deptno=20
  5  union all
  6  select c.empno,c.ename from emp c
  7  where c.deptno=30
  8  )
  9* select * from c
SCOTT@orcl> /
     EMPNO ENAME
      7566 xx
      7788 xx
      7876 xx
      7902 xx
      7499 xx
      7521 xx
      7654 xx
      7698 xx
      7844 xx
      7900 xx
10 rows selected.
SCOTT@orcl> ed
Wrote file afiedt.buf
  1  with emp as
  2  (
  3  select empno,ename from emp
  4  where deptno=20
  5  union all
  6  select c.empno,c.ename from emp c
  7  where c.deptno=30
  8  )
  9* select * from emp
SCOTT@orcl> /
select empno,ename from emp
ERROR at line 3:
ORA-32031: illegal reference of a query name in WITH clause
SCOTT@orcl>You can not use the same table name alongwith WITH clause's cursor name. See as above if i says with C as... its works; but if i says with emp as... it returned ora-32031, because it is the name of table.
HTH
Girish Sharma

Similar Messages

  • ORA-32036 unsupported case for inlining of query name in WITH clause

    I have a query with a WITH clause. In the WITH clause I am using the TABLE command to pull multiple records from a PL/SQL function in the FROM clause:
    WITH select_a AS
    (select x.col1,
    x.col2
    from A,
    TABLE(schema1.function1) x
    where ...)
    select ...
    from ...;
    The query is returning 32036 oracle error. Any thoughts on why I get this error? Is it valid to use the TABLE command with a function in the WITH clause?

    Is it valid to use the TABLE command with a function in the WITH clause?Something else must be going on: Even on my old 9i I can use WITH together with TABLE:
    SQL> select * from v$version where rownum = 1
    BANNER                                                         
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    1 row selected.
    SQL> create or replace function f1 (deptno int) return sys.dbms_debug_vc2coll
    as
    begin
    return sys.dbms_debug_vc2coll(deptno);
    end;
    Function created.
    SQL> with t as (
    select dept.* from dept, table (f1(deptno)) where column_value = deptno
    select * from t
        DEPTNO DNAME          LOC         
            10 ACCOUNTING     NEW YORK    
            20 RESEARCH       DALLAS      
            30 SALES          CHICAGO     
            40 OPERATIONS     BOSTON      
    4 rows selected.

  • ORA-20001:Error fetching column value:Query must  begin with SELECT or WITH

    Hi all,
    I have implemented an application with a master-detail form using Apex 3.1.2 and I imported that to Apex 3.2 on different server. Everything else seems to be fine except when I add detail record (clicking on Add Rows), I am getting following error.
    =================
    report error:
    ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH
    ====================
    Both the databases have same version 10gR2. I didn't make any change after importing it as well. Can someone let me know what could be the issue? Thanks in advance.
    SHY

    May we know your first name?
    Can you put the application in your workspace on apex.oracle.com so we can take a look?
    Scott

  • How to get Query Names in webi Report ??

    Hello All,
    I'm trying to pull data from different data sources like accdb,Oracle,DB2,MDB,xls files . I pulled the data successfully by merging all queries.But I was stuck with getting the query names in report ...can some one guide me in this ?? I used data provider () but getting 1 query name along with my universe name.
    thanks in advance,
    Lavanya.

    Hi Lavanya,
    Are you interested to know the data sources of the queries or just the query names?
    To know the Query Name, you can use DataProvider( ) function; however, in case you wish to know the data source, you can use Connection( ) function.
    Regards,
    Yuvraj

  • Avoiding WITH clause when querying Multiple Facts

    OBIEE 10.1.3.4
    We have a report which requires that we query multiple facts, which share the same Item dimension.
    When we run the report, the BI Server generates a query using the WITH clause -
    WITH SAWITH0 ( SELECT.............)
    SAWITH1( SELECT .............)
    SELECT .........
    FROM SAWITH0 FULL OUTER JOIN SAWITH1
    The above query errors out with ORA-918 Column Ambiguously Defined. I cannot find any issue in the query that has been generated.
    The query does fail from SQL Plus with the same ORA error. But each of the select statements executed properly and the complete statement executes when I replace the FULL OUTER JOIN with INNER JOIN.
    I can only assume that this is a bug in Oracle Database.
    Now at times I have seen OBIEE generate separate queries when querying multiple facts and then combine the data together in memory.
    Is there a way that I can force OBIEE to avoid using WITH clause and run separate SELECT statements ? How does the BI Server choose between using a WITH clause or running separate queries ?
    Any help would be appreciated.

    I do not have a multi-dimensional data source.
    My connection pool seems fine to me, I am not sure I need to do anything with the connection pool.
    Hi Turribeach,
    I understand that BI Server uses WITH clause for multiple facts. But I have also seen it issue separate queries against the database.
    So what I am looking to understand under what situation does it issue separate queries i.e. No WITH clause ?
    Thanks

  • WITH CLAUSE: ORA-32034

    Hello,
    I have a query that requires WITH clauses since it reiterates a similar select, so I'm down with 2 WITH clause which I cannot unionize. How can I do this?
    Thanks Pierre
    with DURCDR as (select CALLINGPARTYNUMBER,CALLINGPARTYIMSI,CALLINGPARTYIMEI,CALLEDPARTYNUMBER,CALLEDPAR
    TYIMSI,CALLEDPARTYIMEI,
    CHARGINGSTARTTIME,REDIRECTINGPARTYIMEI,REDIRECTINGPARTYIMSI,REDIRECTINGPARTYNUMB
    ER from bgw_durcdr where CHARGINGSTARTTIME BETWEEN '01-05-2007:00:00:00' and '01-05-2007:23:59:59'
    and (CALLEDPARTYIMEI IN '2980' or CALLINGPARTYIMEI IN '2980' OR REDIRECTINGPARTYIMEI IN '2980'))
    SELECT
    CALLEDPARTYNUMBER,
    CALLEDPARTYIMSI,
    CALLEDPARTYIMEI,
    CHARGINGSTARTTIME
    FROM DURCDR
    UNION
    SELECT
    CALLINGPARTYNUMBER,
    CALLINGPARTYIMSI,
    CALLINGPARTYIMEI,
    CHARGINGSTARTTIME
    FROM DURCDR
    UNION
    SELECT
    REDIRECTINGPARTYIMEI,
    REDIRECTINGPARTYIMSI,
    REDIRECTINGPARTYNUMBER,
    CHARGINGSTARTTIME
    FROM
    DURCDR ==> GET ERROR ORA-32034
    UNION
    WITH EVTCDR AS(select DESTINATION,DESTINATIONIMSI,DESTINATIONIMEI,CHARGINGSTARTTIME,ORIGINIMEI,ORIGINI
    MSI,ORIGIN,REDIRECTINGPA
    RTYIMEI,REDIRECTINGPARTYIMSI,REDIRECTINGPARTYNUMBER FROM BGW_EVTCDR WHERE CHARGINGSTARTTIME BETWEEN '01-05-2007:00:00:00' and '01-05-2007:23:59:59'
    AND( DESTINATIONIMEI IN '2980' OR ORIGINIMEI IN '2980' OR REDIRECTINGPARTYIMEI IN '2980'))
    SELECT
    DESTINATION,
    DESTINATIONIMSI,
    DESTINATIONIMEI,
    CHARGINGSTARTTIME
    FROM EVTCDR
    UNION
    SELECT
    ORIGINIMEI,
    ORIGINIMSI,
    ORIGIN,
    CHARGINGSTARTTIME
    FROM EVTCDR
    UNION
    SELECT
    REDIRECTINGPARTYIMEI,
    REDIRECTINGPARTYIMSI,
    REDIRECTINGPARTYNUMBER,
    CHARGINGSTARTTIME
    FROM EVTCDR;

    (although the example you gave still fails in v10) Really ?
    SQL> select banner from v$version where rownum = 1;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    SQL> with d as (select deptno from emp), 
      2  s as (select deptno from dept) 
      3  select * from d 
      4  union 
      5  select * from s;
        DEPTNO
            10
            20
            30
            40Your example works with subquery which is the separate select statement.
    SQL> with t as (select 1 a from dual)
      2  select * from t where a in (
      3  with x as (select 2 b from dual)
      4  select b from x
      5  )
      6  /
    no rows selected
    SQL> with t as (select 1 a from dual),
      2  x as (select 2 b from dual)
      3  select * from t where a in (
      4  select b from x
      5  )
      6  /
    no rows selectedhttp://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2065646
    Restrictions on Subquery Factoring This clause is subject to the following restrictions:
    You can specify only one subquery_factoring_clause in a single SQL statement. You cannot specify a query_name in its own subquery. However, any query_name defined in the subquery_factoring_clause can be used in any subsequent named query block in the subquery_factoring_clause.
    In a compound query with set operators, you cannot use the query_name for any of the component queries, but you can use the query_name in the FROM clause of any of the component queries.
    Rgds.

  • External table and error: ORA-01036: illegal variable name/number

    using the following script I get the referenced error:
    create table dol_sch_c_part2
    (DLN NUMBER(14) ,
    PAGE_ID VARCHAR2(20),
    PAGE_SEQ VARCHAR2(20),
    PAGE_ROW_NUM VARCHAR2(20),
    ROW_NUM VARCHAR2(20),
    IMAGE_FORM_ID VARCHAR2(20),
    PROVIDER_TERM_01_NAME VARCHAR2(35),
    PROVIDER_TERM_01_EIN VARCHAR2(9) ,
    PROVIDER_TERM_01_POSITION VARCHAR2(25),
    PROVIDER_TERM_01_STR_ADDRESS VARCHAR2(35),
    PROVIDER_TERM_01_CITY VARCHAR2(20),
    PROVIDER_TERM_01_STATE VARCHAR2(2),
    PROVIDER_TERM_01_ZIP_CODE VARCHAR2(9),
    PROVIDER_TERM_01_PHONE_NUM VARCHAR2(10),
    PROVIDER_TERM_01_TEXT VARCHAR2(250)
    ORGANIZATION EXTERNAL
    ( type oracle_loader
    default directory data_dir
    access parameters
    RECORDS FIXED 510
    FIELDS
    DLN(1:14) char(14),
    PAGE_ID(15:34) char(20) NULLIF PAGE_ID=BLANKS,
    PAGE_SEQ(35:54) char(20) NULLIF PAGE_SEQ=BLANKS,
    PAGE_ROW_NUM(55:74) char(20) NULLIF PAGE_ROW_NUM=BLANKS,
    ROW_NUM(75:94) char(20) NULLIF ROW_NUM=BLANKS,
    IMAGE_FORM_ID(95:114) char(20) NULLIF IMAGE_FORM_ID=BLANKS,
    PROVIDER_TERM_01_NAME(115:149) char(35) NULLIF PROVIDER_TERM_01_NAME=BLANKS,
    PROVIDER_TERM_01_EIN(150:158) char(9) NULLIF PROVIDER_TERM_01_EIN=BLANKS,
    PROVIDER_TERM_01_POSITION(159:183) char(25) NULLIF PROVIDER_TERM_01_POSITION=BLANKS,
    PROVIDER_TERM_01_STR_ADDRESS(184:218) char(35) NULLIF PROVIDER_TERM_01_STR_ADDRESS=BLANKS,
    PROVIDER_TERM_01_CITY(219:238) char(20) NULLIF PROVIDER_TERM_01_CITY=BLANKS,
    PROVIDER_TERM_01_STATE(239:240) char(2) NULLIF PROVIDER_TERM_01_STATE=BLANKS,
    PROVIDER_TERM_01_ZIP_CODE(241:249) char(9) NULLIF PROVIDER_TERM_01_ZIP_CODE=BLANKS,
    PROVIDER_TERM_01_PHONE_NUM(250:259) char(10) NULLIF PROVIDER_TERM_01_PHONE_NUM=BLANKS,
    PROVIDER_TERM_01_TEXT(260:509) char(250) NULLIF PROVIDER_TERM_01_TEXT=BLANKS
    location ('f_dol_sch_c_part2.txt')
    I've tried it with and without the char(*) in the fields section - no change
    thanks

    *** SCRIPT START : Session:GLEN_SELF@RAMBO(8) 8/31/2006 12:16:48 PM ***
    Processing ...
    create or replace directory data_dir as 'c:\dol\'
    create table dol_sch_c_part2
    (DLN NUMBER(14) ,
    PAGE_ID VARCHAR2(20),
    PAGE_SEQ VARCHAR2(20),
    PAGE_ROW_NUM VARCHAR2(20),
    ROW_NUM VARCHAR2(20),
    IMAGE_FORM_ID VARCHAR2(20),
    PROVIDER_TERM_01_NAME VARCHAR2(35),
    PROVIDER_TERM_01_EIN VARCHAR2(9),
    PROVIDER_TERM_01_POSITION VARCHAR2(25),
    PROVIDER_TERM_01_STR_ADDRESS VARCHAR2(35),
    PROVIDER_TERM_01_CITY VARCHAR2(20),
    PROVIDER_TERM_01_STATE VARCHAR2(2),
    PROVIDER_TERM_01_ZIP_CODE VARCHAR2(9),
    PROVIDER_TERM_01_PHONE_NUM VARCHAR2(10),
    PROVIDER_TERM_01_TEXT VARCHAR2(250)
    ORGANIZATION EXTERNAL
    ( type oracle_loader
    default directory data_dir
    logfile 'ext_tab.log'
    access parameters
    RECORDS FIXED 510
    FIELDS
    DLN(1:14),
    PAGE_ID(15:34),
    PAGE_SEQ(35:54),
    PAGE_ROW_NUM(55:74),
    ROW_NUM(75:94),
    IMAGE_FORM_ID(95:114),
    PROVIDER_TERM_01_NAME(115:149),
    PROVIDER_TERM_01_EIN(150:158),
    PROVIDER_TERM_01_POSITION(159:183),
    PROVIDER_TERM_01_STR_ADDRESS(184:218),
    PROVIDER_TERM_01_CITY(219:238),
    PROVIDER_TERM_01_STATE(239:240),
    PROVIDER_TERM_01_ZIP_CODE(241:249),
    PROVIDER_TERM_01_PHONE_NUM(250:259),
    PROVIDER_TERM_01_TEXT(260:509)
    location ('f_dol_sch_c_part2.txt')
    create or replace directory data_dir as 'c:\dol\'
    ORA-01036: illegal variable name/number
    *** Script stopped due to error ***
    *** SCRIPT END : Session:GLEN_SELF@RAMBO(8) 8/31/2006 12:16:49 PM ***

  • Oracle 11G and SqlDataSource: 'ORA-01036: illegal variable name/number'

    [Resolved - http://forums.oracle.com/forums/thread.jspa?messageID=2366331&#2366331]
    I've created a short video to explain my problem with Oracle and SqlDataSource. If you'd rather watch than read, go see the video at http://www.kencox.ca/video/oracelandsqldatasource.html.
    I'm trying to do some extremely simple drag and drop development in Visual Web Developer 2008 with the Oracle 11g database and ODP.NET. According to Oracle, "The data provider can be used with the latest .NET Framework 3.5 version. "
    The SELECT statement works fine, but any attempt to use UPDATE via the SQLDataSource UpdateCommand nets me the infamous 'ORA-01036: illegal variable name/number' error.
    I wouldn't mind using one of my MSDN Support Incidents to have Microsoft take a look at this issue, but I'm not sure the problem is Microsoft's. It seems like Oracle is doing a poor job in its Visual Studio integration.
    Question: Has anyone successfully used an UpdateCommand statement in SQLDataSource against Oracle 11g? If so, let me know!
    Below, you see the entire code as generated in Visual Web Developer 2008. To see it in action, check the video at http://www.kencox.ca/video/oracelandsqldatasource.html.
    Ken
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
    DataSourceID="SqlDataSource1"
    EmptyDataText="There are no data records to display.">
    <Columns>
    <asp:CommandField ShowEditButton="True" />
    <asp:BoundField DataField="ACCOUNTID" HeaderText="ACCOUNTID"
    SortExpression="ACCOUNTID" />
    <asp:BoundField DataField="ACCOUNTNAME" HeaderText="ACCOUNTNAME"
    SortExpression="ACCOUNTNAME" />
    <asp:BoundField DataField="ACCOUNTLOCATION" HeaderText="ACCOUNTLOCATION"
    SortExpression="ACCOUNTLOCATION" />
    <asp:BoundField DataField="ACCOUNTPHONE" HeaderText="ACCOUNTPHONE"
    SortExpression="ACCOUNTPHONE" />
    <asp:BoundField DataField="ACCOUNTCONTACT" HeaderText="ACCOUNTCONTACT"
    SortExpression="ACCOUNTCONTACT" />
    <asp:BoundField DataField="ACCOUNTWEBSITE" HeaderText="ACCOUNTWEBSITE"
    SortExpression="ACCOUNTWEBSITE" />
    </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
    ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>"
    SelectCommand="SELECT "ACCOUNTID", "ACCOUNTNAME", "ACCOUNTLOCATION", "ACCOUNTPHONE", "ACCOUNTCONTACT", "ACCOUNTWEBSITE" FROM "ACCOUNTS""
    UpdateCommand="UPDATE ACCOUNTS SET ACCOUNTLOCATION = 'This Place' WHERE (ACCOUNTID = 4)">
    </asp:SqlDataSource>
    </div>
    </form>
    </body>
    </html>//////////using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    Message was edited by:
    kjopc

    Ken,
    One thing to be aware of is Microsoft has produced Visual Studio database tools and data provider for Oracle. In addition, Oracle has produced its own tools. Knowing which products you are using is important because you want to know which company you should be complaining about. :-)
    In your video, you are using all Microsoft tools and data provider, not Oracle's.
    I would recommend using Oracle Developer Tools (ODT) for VS and ODP.NET since these products are much better integrated with .NET and Oracle.
    ODP.NET uses Oracle.DataAccess.Client namespace. System.Data.OracleClient belongs to the MS provider for Oracle, which Mark pointed out. If you drag and drop DB objects using ODT, it will generate ODP.NET code for you (and give you more data source wizard options as well).
    You can download the latest 11g version of ODP.NET and ODT here:
    http://www.oracle.com/technology/software/tech/windows/odpnet/index.html
    These support .NET 3.5 and VS 2008.

  • ORA-01741: illegal zero-length identifier

    Hi Friends,
    I am facing a weird situation while creating a report with region having type as SQL Query(PL/SQL function body returning SQL Query).
    I have a package function which takes 4 parameters and returns a SQL query in a varchar2 variable.
    Now when I have the following code in my region source and on applying changes is showing ORA-01741: illegal zero-length identifier
    DECLARE
    l_query VARCHAR2 (5000);
    BEGIN
    SELECT apx_dashboard_pkg.f_int_monthly_grid (:p5_1, :p5_2, :p5_3, :p5_4)
    INTO l_query
    FROM DUAL;
    RETURN l_query;
    END;
    If I change my code as below by passing values and run, then it does the job perfect.
    DECLARE
    l_query VARCHAR2 (5000);
    BEGIN
    SELECT apx_dashboard_pkg.f_int_monthly_grid(200712,
    'IC',
    3,
    'AVARO'
    INTO l_query
    FROM DUAL;
    RETURN l_query;
    END;
    I have no clue where I am doing wrong.
    Please help me.
    Thanks,
    Raj.

    Thanks guys for your responses.
    Varad,
    I have tried with 'Generic Column Names' and it worked wonderfully.
    Scott,
    I would definitely consider your point because it might be the reason for erroring out in some of my pages in the application.
    Thanks a lot.

  • [Oracle][ODBC][Ora]ORA-24801: illegal parameter value in OCI lob function

    Hi,
    I am trying to insert an xml doc into a column of Oracle table which has a datatype CLOB in JSP. PFB my code that I am using --
    int id = 100;
    String st1 = "NEW";
    String st2 = "WLR3_IN_1";
    Date dt = new SimpleDateFormat("mm/dd/yyyy").parse("04/02/2008");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:CST Server","xmluser","xmluser");
    String query = "INSERT INTO SEQ_API_MESSAGE_IN(SEQ_NO,MESSAGE_TEXT,STATUS,DIALECT,CREATED_TS) VALUES(?,?,?,?,?)";
    out.println(6);
    String fn = "C:/order.xml";
    out.println(7);
    PreparedStatement stmt = con.prepareStatement(query);
    out.println(8);
    File file = new File(fn);
    out.println(9);
    FileReader inputFileReader = new FileReader(file);
    stmt.setInt(1,id);
    stmt.setCharacterStream(2,inputFileReader, (long)file.length());
    stmt.setString(3,st1);
    stmt.setString(4,st2);
    stmt.setDate(5,new java.sql.Date(dt.getTime()));
    out.println(10);
    if (stmt.executeUpdate() != 1) {
    System.out.println("No record inserted.");
    But I am getting an output in the form of an Oracle error - 5 6 7 8 9 10 [Oracle][ODBC][Ora]ORA-24801: illegal parameter value in OCI lob function
    So all the statements are getting executed after which this Oracle error is thrown. Could you help me with this.
    Thanks in anticipation.. :)

    As suggested I may try switching to JDBC instead of JDBC-ODBC bridge driver , but I also tried doing this to get the sysdate --
    //Date dt = new SimpleDateFormat("mm/dd/yyyy").parse("04/02/2008");
    String date = DateFormat.getInstance().format(new Date());
    stmt.setString(5,date);
    and now I am getting this error -- 5 6 7 8 9 10 [Oracle][ODBC][Ora]ORA-01843: not a valid month Hello1
    Hello1 is coming from --
    catch (SQLException sqle){
    out.println(sqle.getMessage());
    out.print("Hello1");
    }

  • ORA-12801: error signaled in parallel query server P000

    Hello All,
    Week before one of the APPLY process ABORTED with following error:
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    We are using ORACLE 10.2.0.4.0 on HP unix B.11.23
    For now, I have started the APPLY process again and it's working properly.
    When I looked into the trace file it shows following
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 10:53:57.897
    A001: warning -- apply server 1, sid 302 waiting on user sid 267 for event (since 302 seconds):
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 10:58:58.792
    A001: warning -- apply server 1, sid 302 waiting on user sid 267 for event (since 603 seconds):
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 12:14:36.679
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:19:36.961
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 300 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:24:37.417
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 600 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:29:37.906
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 901 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:34:37.428
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 1201 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-19 11:26:44.601
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:31:43.753
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 300 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:36:44.149
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 600 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:41:43.775
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 900 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-23 16:55:24.002
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-06-29 09:48:58.166
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-07-01 06:02:37.236
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-07-01 11:46:43.672
    error 12801 in STREAMS process
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    OPIRIP: Uncaught error 447. Error stack:
    ORA-00447: fatal error in background process
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    Can you please help to provide details on that how i can fix this problem permanetely.
    Any suggestions would be great!
    Thanks,
    Nick

    It seems that you are using Oracle database and not Berkeley Database.
    To fix ORA-04031 errors on streams pool, you need to increase streams pool size with
    alter system set streams_pool_size=<the right value>;See recommandations in http://download.oracle.com/docs/cd/B19306_01/server.102/b14229/strms_mprep.htm#i1006278

  • Urgent, ORA-12801: error signaled in parallel query server P000

    Hi Guys,
    I am using Oracle 9i Enterprise Edition Release 9.2.0.1.0 with Windows 2000 Server.
    I have just upgrade my database from 8i to 9i. I am facing this problem in a lot of queries in my application after upgrade. I tried to searched out but unable to find the reason yet.
    Is there any parameter which i should /should not use? Or need to change any parameter.
    Oracle Error Occured: ORA-12801: error signaled in parallel query server P000
    Thanks in advance.
    Brgs,
    Hassan

    Well, the error stack should be displayed along with the 12801 error.
    If not, look the comment for the error I posted above: use event 10397 to display the actual error.ALTER SESSION SET EVENTS '10397 trace name context forever, level 1'; and if the error raises, then you'll get the source message, not the PQ message.
    See note 21281.1 on Metalink.
    Regards,
    Yoann.

  • ORA-12154: TNS:Could not resolve service name. (WIS 10901).

    HI Gurus, we have the following scenario...
    Weu2019ve installed Busines Objects EDGE 3.1 SP3.
    The server of this installation is MS Windows Server 2003 Enterprise Edition SP2, Intel ® Xeon Enterprise TM CPU 2.80 GHz 6.5 RAM.
    In the Server we have SAP R/3 Installed over a DB Oracle 9i Enterprise Edition Release 9.2.8.0.
    We installed all BO bundle with successful and we can use the Designer Tool for create universe. In the creation of the universe, we created a connection to the database of the SAP R/3 System and the test runs well, we save and export the universe to CMS. Then, we used that universe in the WebI tool of the suite installed in the server, and it runs well (we call the universe, selected fields of the table, and after run the query, it gives us registers of the DB).
    After all this, we open the InfoView and used the WebI and execute the same universe and the same steps. And when we execute the query the following error occurs .
    A database error occured. The database error text is: ORA-12154: TNS:Could not resolve service name. (WIS 10901)
    The connection to DB is through Designer and we use ODBC Oracle to create the Universe with the Client type and we used super user system, validated previously OK.
    Any suggestion for this error?.
    Thanks.
    Betto.
    Edited by: Alberto Magaña Chávez on Jul 9, 2011 7:44 PM

    Make sure there are no syntax errors in the TNSNAMES.ORA file, look for unmatched parentheses. Also check the SQLNET.ORA file.
    Is the environment is clustered, if so then make sure you have the ODBC connection in all the servers.

  • Dynamic query name

    Hello,
    I sure home someone can help me with this.
    I am trying to run dynamic loops and am stumped with how to
    call a variable name.
    As you can see, calling the variable names just isnt going to
    work out the way I am trying to do this. Can someone steer me in
    the correct direction?
    thanks,
    Matt

    quote:
    fyrehed wrote:
    I pulled out a ton of code, trying to simplify
    That's appreciated. But it was not obvious that the omission
    was deliberate and truthfully your code sample is confusing because
    few of the variables and query names match up.
    For example, you're storing a list of the ID's from the
    "getnums" query here
    ........<cfset leaguelist=valuelist(getnums.id)>
    Then you're looping through a 2nd query named "GetInfo".
    Where does that query come from?
    ........<cfloop query="Getinfo">
    Inside the loop the code references a 3rd query named
    "getLeagues"
    ........<cfquery datasource="#my.dsn#"
    name="get#getLeagues.id#">
    Then a 4th query is used in the where clause
    ........Where leagueID='#Getinums.leagueid#'
    So its unclear how many you have and which ones you're
    actually using. Honestly, the cfloops seem like an over
    complication. Unless you have another reason for using them, you
    could probably do the same thing more simply by using one cfquery
    with a JOIN and <cfoutput> with "group". That said, one
    problem that jumps out at me is here
    quote:
    <cfloop from"1" to="#listlen(leaguelist)#" index="i">
    <table>
    <cfloop query="get#i#">
    <cfif get#i# currentrow mod 2 eq 0>
    The queries were named using #getLeagues.id#. So you must use
    the
    id value, not the list index #i#. Also, you don't need to
    use the query name inside your query loop.
    <cfloop list="#leagueList#" index="currentID">
    <table>
    <cfoutput query="get#currentID#">
    <cfif currentrow mod 2 eq 0>

  • PLS-00329: schema-level type has illegal reference to

    I am trying to create a PL/SQL Package which needs a table type which needs to be defined at schema level. The type refers to a table across another schema.
    I am getting an error as below when I try to create the Type. What is wrong?
    My DBA provided me reference access which I see in the dba_tab_privs table as below. Is there some other privilege which is still missing please help.
    READ SCOTT ORDERLINES SCOTT REFERENCES YES NO
    CREATE TYPE type_tab is TABLE of scott.orderlines%ROWTYPE;
    Warning: Type created with compilation errors.
    show errors;
    Errors for TYPE TEST_TAB:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    1/32 PLS-00329: schema-level type has illegal reference to
    BAAN.TTDSLS401100

    Thanks Jens. The reason I was trying to do this was as per somebody's suggestion to correct invalid datatype error I was getting in my package body.
    Could you let me know then why I am getting the following error in my package body below. Help would be much appreciated.
    57/22 PL/SQL: SQL Statement ignored
    57/60 PL/SQL: ORA-00902: invalid datatype
    The error is in the line open p_recordset for select * from TABLE(CAST(tbl_order as typ_tab));
    CREATE OR REPLACE type myTableType as table of varchar2(20000);
    CREATE OR REPLACE PACKAGE TEST_PROC_PKG
    IS
    TYPE cursor_type IS REF CURSOR;
    TYPE typ_rec IS RECORD (
    ord scott.orderlines.T$orno%TYPE,
    pono scott.orderlines.T$pono%TYPE,
    cpva scott.orderlines.T$cpva%TYPE
    rec_ord typ_rec;
    TYPE typ_tab is TABLE of typ_rec
    INDEX BY BINARY_INTEGER;
    tbl_order typ_tab;
    FUNCTION in_list(p_string IN varchar2) return myTableType;
    PROCEDURE TEST_PROC(p_orno IN VARCHAR2, p_recordset OUT cursor_type);
    END;
    CREATE OR REPLACE PACKAGE BODY TEST_PROC_PKG
    IS
    FUNCTION in_list(p_string IN varchar2) return myTableType
    IS
    l_string long default p_string || ',';
    l_data myTableType := myTableType();
    n number;
    BEGIN
    LOOP
    EXIT WHEN l_string is null;
    n := instr( l_string, ',' );
    l_data.extend;
    l_data(l_data.count) :=
    ltrim( rtrim( substr( l_string, 1, n-1 ) ) );
    l_string := substr( l_string, n+1 );
    END LOOP;
    return l_data;
    END in_list;
    PROCEDURE TEST_PROC(p_orno IN VARCHAR2, p_recordset OUT cursor_type)
    IS
    TYPE type_curvar IS REF CURSOR;
    cur_order type_curvar;
    i NUMBER := 1;
    BEGIN
    OPEN cur_order FOR select T$orno, T$pono, T$cpva
    from scott.orderlines
    where T$orno in ( select *
         from THE ( select cast( in_list(p_orno)
    as mytableType ) from dual ) );
    LOOP
    FETCH cur_order INTO rec_ord;
    EXIT WHEN cur_order%NOTFOUND;
    tbl_order(i).cpva := rec_ord.pono + rec_ord.cpva;
    tbl_order(i).ord := rec_ord.ord;
    tbl_order(i).pono := rec_ord.pono;
    DBMS_OUTPUT.PUT_LINE(tbl_order(i).cpva);
    i := i + 1;
    END LOOP;
    CLOSE cur_order;
    open p_recordset for select * from TABLE(CAST(tbl_order as typ_tab));
    EXCEPTION
    WHEN OTHERS THEN
    open p_recordset FOR select T$orno, T$pono, T$cpva
    from scott.orderlines
    where T$orno = ' ';
    END TEST_PROC;
    END;

Maybe you are looking for

  • Multiple Apple TVs with one iTunes Library

    I have searched this subject and found one thread that touches on the topic. It says that I should be able to "connect" five Apple TVs to my single iTunes library. I have on original Apple TV that connects to my iTunes library just fine. I just purch

  • [FB:Mobile]Delete item form s:list

    Is possible to delete an item in s: list, moving your finger on as usual in the iPhone?

  • Restricting purchase requisition specific to WBS

    Hi All, My requirement is as follows: I have a material say M1, assigned to network activities in 3 projects. Now when I am procuring M1 in Project 1 system should not allow to link WBS/Network as account assignment in Purchase Requisition for that p

  • CRM surveys IDs

    Hello Experts, We are working on a new user requeriment that asks to create activities with survey linked to them. The survey will be done by an external third party, so we'll be receiving one external file with all the customer's answers of each que

  • Hi. I can't open an e-book I've bought. The error message is E_LIC_ALREADY_FULFILLED_BY_ANOTHER_USER

    Hi. I can't open an e-book I've bought. first I've  managed to open it but without log-in ( Ihad forgotten my password), but, as i didn't manage to download the e-book on my e-reader, i've log-in, and tried to re-open it and the, it didn't open.The e