ORA-12060: shape of prebuilt table does not match definition query

Oracle version: 11G Release 2
When Iam trying to create a Materialized view with on prebuilt table syntax I am facing the below issue.
Create table sample_table as select col1,col2,col3 from sample_view;
table created.
Create Materialized view sample_table on prebuilt table refresh complete on demand as
select col1,col2,col3 from sample_view;
I am getting the below exception
Error report:
SQL Error: ORA-12060: shape of prebuilt table does not match definition query
12060. 00000 - "shape of prebuilt table does not match definition query"
*Cause:    The number of columns or the type or the length semantics of a
column in the prebuilt table did not match the materialized
view definition query.
*Action:   Reissue the SQL command using BUILD IMMEDIATE, BUILD DEFERRED, or
ensure that the prebuilt table matches the materialized view
definition query.
How to resolve this issue?

SQL> create table sample_table as
  2  select owner, table_name, tablespace_name
  3  from dba_tables
  4  where rownum < 11;
Table created.
SQL> Create Materialized view sample_table on prebuilt table refresh complete on demand as
  2  select owner, table_name, tablespace_name
  3  from dba_tables;
Materialized view created.What issue?
Which leads me to ask what version of Oracle you have because we don't know.
SELECT *
FROM v$version;

Similar Messages

  • ORA-23327: imported deferred rpc data does not match GLOBAL NAME of ..

    Hi,
    We took an export of a production database in Oracle 9i (9.2.0.7) and created a new database on a test server with Oracle 10g (10.1.0.5)
    The original production database was called DC20 and our new test database is called SD20.
    Looking at the logs after the import we're seeing this error:
    "ORA-23327: imported deferred rpc data does not match GLOBAL NAME of importing db"
    We've looked into it a little and it seems to make sense because the names of the databases are different, and from what we've read, we really didn't need to do a full import including SYSTEM anyway. We also came across a solution telling us:
    "If you are not using Replication on the target database, these errors can be ignored. However, you should subsequently remove all the replication objects by running:
    $ORACLE_HOME/rdbms/admin/catrepr.sql, then catproc.sql"
    What I was wondering was if someone could validate that running these scripts and ignoring the errors will be ok, or if they'll cause us issues further down the line.
    In case its needed, heres my Export parameter file
    "FULL=Y
    DIRECT=Y
    LOG=E:\Exports\DC20\Log\expDC20.LOG
    FILE=E:\Exports\DC20\Data\DC20.DMP"
    and heres my Import parameter file
    "FULL=Y
    COMMIT=Y
    GRANTS=N
    IGNORE=Y
    BUFFER=500000
    FILE=E:\Imports\SD20\data\SD20.dmp
    LOG=E:\imports\SD20\log\impSD20.LOG"
    Thanks for your help!

    Thanks Neil, we did already see this note and added it to our list of possible solutions. After we found this one, we also found the one I quoted, which would seem to be the path of least resistance (it would save a good 10 hours in import time if nothing else).
    However, if we can't do what I'm asking about in my original post however, the note you mentioned will be our next route..

  • Strange behavior with Report Generation Toolkit. Table does not match array.

    We are using a Word 2003 document (.doc) as a template for a report summary.  This works fine on the development PC.  It fills out the appropriate fields in the document and fills out the table correctly, as shown in the image below.
    However, the same cannot be said on another station.  Although the 2D array is identical, and so is the software to investigate the issue, the table does not get populated correctly.  I have investigated using Word 2010 (.docx) as a template, with the same results.
    I have not been able to figure out what is different between the 2 stations and why it does not work on the 2nd station.  I looked for similar issues on the NI website and the only relevant item from Knowledgebase was concerning new lines within the cell, which is not my case.
    This is what I get on the 2nd machine:
    The array that is sent to the table contains the appropriate data&colon;
    Solved!
    Go to Solution.
    Attachments:
    GoodTableWord.png ‏25 KB
    BadTableWord.png ‏18 KB
    BadTableArray.png ‏22 KB

    And, of course the code snippet that was used:
    It is a sample code that was used to investigate the issue.  It works like the original code on the original development PC, but it does not work on the other station...
    Has anyone seen this bizzare behavior?  If so, how does someone solve it?
    Thanks!
    Attachments:
    sampleCode.png ‏60 KB

  • Export table does not match no. of rows

    Tried to export one table from a database and it does not capture all rows. Here's a snapshot from the export and select statement:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    SQL> select count(*) from user1.domain;
    COUNT(*)
    1342
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    C:\exp user1/user1@user1 tables=DOMAIN full=n file=c:\domain.dmp log=c:\domain.log rows=y indexes=n
    Export: Release 10.2.0.3.0 - Production on Fri May 21 10:04:10 2010
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    Note: indexes on tables will not be exported
    About to export specified tables via Conventional Path ...
    . . exporting table ALNDOMAIN 1338 rows exported
    Export terminated successfully without warnings.

    SQL> select count(*) from user1.domain;
    COUNT(*)-- selecting from table user1.domain
    About to export specified tables via Conventional Path ...
    . . exporting table ALNDOMAIN 1338 rows exported-- exporting table ALNDOMAIN
    They seem different tables.
    Try:
    exp user1/user1@user1 tables=user1.domain file=c:\domain.dmp log=c:\domain.log rows=y indexes=nHTH

  • 3D active-x color table does not match color box ctrl values

    I am having a problem. I want to allow the user to control the background color and plot colors on the active-x 3D graph in labview 7.1.1. I am using the standard color box ctrls in labview to allow the user to pick, but the colors do not match. When I pick blue (0,0,255), it comes up red (255,0,0). When I choose yellow (255,255,0), it comes up cyan (0,255,255), and vice-versa. Black and white seems to work correctly, as well as green (0,255,0) being right in the middle. I am assuming this means whatever algorithm NI is using to create the color value is not the same from the labview side to the active-x control side. Anybody else run into this, and have a solution?

    Thanks John.
    Kind of funny, I ran off and built a sub-vi with the exact same guts as the OLE vi, but from looking at what the RGB vi did to break it down.
    I would say though, they need to make a common sub-palette to deal with color issues. They have the same two RGB VIs located in two different spots, and this OLE one is in yet another. I think I would have looked under the Active-X sub-palette before I looked under the 3D graph palette (mainly because those are junk anyway, they barely give you any functionality).
    Anyway, problem solved, thanks again.
    Attachments:
    rgbChannelSwap.vi ‏18 KB

  • Kodo resultset does not match sqlplus query result

    We are attempting to use Kodo's vertical mapping jdo capability to allow
    our application's drop down pick lists tsupport multiple languages.
    With most of the pick lists/ code tables it appears to work properly.
    But with 2 pick lists/ code tables the result sets do retrieved thro
    kodo jdo do not match what happens thru sqlplus.
    Even though the query asks for only English records, Kodo retrieve 1
    record in arabic.
    This does not happen in sqlplus
    We are using Oracle 10.2.1 and Kodo jdo 3.3
    Below is a the kodo trace and sqlplus result
    Thanks!
    ---------------Getting picklist for class: class
    gov.state.pisces.jdo.EntryStatusL language en
    25375 TRACE [javawsApplicationMain] kodo.Query - executing query: select
    from gov.state.pisces.jdo.EntryStatusL where visible == 1 &&
    language.languageCode=='en' order by name ascending
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [15 ms] executing prepstmnt 12406210 SELECT t1.ENTRY_STATUS_ID,
    t0.ID, t1.ENTRY_STATUS_CODE, t1.MODIFICATION_DATE,
    t1.MODIFICATION_USER_ID, t1.OWNER, t1.VISIBLE, t0.LANGUAGE_ID,
    t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID, t0.NAME, t0.OWNER FROM
    COMMON.LANGUAGE t2, TRAVELER.ENTRY_STATUS t1, TRAVELER.ENTRY_STATUS_L t0
    WHERE (t1.VISIBLE = ? AND t2.LANGUAGE_CODE = ?) AND t0.ID =
    t1.ENTRY_STATUS_ID AND t0.LANGUAGE_ID = t2.LANGUAGE_ID ORDER BY t0.NAME
    ASC [params=(int) 1, (String) en] [reused=0]
    Entry Status Lang Id 29
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [0 ms] executing prepstmnt 6628690 SELECT t0.LANGUAGE_CODE,
    t0.LANGUAGE_NAME, t0.LOCAL, t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID,
    t0.OWNER FROM COMMON.LANGUAGE t0 WHERE t0.LANGUAGE_ID = ? [params=(long)
    29] [reused=0]
    Entry Status Lang Code en
    Entry Status Lang Id 29
    Entry Status Lang Code en
    Entry Status Lang Id 6
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [0 ms] executing prepstmnt 6628690 SELECT t0.LANGUAGE_CODE,
    t0.LANGUAGE_NAME, t0.LOCAL, t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID,
    t0.OWNER FROM COMMON.LANGUAGE t0 WHERE t0.LANGUAGE_ID = ? [params=(long)
    6] [reused=1]
    Entry Status Lang Code ar
    WO class gov.state.pisces.jdo.EntryStatusL
    WU 6
    WO ????
    Below is sqlplus results
    oracle@ni2 ~]$ sqlplus p_pw1
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 3 20:09:52 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    P_PW1@pisces > @/tmp/l2
    6
    P_PW1@pisces > r
    1 SELECT
    2 t0.LANGUAGE_ID,
    3 t0.NAME
    4 FROM COMMON.LANGUAGE t2, TRAVELER.ENTRY_STATUS t1,
    TRAVELER.ENTRY_STATUS_L
    t0
    5* WHERE (t1.VISIBLE = 1 AND t2.LANGUAGE_CODE = 'en' ) AND t0.ID =
    t1.ENTRY_ST
    ATUS_ID AND t0.LANGUAGE_ID = t2.LANGUAGE_ID
    LANGUAGE_ID
    NAME
    29
    Arriving
    29
    Departing
    29
    Transit
    P_PW1@pisces >

    Abe White wrote:
    Without understanding your model it's pretty difficult to follow the
    SQL. Do you use application identity? It could be a problem with your
    application identity class. Also, does your base class have a class
    indicator (jdbc-class-ind)? Do you do anything strange like attempt to
    use the same primary key value for multiple records?We are using identity-type of "application". We are not using
    jdbc-class-ind.
    I will stick here wuth the entry_status codess.
    Entry_status is the base and entry_status_l has language specific info
    Entry status has one primary key - Entry_status_id
    Entry_status_l has 2 keys id and language_id
    ( language_id is the primary key to the language table )
    Below are the jdos and the oracle table descriptions
    EntryStatus.jdo
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="gov.state.pisces.jdo">
    <class name="EntryStatus" identity-type="application">
    <extension vendor-name="kodo" key="jdbc-class-ind"
    value="subclass-join"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="state-image"/>
    <field name="entryStatusCode">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="ENTRY_STATUS_CODE"/>
    </extension>
    </field>
    <field name="entryStatusId" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="ENTRY_STATUS_ID"/>
    </extension>
    </field>
    <field name="entryStatusLs">
    <collection element-type="EntryStatusL"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="entryStatus"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo"
    key="ref-column.ENTRY_STATUS_ID" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS_L"/>
    </extension>
    </field>
    <field name="entryStatusName" persistence-modifier="none">
    </field>
    <field name="modificationDate">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_DATE"/>
    </extension>
    </field>
    <field name="modificationUserId">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_USER_ID"/>
    </extension>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="OWNER"/>
    </extension>
    </field>
    <field name="visible">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="VISIBLE"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    EntryStatusl.jdo
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="gov.state.pisces.jdo">
    <class name="EntryStatusL" identity-type="application"
    persistence-capable-superclass="EntryStatus">
    <extension vendor-name="kodo" key="jdbc-class-map" value="vertical">
    <extension vendor-name="kodo"
    key="ref-column.ENTRY_STATUS_ID" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS_L"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="state-image"/>
    <field name="entryStatus">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo"
    key="column.ENTRY_STATUS_ID" value="ID"/>
    </extension>
    </field>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column" value="ID"/>
    </extension>
    </field>
    <field name="language">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo" key="column.LANGUAGE_ID"
    value="LANGUAGE_ID"/>
    </extension>
    </field>
    <field name="languageId" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="LANGUAGE_ID"/>
    </extension>
    </field>
    <field name="modificationDate">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_DATE"/>
    </extension>
    </field>
    <field name="modificationUserId">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_USER_ID"/>
    </extension>
    </field>
    <field name="name">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="NAME"/>
    </extension>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="OWNER"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    descriptions of tables
    PMAN@pisces > desc traveler.entry_status
    Name Null? Type
    ENTRY_STATUS_ID NOT NULL NUMBER(35)
    ENTRY_STATUS_CODE NOT NULL VARCHAR2(3 CHAR)
    LEGACY_NAME VARCHAR2(50 CHAR)
    VISIBLE NOT NULL NUMBER(1)
    MODIFICATION_DATE NOT NULL DATE
    MODIFICATION_USER_ID NOT NULL VARCHAR2(20 CHAR)
    OWNER NOT NULL NUMBER(35)
    PMAN@pisces > desc traveler.entry_status_l
    Name Null? Type
    ID NOT NULL NUMBER(35)
    LANGUAGE_ID NOT NULL NUMBER(35)
    NAME NOT NULL VARCHAR2(255 CHAR)
    MODIFICATION_DATE NOT NULL DATE
    MODIFICATION_USER_ID NOT NULL VARCHAR2(20 CHAR)
    OWNER NOT NULL NUMBER(35)

  • GR/IR account G/L balance does not match with BSIS table

    Hi,
    I am preparing a report which uses table BSIS.But the total in the table does not match with the GR/IR G/L balance account.When I click on balance item display in FS10N the entries match with that of BSIS but the total is different.Also how to factor the year opening balance entries in the report.
    Thanks
    Arun

    But that will slow down the system considerabley, because BSEG contains a huge data

  • Error remote table does not contain a primary key

    I make replication between oracle and Microsoft sql using getway for sql but when I insert to table in oracle I get this error in apply process
    information :
    ASD.SUBHI.COM is database link from oracle to microsoft sql
    "DBO"."REGIONS" name of the table
    CREATE TABLE regions (a INTEGER primary key) command to create table
    error
    ORA-26711: remote table does not contain a primary key constraint ORA-26712: remote object is "DBO"."REGIONS"@"ASD.SUBHI.COM"
    Note: I go to sql server and verify that primary key is creates
    is this the best place to like this question ?
    if you need more details please tell me I need the answer

    I make replication between oracle and Microsoft sql using getway for sql but when I insert to table in oracle I get this error in apply process
    information :
    ASD.SUBHI.COM is database link from oracle to microsoft sql
    "DBO"."REGIONS" name of the table
    CREATE TABLE regions (a INTEGER primary key) command to create table
    error
    ORA-26711: remote table does not contain a primary key constraint ORA-26712: remote object is "DBO"."REGIONS"@"ASD.SUBHI.COM"
    Note: I go to sql server and verify that primary key is creates
    is this the best place to like this question ?
    if you need more details please tell me I need the answer

  • ORA-22160: element at index name does not exist

    hi
    i have a procedure which insert values from a VARRAY type in a table. My question is how can i verify the existence of nth element before inserting to avoid ORA-22160: element at index name does not exist
    Here is my code:
    CREATE OR REPLACE PACKAGE BODY CANDIDE.PE_CL IS
    PROCEDURE p_proc(Id_clt IN P_CLIENT.id_client%TYPE,
    nameClt IN P_CLIENT.nameclient%TYPE,
    --VARRAY type
    priceItem IN price_array,
    --VARRAY type
    nameItem IN item_array) IS
    BEGIN
    INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
    FORALL i IN nameItem.FIRST .. nameItem.LAST
    INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
    END;
    end PE_CL;
    Product version: Oracle9i Enterprise Edition Release 9.2.0.1.0
    Peter

    I see the problem now. If there are more values in one varray or the other, how do you want to handle it? Below I have demonstrated, first the solution that I previous offered, that would only insert the rows where there are values from both varrays. In the second example below, I have inserted a null value in place of the missing value from the varray that has fewer values.
    scott@ORA92> CREATE TABLE p_client
      2    (id_client  NUMBER,
      3       nameclient VARCHAR2(15))
      4  /
    Table created.
    scott@ORA92> CREATE TABLE p_items
      2    (id_client  NUMBER,
      3       name_item  VARCHAR2(10),
      4       price_item NUMBER)
      5  /
    Table created.
    scott@ORA92> CREATE OR REPLACE PACKAGE PE_CL
      2  IS
      3    TYPE item_array IS ARRAY(10) OF VARCHAR2(10);
      4    TYPE price_array IS ARRAY(10) OF number;
      5    PROCEDURE p_proc
      6        (Id_clt    IN P_CLIENT.id_client%TYPE,
      7         nameClt   IN P_CLIENT.nameclient%TYPE,
      8         priceItem IN price_array,
      9         nameItem  IN item_array);
    10  end PE_CL;
    11  /
    Package created.
    scott@ORA92> show errors
    No errors.
    -- first method:
    scott@ORA92> CREATE OR REPLACE PACKAGE BODY PE_CL
      2  IS
      3    PROCEDURE p_proc
      4        (Id_clt    IN P_CLIENT.id_client%TYPE,
      5         nameClt   IN P_CLIENT.nameclient%TYPE,
      6         priceItem IN price_array,
      7         nameItem  IN item_array)
      8    IS
      9    BEGIN
    10        INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
    11  --    FORALL i IN nameItem.FIRST .. nameItem.LAST
    12  --      INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
    13        FOR i IN nameItem.FIRST .. nameItem.LAST LOOP
    14          IF nameItem.EXISTS(i) AND priceItem.EXISTS(i) THEN
    15            INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
    16          END IF;
    17        END LOOP;
    18    END;
    19  end PE_CL;
    20  /
    Package body created.
    scott@ORA92> show errors
    No errors.
    scott@ORA92> declare
      2    priceitem pe_cl.price_array := pe_cl.price_array(2, 5);
      3    nameitem pe_cl.item_array := pe_cl.item_array('item a', 'item b', 'item c');
      4  begin
      5    pe_cl.p_proc
      6        (id_clt    => 900,
      7         nameclt   => 'MIKE',
      8         priceitem => priceitem,
      9         nameitem  => nameitem);
    10    COMMIT;
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT * FROM p_client
      2  /
    ID_CLIENT NAMECLIENT
           900 MIKE
    scott@ORA92> SELECT * FROM p_items
      2  /
    ID_CLIENT NAME_ITEM  PRICE_ITEM
           900 item a              2
           900 item b              5
    scott@ORA92> TRUNCATE TABLE p_client
      2  /
    Table truncated.
    scott@ORA92> TRUNCATE TABLE p_items
      2  /
    Table truncated.
    -- second method:
    scott@ORA92> CREATE OR REPLACE PACKAGE BODY PE_CL
      2  IS
      3    PROCEDURE p_proc
      4        (Id_clt    IN P_CLIENT.id_client%TYPE,
      5         nameClt   IN P_CLIENT.nameclient%TYPE,
      6         priceItem IN price_array,
      7         nameItem  IN item_array)
      8    IS
      9    BEGIN
    10        INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
    11  --    FORALL i IN nameItem.FIRST .. nameItem.LAST
    12  --      INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
    13        FOR i IN nameItem.FIRST .. nameItem.LAST LOOP
    14          IF nameItem.EXISTS(i) AND priceItem.EXISTS(i) THEN
    15            INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
    16          ELSIF nameItem.EXISTS(i) THEN
    17            INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), null);
    18          ELSIF priceItem.EXISTS(i) THEN
    19            INSERT INTO P_ITEMS VALUES (Id_clt, null, priceItem(i));
    20          END IF;
    21        END LOOP;
    22    END;
    23  end PE_CL;
    24  /
    Package body created.
    scott@ORA92> show errors
    No errors.
    scott@ORA92> declare
      2    priceitem pe_cl.price_array := pe_cl.price_array(2, 5);
      3    nameitem pe_cl.item_array := pe_cl.item_array('item a', 'item b', 'item c');
      4  begin
      5    pe_cl.p_proc
      6        (id_clt    => 900,
      7         nameclt   => 'MIKE',
      8         priceitem => priceitem,
      9         nameitem  => nameitem);
    10    COMMIT;
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT * FROM p_client
      2  /
    ID_CLIENT NAMECLIENT
           900 MIKE
    scott@ORA92> SELECT * FROM p_items
      2  /
    ID_CLIENT NAME_ITEM  PRICE_ITEM
           900 item a              2
           900 item b              5
           900 item c

  • ERROR: ORA-01041: internal error. hostdef extension does not exist

    Hi, I got the following error message when I tried to insert a row in table TBL_ORDER.
    ERROR:
    ORA-01041: internal error. hostdef extension does not exist
    INSERT into TBL_ORDER
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    We have Oracle version 8.1.5.o.2 and Linux version 6.1.
    Following are the tables, triggers, loadjava definition and source programs:
    TBL_ORDER
    1 ORDER_MEMBER_FIRM_ID VARCHAR2(4)
    2 ORDER_CLIENT_ID VARCHAR2(4)
    3 ORDER_BRANCH VARCHAR2(3)
    4 ORDER_SEQUENCE VARCHAR2(4)
    5 ORDER_EXCHANGE_ID VARCHAR2(3)
    6 ORDER_EXCHANGE_SEQUENCE VARCHAR2(7)
    7 ORDER_CREATE_DATE DATE
    8 ORDER_TYPE VARCHAR2(2)
    9 ORDER_STATUS VARCHAR2(1)
    10 ORDER_SYMBOL VARCHAR2(5)
    11 ORDER_SUFFIX VARCHAR2(14)
    12 ORDER_SIDE VARCHAR2(5)
    13 ORDER_PRICE VARCHAR2(20)
    14 ORDER_STOP_PRICE VARCHAR2(20)
    15 ORDER_PRICE_QUAL VARCHAR2(10)
    16 ORDER_QUANTITY VARCHAR2(6)
    17 ORDER_TIF VARCHAR2(4)
    18 ORDER_AON VARCHAR2(4)
    19 ORDER_DNR VARCHAR2(4)
    20 ORDER_CASH_NEXT_DAY VARCHAR2(4)
    21 ORDER_SELLER VARCHAR2(4)
    22 ORDER_ACCOUNT_TYPE VARCHAR2(4)
    23 ORDER_OS_TS VARCHAR2(4)
    24 ORDER_BOOTH_ID VARCHAR2(4)
    TBL_CMSOUT
    1 CMSOUT_MEMBER_FIRM_ID VARCHAR2(4)
    2 CMSOUT_CLIENT_ID VARCHAR2(4)
    3 CMSOUT_DATA VARCHAR2(120)
    trg_order.sql
    create or replace procedure OrderToCmsoutProc(cms_member_firm_id VARCHAR2,
    cms_client_id VARCHAR2,
    cms_branch VARCHAR2,
    cms_sequence VARCHAR2,
    cms_side VARCHAR2,
    cms_quantity VARCHAR2,
    cms_symbol VARCHAR2,
    cms_price VARCHAR2,
    cms_tif VARCHAR2,
    cms_type VARCHAR2)
    AUTHID CURRENT_USER
    as language java
    name 'OrderToCmsout.test(java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String)';
    show errors;
    create or replace trigger trg_order
    after insert on TBL_ORDER
    for each row
    CALL OrderToCmsoutProc (:new.order_member_firm_id,
    :new.order_client_id,
    :new.order_branch,
    :new.order_sequence,
    :new.order_side,
    :new.order_quantity,
    :new.order_symbol,
    :new.order_price,
    :new.order_tif,
    :new.order_type)
    commit;
    show errors;
    exit;
    trg_cmsout.sql
    create or replace procedure PackCmsoutSidProc(pck_member_firm_id VARCHAR2,
    pck_client_id VARCHAR2,
    pck_data VARCHAR2)
    AUTHID CURRENT_USER
    as language java
    name 'PackCmsoutSid.test(java.lang.String,
    java.lang.String,
    java.lang.String)';
    show errors;
    create or replace trigger trg_cmsout
    after insert on TBL_CMSOUT
    for each row
    CALL PackCmsoutSidProc (:new.cmsout_member_firm_id,
    :new.cmsout_client_id,
    :new.cmsout_data)
    commit;
    show errors;
    exit;
    loadORDERjava
    loadjava -r -f -o -user userid/pswd OrderToCmsout.java
    loadCMSOUTjava
    loadjava -r -f -o -user userid/pswd PackCmsoutSid.java
    OrderToCmsout.java
    import java.sql.*;
    import java.lang.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    public class OrderToCmsout {
    public static void main(String args[]) {
    try {
    test (args[0],args[1],args[2],args[3],args[4],
    args[5],args[6],args[7],args[8],args[9]);
    catch (Exception e) {
    System.err.println(e);
    } //catch
    } // end main
    public static void test ( String parm_member_firm_id,
    String parm_client_id,
    String parm_branch,
    String parm_sequence,
    String parm_side,
    String parm_quantity,
    String parm_symbol,
    String parm_price,
    String parm_tif,
    String parm_type)
    throws SQLException
    Connection conn = new OracleDriver().defaultConnection();
    PreparedStatement stmt2;
    try {
    stmt2= conn.prepareStatement
    ("INSERT INTO TBL_CMSOUT VALUES (?, ?, ?)");
    String datastring = parm_member_firm_id + "\\~" +
    parm_branch + " " +
    parm_sequence + "\\~" + "\\~" +
    parm_side + "\\~" +
    parm_quantity + " " +
    parm_symbol + " " +
    parm_price + "\\~" +
    parm_tif + " " +
    parm_type + "\\~";
    stmt2.setString(1, parm_member_firm_id);
    stmt2.setString(2, parm_client_id);
    stmt2.setString(3, datastring);
    stmt2.executeUpdate();
    stmt2.close();
    return;
    } //try
    catch (Exception e) {
    System.err.println(e);
    } //catch
    PackCmsoutSid.java
    import java.sql.*;
    import java.lang.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    public class PackCmsoutSid {
    public static void main(String args[]) {
    try { test(args[0],args[1],args[2]);
    catch (Exception e) {
    System.err.println(e);
    } //catch
    } // end main
    public static void test( String parm_member_firm_id,
    String parm_client_id,
    String parm_data)
    throws SQLException
    try {
    Connection conn = new OracleDriver().defaultConnection();
    PreparedStatement stmt1 = conn.prepareStatement
    ("SELECT sid_session_id " +
    "FROM tbl_sid " +
    "WHERE sid_member_firm_id = ? and " +
    "sid_client_id = ?");
    stmt1.setString(1, parm_member_firm_id);
    stmt1.setString(2, parm_client_id);
    ResultSet rs1 = stmt1.executeQuery();
    while (rs1.next ()) {
    String session_id_found = rs1.getString
    ("sid_session_id");
    CallableStatement pack_pipe = conn.prepareCall
    ("{call DBMS_PIPE.PACK_MESSAGE(?)}");
    pack_pipe.setString(1, parm_data);
    pack_pipe.execute();
    CallableStatement send_pipe = conn.prepareCall
    ("{? = call DBMS_PIPE.SEND_MESSAGE(?)}");
    send_pipe.registerOutParameter
    (1, java.sql.Types.INTEGER);
    send_pipe.setString (2, session_id_found);
    send_pipe.execute();
    } //while
    stmt1.close();
    conn.close();
    } //try
    catch (Exception e) {
    System.err.println(e);
    } //catch
    } //test
    } //PackCmsoutSid
    Thanks in advance for your help
    Vinicio

    you should post this question on the Application Server forum.
    --Olaf                                                                                                                                                                                       

  • ORA-04043: object SYS.DELTA$SESSION does not exist

    Dear Friends
    after I import my data by using the follwoing import script :
    IMP JCC/P_MANUF FILE =JCC.DMP FULL
    and at the end give this message import has been imported succesfully without warning
    then when I use this script :
    SQL> SELECT TNAME FROM TAB
    2 WHERE TNAME LIKE 'USER_SESSION'
    3 /
    TNAME
    USER_SESSION
    The table USER_SESSION is exist but when I try to desplay the structure of the USER_SESSION by using this :
    SQL> DESC USER_SESSION
    ERROR:
    ORA-04043: object SYS.DELTA$SESSION does not exist
    and when I try to use the select statment as the following
    SELECT * FROM USER_SESSION
    ERROR at line 1:
    ORA-00980: synonym translation is no longer valid
    Waiting for your valuable answer.
    Best regards
    Jamil Alshaibani

    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> !uname -a
    Linux KAD-VMWARE 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
    SQL> sho user
    USER is "SYS"
    SQL> select object_type,status from dba_objects where object_name = 'K_DRWDWN_GRP' and OWNER = 'SYS';
    no rows selected
    Is any thing wrong with my dictionary? please let me know if i missed anything?
    Edited by: sanora600 on Oct 16, 2010 12:34 AM

  • SQL LOADER and ORA-01861: literal does not match format string

    Hi,
    I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
    as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
    Text file that is generated after loading fails has the following error.
    Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
    ORA-01861: literal does not match format string
    I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
    I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
    I thought that changing its format might solve my problem so i tried this:
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
    Please suggest.
    Thanks alot.
    Best Regads,
    Kam

    Hi,
    It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
    How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
    Sample data to be loaded is :
    1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
    Desc Orders
    O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
    Also not able to understand about POSITION in the control file...?
    Regards,
    Kam

  • SQL Error: ORA-01861: literal does not match format string

    Hello,
    I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,
    create or replace function ssndate(p_date in varchar2 default '03-01-18',
    p_time in varchar2)
    return number
    $if dbms_db_version.ver_le_10 $then
    deterministic
    $elsif dbms_db_version.ver_le_11 $then
    result_cache
    $end
    as
    begin
    return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
    - to_date('01-01-90','dd-mm-yy')) * (86400/2400));
    end ssndate;
    The function ssndate compiled successfully.
    The next step I took was to create a view through the following query,
    create or replace view WEBLOG_VIEWS
    as
    select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
    from WEBLOG;
    This was successful as well. The problem is in the next step where I try to do data grouping.
    create table FINAL_WEBLOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    For this, I got the error,
    Error starting at line 1 in command:
    create table FINAL_LOG as
    select SESSION_DT, C_IP, CS_USER_AGENT,
    listagg(WEB_LINK, ' ')
    within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
    from WEBLOG_VIEWS
    group by C_IP, CS_USER_AGENT, SESSION_DT
    order by SESSION_DT
    Error at Command Line:1 Column:7
    Error report:
    SQL Error: ORA-01861: literal does not match format string
    ORA-06512: at "DMUSER.SSNDATE", line 11
    ORA-06512: at line 1
    01861. 00000 - "literal does not match format string"
    *Cause:    Literals in the input must be the same length as literals in
    the format string (with the exception of leading whitespace).
    If the "FX" modifier has been toggled on, the literal must
    match exactly, with no extra whitespace.
    *Action:   Correct the format string to match the literal.
    I don't know where I'm going wrong with this.. the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively. If anyone has any clue about this I would be sincerely grateful for any help that I can get!! It's quite urgent..
    The Oracle version is 11.2.0.1.0
    Edited by: 975265 on Dec 5, 2012 5:31 PM

    975265 wrote:
    Ok.. Looks like I touched a nerve there. I apologize. I'm still a student, and this is the first time that I've tried something at this level. I'm still in the learning process, so I was hoping that someone could point me in the right direction in order to "fix" the data.Not so much touching a nerve as simply trying to implement a very very poor, but all too common, practice. Since you are a student (which we didn't know until this post) most people will cut you some slack. However, this little exchange should now be burned into your brain as you move forward. One of the very first rules of programming is to ALWAYS use the correct data types for your data. And along with that, never ever depend on implicit type conversions - always use the proper explicit conversion functions.
    And as a slight follow-on, when considering the appropriate data type, don't assume that just because we refer to a given element as a 'something number' that it is indeed a number. Telephone "numbers" are NOT numbers. U.S. Social Security "numbers" are NOT numbers. U.S. Postal Zip codes are NOT numbers. All are just character strings which, by convention, we limit to the same characters we use to represent numbers.
    And since this entire discussion came up around the representation of dates, you might want to take a look at http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/
    Now, go forth and be a smarter programmer than your peers.
    Edited by: EdStevens on Dec 6, 2012 6:12 AM

  • Error: ORA-01861: literal does not match format string

    Hi,
    I am doing a RFC-XI-JDBC scenario.
    In the CC monitoring , i am getting this error for the reciver CC:
    "Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
    Please guide me what can be the cause and how to solve it.
    Thanks,
    Puneet

    This is how my payload looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
    <STATEMENTNAME>
    <TABLE_NAME action="INSERT">
    <TABLE>ggclgis</TABLE>
    <access>
    <VALVE_ID>12584</VALVE_ID>
    <EQUNR>122</EQUNR>
    <ERNAM>12122</ERNAM>
    <INVNR>1212</INVNR>
    <GROES>1212</GROES>
    <ELIEF>123</ELIEF>
    <GWLEN>21-jul-2008</GWLEN>
    <GWLDT>12-jun-2006</GWLDT>
    <SERGE>wqwqw</SERGE>
    <TYPBZ>wqwqwq</TYPBZ>
    </access>
    </TABLE_NAME>
    </STATEMENTNAME>
    </ns1:MT_JDBC_REC>
    Please tell me if it looks fine.

  • ORA-20212: Active audit detail record does not exist

    Hi All,
    While Executing the process flow using Scheduler,we got this error
    "ORA-20212: Active audit detail record does not exist, cannot update audit counts.
    ORA-06512: at "XXOWB.WB_RT_MAPAUDIT", line 2173
    ORA-06512: at "XXOWB.WB_RT_MAPAUDIT", line 3108
    ORA-06512: at "APPS.Test_MAP", line 3304
    ORA-06512: at "APPS.Test__MAP", line 9341
    ORA-06512: at line 1
    I Will test the Mapping my running directly from Control center and then in database.
    Cheers
    Nawneet

    Donot know the exact reason but when check the alert log found the error
    ORA-1653: unable to extend table
    and after allocating space the error was gone..
    Cheers
    Nawneet

Maybe you are looking for