W_PARTY_D_U1 = ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found.

Hi,
We are implementing OBIA 11.1.1.7.1 which comes with ODI for Fianance and Procurement analytics.When we do full load from EBS the load plan gets failed and it throws the below error
Caused By: java.sql.SQLException: ORA-20000: Error creating Index/Constraint : W_PARTY_D_U1 => ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found.
Please help us to resolve the same.
Thanks
Rama

This might need Patch:10402735
if helps mark

Similar Messages

  • ERROR ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found

    Hi,
    SAPSSRC.log
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195059
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
    Compiled Nov 30 2005 20:41:21
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe -ctf I C:/temp/51030721/EXP2/DATA/SAPSSRC.STR C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/DDLORA.TPL C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.TSK ORA -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job completed
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195059
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195133
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
    Compiled Nov 30 2005 20:41:21
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe -dbcodepage 4103 -i C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.cmd -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log -stop_on_error
    DbSl Trace: ORA-1403 when accessing table SAPUSER
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
    (DB) INFO: ABTREE created #20071018195134
    (IMP) INFO: import of ABTREE completed (39 rows) #20071018195134
    (DB) INFO: ABTREE~0 created #20071018195134
    (DB) INFO: AKB_CHKCONF created #20071018195134
    (IMP) INFO: import of AKB_CHKCONF completed (0 rows) #20071018195134
    (DB) INFO: AKB_CHKCONF~0 created #20071018195134
    (DB) INFO: AKB_INDX created #20071018195134
    (IMP) INFO: import of AKB_INDX completed (0 rows) #20071018195134
    (DB) INFO: AKB_INDX~0 created #20071018195134
    (DB) INFO: AKB_USAGE_INFO created #20071018195134
    (IMP) INFO: import of AKB_USAGE_INFO completed (0 rows) #20071018195134
    (DB) INFO: AKB_USAGE_INFO~0 created #20071018195134
    (DB) INFO: AKB_USAGE_INFO2 created #20071018195134
    (IMP) INFO: import of AKB_USAGE_INFO2 completed (0 rows) #20071018195134
    (DB) INFO: AKB_USAGE_INFO2~0 created #20071018195134
    (DB) INFO: APTREE created #20071018195134
    (IMP) INFO: import of APTREE completed (388 rows) #20071018195134
    (DB) INFO: APTREE~0 created #20071018195134
    (DB) INFO: APTREE~001 created #20071018195134
    (DB) INFO: APTREET created #20071018195134
    (IMP) INFO: import of APTREET completed (272 rows) #20071018195134
    DbSl Trace: Error in exec_immediate()
    DbSl Trace: ORA-1452 occurred when executing SQL statement (parse error offset=35)
    (DB) ERROR: DDL statement failed
    (CREATE UNIQUE INDEX "APTREET~0" ON "APTREET" ( "SPRAS", "ID", "NAME" ) TABLESPACE PSAPBW1 STORAGE (INITIAL 44981 NEXT 0000000040K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) )
    DbSlExecute: rc = 99
    (SQL error 1452)
    error message returned by DbSl:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    (DB) INFO: disconnected from DB
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job finished with 1 error(s)
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195134
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195314
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
    Compiled Nov 30 2005 20:41:21
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe -dbcodepage 4103 -i C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.cmd -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log -stop_on_error
    DbSl Trace: ORA-1403 when accessing table SAPUSER
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
    (DB) ERROR: DDL statement failed
    (DROP INDEX "APTREET~0")
    DbSlExecute: rc = 103
    (SQL error 1418)
    error message returned by DbSl:
    ORA-01418: specified index does not exist
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    DbSl Trace: Error in exec_immediate()
    DbSl Trace: ORA-1452 occurred when executing SQL statement (parse error offset=35)
    (DB) ERROR: DDL statement failed
    (CREATE UNIQUE INDEX "APTREET~0" ON "APTREET" ( "SPRAS", "ID", "NAME" ) TABLESPACE PSAPBW1 STORAGE (INITIAL 44981 NEXT 0000000040K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) )
    DbSlExecute: rc = 99
    (SQL error 1452)
    error message returned by DbSl:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    (DB) INFO: disconnected from DB
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job finished with 1 error(s)
    C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195315
    I'm getting this error "duplicate keys found". I'm finished installing the central instance and during the database instance, i got this error. I'm installing BW 3.5 on x64 windows server 2003 platform. I'm using NU kernel 6.40.
    Thanks for your suggestions on how to resolve this error.
    Reward points guaranteed.

    Issue solved by deleting central and database instance and started a new build. it finished without an error.
    Thank you.

  • Cannot CREATE UNIQUE INDEX; duplicate keys found

    I have 10g when I did an expdp from prod (an AIX 5.3 ) and impdp to a test (a RHEL3 ) with TABLE_EXISTS_ACTION=TRUNCATE, there are some index errors ORA-01452 for some of the tables but not all. As I compared the difference between , The only difference I noticed was that the one with error is the table has data, those tables without error have no data. So how which parameter I can use in impdp to avoid ? read the utility doc, have not found clear picture.
    Chi

    In 11510,
    The duplicate row loaded is person 6272 with effective date 1994 and 1991. This needs to be fixed in vision.
    Workflow SIL_PositionDimension_Full calls mapping SIL_PositionDimension to load target W_POSITION_D from source W_POSITION_DS. W_POSITION_D.INTEGRATION_ID maps to W_POSITION_DS.INTEGRATION_ID, but EFFECTIVE_FROM_DT is a more complicated many to one mapping.
    Extract to W_POSITION_DS ;
    SDE_ORA_PositionDimension_NonEmployee
    - W_POSITION_DS.INTEGRATION_ID from PER_ALL_PEOPLE_F.PERSON_ID
    SDE_ORA_PositionDimension_NoAssignments
    - W_POSITION_DS.INTEGRATION_ID from JTF_RS_RESOURCE_EXTNS_TL RESOURCE_ID
    -- PER~6272,4,01-JAN-94
    -- PER~6272,4,01-JAN-91
    select all t.*
    from
    select all
    count(*) as n
    , t.INTEGRATION_ID
    , t.DATASOURCE_NUM_ID
    , t.EFFECTIVE_FROM_DT
    --, t.*
    from baw.W_POSITION_D t
    group by
    null
    , t.INTEGRATION_ID
    , t.DATASOURCE_NUM_ID
    , t.EFFECTIVE_FROM_DT
    ) t
    where ( ( n > 1 ) )
    ;

  • Error in Executing a Interface -- Index Duplicate Keys

    Hi All,
    I ran my Interface 2 times , it was working fine..... but after that when I ran I got these Error...where I am doing the mistake.............
    KM I used :
    LKM SQL to ORACLE
    IKM ORACLE INCREEMENTAL UPDATE
    CKM ORACLE
    The Step I am getting this Error is : Create Unique Index on Flow Table
    1452 : 72000 : java.sql.SQLException: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    java.sql.SQLException: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    AK
    Message was edited by:
    Ananda

    Hi Anand-
    This is completely data issue, when executing the unique index step it will create unique index with the column name you mentioned.
    When you ran the first two loads there was no duplicate keys found in the data that's why you didn't get the error but the third run you got the problem.
    Check your data records and made changes in the KM as Bouch told if you don't want to create unique index.
    Thanks & Regards,
    Saravanan Rajavel

  • Impdp - duplicate keys found error

    I'm facing a strange issue. I'm running expdp / impdp using datapump. The export of the schema is successful. The import of the schema is raising the below errors for few PKs. I have verified on the source database. There are no duplicate records found and the PK is in enabled state. What is causing for this issue?. I had the similar issue earlier and run the Point-In Time export using FLASHBACK_SCN parameter and the import run smooth. But, the issue this time is the applications are shutdown and there are no connections from the application side and no DML transactions running on the schema. So, I have run the export without FLASHBACK_SCN parameter as we are moving this production database to another. But, the import is raising the below errors. Could someone let me know why it's causing?.
    ORA-39083: Object type INDEX failed to create with error:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    ORA-39083: Object type CONSTRAINT failed to create with error:
    ORA-02437: cannot validate (schema.tab_PK) - primary key violated

    Hi,
    Can you run the impdp commnd with this:
    sqlfile=index.sql include=INDEX
    then look in index.sql to find the index that is failing and try crating it manually. The other thing is to do a query on the target table to see if there are
    duplicate keys on the target. I can't explain why, but I can't imagine why the create index would fail if there were not.
    If you have a network link between the 2 databases maybe you can do a
    select * from target minus select * from source@network_link
    to see if there is anything different.
    Dean
    Edited by: Dean Gagne on Feb 17, 2010 7:37 AM

  • [b]ORA-02299 : duplicate keys found[/b]

    When I create my first CUBE in ORACLE 9.2.0.5 on my windows 2000 server,the cube wizard wrote this error message :
    ORA-02299:cannot validate(JANCO.UK_ON_0CASOVA_ID_DIMENZIA)-duplicate keys found
    I dont know , why cube wizrad wrote "duplicate keys found",because my foreign key between dimension table and fact table was unique.
    My SQL code generated by cube wizard :
    begin cwm_utility.set_object_in_error(null, null, null, null);
    end;
    ALTER TABLE JANCO.DIMENZIA
         ADD(CONSTRAINT UK_ON_0CASOVA_ID_DIMENZIA UNIQUE(ID))
    ALTER TABLE JANCO.PREMENNA
         ADD CONSTRAINT FK_ON_0CASOVA_ID_PREMENNA FOREIGN KEY(ID)
         REFERENCES JANCO.DIMENZIA(ID) RELY DISABLE NOVALIDATE
    declare CASOVA number;
    tmp number;
    begin
    CWM_OLAP_CUBE.Create_Cube('JANCO', 'LANOVKA', 'LANOVKA', '');
    CASOVA := CWM_OLAP_CUBE.Add_Dimension('JANCO', 'LANOVKA', 'JANCO', 'CASOVA', 'CASOVA');
    CWM_OLAP_CUBE.Map_Cube('JANCO', 'LANOVKA', 'JANCO', 'PREMENNA', 'FK_ON_0CASOVA_ID_PREMENNA', 'ID', 'JANCO', 'CASOVA', 'CASOVA');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'DIFERENCIA_TENZOMETROV', 'DIFERENCIA TENZOMETROV', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'DIFERENCIA_TENZOMETROV', 'JANCO', 'PREMENNA', 'DIFERENCIA_TENZOMETROV');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'DOLNA_HRANICA_POLOHY', 'DOLNA HRANICA POLOHY', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'DOLNA_HRANICA_POLOHY', 'JANCO', 'PREMENNA', 'DOLNA_HRANICA_POLOHY');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'HORNA_HRANICA_POLOHY', 'HORNA HRANICA POLOHY', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'HORNA_HRANICA_POLOHY', 'JANCO', 'PREMENNA', 'HORNA_HRANICA_POLOHY');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'LAVY_TENZOMETER', 'LAVY TENZOMETER', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'LAVY_TENZOMETER', 'JANCO', 'PREMENNA', 'LAVY_TENZOMETER');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'PRAVY_TENZOMETER', 'PRAVY TENZOMETER', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'PRAVY_TENZOMETER', 'JANCO', 'PREMENNA', 'PRAVY_TENZOMETER');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'SKUTOCNA_POLOHA', 'SKUTOCNA POLOHA', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'SKUTOCNA_POLOHA', 'JANCO', 'PREMENNA', 'SKUTOCNA_POLOHA');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'TOLERANCIA_POLOHY', 'TOLERANCIA POLOHY', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'TOLERANCIA_POLOHY', 'JANCO', 'PREMENNA', 'TOLERANCIA_POLOHY');
    CWM_OLAP_MEASURE.Create_Measure('JANCO', 'LANOVKA', 'ZIADANA_POLOHA', 'ZIADANA POLOHA', '');
    CWM_OLAP_MEASURE.Set_Column_Map('JANCO', 'LANOVKA', 'ZIADANA_POLOHA', 'JANCO', 'PREMENNA', 'ZIADANA_POLOHA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'DIFERENCIA_TENZOMETROV', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'DOLNA_HRANICA_POLOHY', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'HORNA_HRANICA_POLOHY', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'LAVY_TENZOMETER', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'PRAVY_TENZOMETER', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'SKUTOCNA_POLOHA', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'TOLERANCIA_POLOHY', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('JANCO', 'LANOVKA', 'ZIADANA_POLOHA', tmp, 'JANCO', 'CASOVA', 'CASOVA');
    commit;
    end;
    Please help me :) Thanx very much
    JOHN

    It appears to be a data issue. The ID column in JANCO.DIMENZIA has duplicate values.

  • Create unique index from duplicate rows

    Dear
    I created an index like
    create index tablename_idx on tablename (FIELD1,FIELD2);
    It should be
    create unique index tablename_idx on tablename (FIELD1,FIELD2,filed3);
    How can I delete those duplicate records and create the UNIQUE index ?
    Thanks and regards
    Fahmed

    > How can I delete those duplicate records
    [url http://forums.oracle.com/forums/search.jspa?threadID=&q=delete+duplicate+records&objID=f75&dateRange=all&userID=&numResults=15]http://forums.oracle.com/forums/search.jspa?threadID=&q=delete+duplicate+records&objID=f75&dateRange=all&userID=&numResults=15
    Regards,
    Rob.

  • How to create unique index on a View

    Hi All,
    11.2.0.1
    How do I create an index on a view or any workaround that my view wont get duplicates?
    SQL> create unique index indx01 on db_backup_details_vw(id);
    create unique index indx01 on db_backup_details_vw(id)
    ERROR at line 1:
    ORA-01702: a view is not appropriate here
    Thanks a lot,
    Kinz

    I'm thinking of using a distinct clause here.
    if i get 5 duplicate rows in my selection set because of the join condition, can't i discard the remaining 4 using a distinct clause.
    Observe this
    SQL> select * from a;
    T1 T2
    1 4
    2 4
    3 4
    SQL> select * from b;
    T1 T2
    1 4
    2 5
    in both a,b t1 is the primary key. so we'll write a join on t2 (non PK).
    SQL> select b.t1,b.t2 from a,b where a.t2=b.t2;
    T1 T2
    1 4
    1 4 -- duplicates
    1 4
    Now create view with distinct clause
    create view ab as select distinct b.t1,b.t2 from a,b where a.t2=b.t2;
    SQL> select * from ab;
    T1 T2
    ---------- ---------- -- no duplicates
    1 4
    CSM

  • Streams cannot create an index

    HI All,
         I am currently implementing an Oracle Streams setup to stream a schema from one database to another database. While I have been able to overcome most problems so far, I currently have an issue where the streams apply process cannot create an index in the destination.
         I have effectively disabled VPD on the destination, and granted every privilege I can think of directly to the streams administrator, but still the transaction returns "ORA-00942: table or view does not exist". No other errors are listed - none about prilileges, open cursors or other possible problems
         I have searched Metalink, and found two notes (264477.1 and 276805.1), however neither really describe the problem, nor do their solutions help.
         Environment details are Oracle 11.1.0.7 on Red Hat Enterprise Linux Server release 5.3 (Tikanga)
         I have created a script which summarises attempted solutions, whose output is included below - appologies for the length.
    Thanks in advance for any suggestions
    Gavin
    @ SQL>
    @ SQL> connect / as sysdba
    Connected.
    SYS@TGFLXRD SQL> -- grant sysdba
    SYS@TGFLXRD SQL> grant sysdba to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> -- For VPD
    SYS@TGFLXRD SQL> grant exempt access policy to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> -- Object priv
    SYS@TGFLXRD SQL> -- from Metalink ORA-942 ORA-1000 While Adding a New Table to 10g Streams Replication [ID 264477.1]
    SYS@TGFLXRD SQL> grant dba to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.00
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> grant create any index to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.00
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> column grantee format a15
    SYS@TGFLXRD SQL> column table_name format a25
    SYS@TGFLXRD SQL> column owner format a15
    SYS@TGFLXRD SQL> column grantor format a15
    SYS@TGFLXRD SQL> column privilege format a20
    SYS@TGFLXRD SQL> select *
    2 from dba_tab_privs
    3 where table_name = 'SHIPMENT_STOP_DEBRIEF'
    4 order by grantee, privilege;
    GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT YES NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER REFERENCES NO NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT YES NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE YES NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ALTER NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DEBUG NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER FLASHBACK NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INDEX NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ON COMMIT REFRESH NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER QUERY REWRITE NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER REFERENCES NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ALTER NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DEBUG NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER FLASHBACK NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ON COMMIT REFRESH NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER QUERY REWRITE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    28 rows selected.
    Elapsed: 00:00:00.02
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> connect glogowner/xxxxxx
    Connected.
    GLOGOWNER@TGFLXRD SQL> grant all on SHIPMENT_STOP_DEBRIEF to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    GLOGOWNER@TGFLXRD SQL>
    GLOGOWNER@TGFLXRD SQL>
    GLOGOWNER@TGFLXRD SQL> connect strmadmin/xxxxxx
    Connected.
    STRMADMIN@TGFLXRD SQL> -- ensure object can be seen
    STRMADMIN@TGFLXRD SQL> create or replace synonym SHIPMENT_STOP_DEBRIEF for glogowner.SHIPMENT_STOP_DEBRIEF;
    Synonym created.
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- from Metalink ORA-942 & ORA-1000 from an Apply Process After Adding a New Table to a Streams Environment [ID 276805.1]
    STRMADMIN@TGFLXRD SQL> column privilege format a40
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_NAME HEADING 'Apply Process Name' FORMAT A20
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_CAPTURED HEADING 'Type of Events Applied' FORMAT A15
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_USER HEADING 'Apply User' FORMAT A30
    STRMADMIN@TGFLXRD SQL> SELECT APPLY_NAME,
    2 DECODE(APPLY_CAPTURED,
    3 'YES', 'Captured',
    4 'NO', 'User-Enqueued') APPLY_CAPTURED,
    5 APPLY_USER
    6 FROM DBA_APPLY;
    Apply Process Name Type of Events Apply User
    TGF_APP Captured STRMADMIN
    OTM_APP Captured STRMADMIN
    Elapsed: 00:00:00.00
    STRMADMIN@TGFLXRD SQL> --select * from session_privs order by 1;
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- print_transaction from Oracle doco at
    STRMADMIN@TGFLXRD SQL> -- http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_apmon.htm#CHDFBEFC
    STRMADMIN@TGFLXRD SQL> set serveroutput on
    STRMADMIN@TGFLXRD SQL> exec print_transaction('10.3.2694');
    ---- Local Transaction ID: 10.3.2694
    ---- Source Database: TGFLXD
    ----Error in Message: 1
    ----Error Number: 942
    ----Message Text: ORA-00942: table or view does not exist
    --message: 1
    type name: SYS.LCR$_DDL_RECORD
    source database: TGFLXD
    owner: GLOGOWNER
    object: IX_SSD_ITEM_GID
    is tag null: Y
    ddl: CREATE INDEX GLOGOWNER.IX_SSD_ITEM_GID ON SHIPMENT_STOP_DEBRIEF(ITEM_GID) TABLESPACE INDX
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> CREATE INDEX GLOGOWNER.IX_SSD_ITEM_GID ON SHIPMENT_STOP_DEBRIEF(ITEM_GID) TABLESPACE INDX;
    Index created.
    Elapsed: 00:00:00.02
    STRMADMIN@TGFLXRD SQL> drop index GLOGOWNER.IX_SSD_ITEM_GID;
    Index dropped.
    Elapsed: 00:00:00.05
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- let's try now...
    STRMADMIN@TGFLXRD SQL> desc SHIPMENT_STOP_DEBRIEF
    Name Null? Type
    SHIPMENT_GID NOT NULL VARCHAR2(101)
    STOP_NUM NOT NULL NUMBER(3)
    ACTIVITY NOT NULL VARCHAR2(1)
    SEQUENCE_NO NOT NULL VARCHAR2(10)
    S_SHIP_UNIT_GID VARCHAR2(101)
    S_SHIP_UNIT_LINE_NO NUMBER(10)
    ITEM_PACKAGE_COUNT NUMBER(10)
    PACKAGING_UNIT_GID VARCHAR2(101)
    PACKAGING_UNIT_COUNT NUMBER(10)
    TRANSPORT_HANDLING_UNIT_GID VARCHAR2(101)
    TRANSPORT_HANDLING_UNIT_COUNT NUMBER(10)
    ITEM_GID VARCHAR2(101)
    NON_CONF_REASON_CODE_GID VARCHAR2(101)
    SHIP_UNIT_GID VARCHAR2(101)
    S_EQUIPMENT_GID VARCHAR2(101)
    MATCH_TYPE VARCHAR2(20)
    ORDER_RELEASE_LINE_GID VARCHAR2(101)
    DOMAIN_NAME NOT NULL VARCHAR2(50)
    INSERT_USER NOT NULL VARCHAR2(128)
    INSERT_DATE NOT NULL DATE
    UPDATE_USER VARCHAR2(128)
    UPDATE_DATE DATE
    STRMADMIN@TGFLXRD SQL> select count(*) from SHIPMENT_STOP_DEBRIEF;
    COUNT(*)
    0
    Elapsed: 00:00:00.00
    STRMADMIN@TGFLXRD SQL> select count(*) from glogowner.SHIPMENT_STOP_DEBRIEF;
    COUNT(*)
    0
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> set serveroutput on
    STRMADMIN@TGFLXRD SQL> begin
    2 dbms_apply_adm.execute_error(
    3 local_transaction_id => '10.3.2694',
    4 execute_as_user => false,
    5 user_procedure => null);
    6 end;
    7 /
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_APPLY_ERROR", line 151
    ORA-06512: at "SYS.DBMS_APPLY_ERROR", line 265
    ORA-06512: at "SYS.DBMS_APPLY_ADM", line 467
    ORA-06512: at line 2
    Elapsed: 00:00:00.03
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> connect / as sysdba
    Connected.
    SYS@TGFLXRD SQL> revoke sysdba from strmadmin;
    Revoke succeeded.
    Elapsed: 00:00:00.07
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> spool off
    -------------------------------------------------------------------------------------------------------------

    HI All,
         I am currently implementing an Oracle Streams setup to stream a schema from one database to another database. While I have been able to overcome most problems so far, I currently have an issue where the streams apply process cannot create an index in the destination.
         I have effectively disabled VPD on the destination, and granted every privilege I can think of directly to the streams administrator, but still the transaction returns "ORA-00942: table or view does not exist". No other errors are listed - none about prilileges, open cursors or other possible problems
         I have searched Metalink, and found two notes (264477.1 and 276805.1), however neither really describe the problem, nor do their solutions help.
         Environment details are Oracle 11.1.0.7 on Red Hat Enterprise Linux Server release 5.3 (Tikanga)
         I have created a script which summarises attempted solutions, whose output is included below - appologies for the length.
    Thanks in advance for any suggestions
    Gavin
    @ SQL>
    @ SQL> connect / as sysdba
    Connected.
    SYS@TGFLXRD SQL> -- grant sysdba
    SYS@TGFLXRD SQL> grant sysdba to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> -- For VPD
    SYS@TGFLXRD SQL> grant exempt access policy to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> -- Object priv
    SYS@TGFLXRD SQL> -- from Metalink ORA-942 ORA-1000 While Adding a New Table to 10g Streams Replication [ID 264477.1]
    SYS@TGFLXRD SQL> grant dba to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.00
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> grant create any index to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.00
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> column grantee format a15
    SYS@TGFLXRD SQL> column table_name format a25
    SYS@TGFLXRD SQL> column owner format a15
    SYS@TGFLXRD SQL> column grantor format a15
    SYS@TGFLXRD SQL> column privilege format a20
    SYS@TGFLXRD SQL> select *
    2 from dba_tab_privs
    3 where table_name = 'SHIPMENT_STOP_DEBRIEF'
    4 order by grantee, privilege;
    GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    APP_USER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT YES NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER REFERENCES NO NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT YES NO
    REPORTOWNER GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE YES NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ALTER NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DEBUG NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER FLASHBACK NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INDEX NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ON COMMIT REFRESH NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER QUERY REWRITE NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER REFERENCES NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    STRMADMIN GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ALTER NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DEBUG NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER DELETE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER FLASHBACK NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER INSERT NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER ON COMMIT REFRESH NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER QUERY REWRITE NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER SELECT NO NO
    STRMADMIN_ROLE GLOGOWNER SHIPMENT_STOP_DEBRIEF GLOGOWNER UPDATE NO NO
    28 rows selected.
    Elapsed: 00:00:00.02
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> connect glogowner/xxxxxx
    Connected.
    GLOGOWNER@TGFLXRD SQL> grant all on SHIPMENT_STOP_DEBRIEF to strmadmin;
    Grant succeeded.
    Elapsed: 00:00:00.01
    GLOGOWNER@TGFLXRD SQL>
    GLOGOWNER@TGFLXRD SQL>
    GLOGOWNER@TGFLXRD SQL> connect strmadmin/xxxxxx
    Connected.
    STRMADMIN@TGFLXRD SQL> -- ensure object can be seen
    STRMADMIN@TGFLXRD SQL> create or replace synonym SHIPMENT_STOP_DEBRIEF for glogowner.SHIPMENT_STOP_DEBRIEF;
    Synonym created.
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- from Metalink ORA-942 & ORA-1000 from an Apply Process After Adding a New Table to a Streams Environment [ID 276805.1]
    STRMADMIN@TGFLXRD SQL> column privilege format a40
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_NAME HEADING 'Apply Process Name' FORMAT A20
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_CAPTURED HEADING 'Type of Events Applied' FORMAT A15
    STRMADMIN@TGFLXRD SQL> COLUMN APPLY_USER HEADING 'Apply User' FORMAT A30
    STRMADMIN@TGFLXRD SQL> SELECT APPLY_NAME,
    2 DECODE(APPLY_CAPTURED,
    3 'YES', 'Captured',
    4 'NO', 'User-Enqueued') APPLY_CAPTURED,
    5 APPLY_USER
    6 FROM DBA_APPLY;
    Apply Process Name Type of Events Apply User
    TGF_APP Captured STRMADMIN
    OTM_APP Captured STRMADMIN
    Elapsed: 00:00:00.00
    STRMADMIN@TGFLXRD SQL> --select * from session_privs order by 1;
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- print_transaction from Oracle doco at
    STRMADMIN@TGFLXRD SQL> -- http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_apmon.htm#CHDFBEFC
    STRMADMIN@TGFLXRD SQL> set serveroutput on
    STRMADMIN@TGFLXRD SQL> exec print_transaction('10.3.2694');
    ---- Local Transaction ID: 10.3.2694
    ---- Source Database: TGFLXD
    ----Error in Message: 1
    ----Error Number: 942
    ----Message Text: ORA-00942: table or view does not exist
    --message: 1
    type name: SYS.LCR$_DDL_RECORD
    source database: TGFLXD
    owner: GLOGOWNER
    object: IX_SSD_ITEM_GID
    is tag null: Y
    ddl: CREATE INDEX GLOGOWNER.IX_SSD_ITEM_GID ON SHIPMENT_STOP_DEBRIEF(ITEM_GID) TABLESPACE INDX
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> CREATE INDEX GLOGOWNER.IX_SSD_ITEM_GID ON SHIPMENT_STOP_DEBRIEF(ITEM_GID) TABLESPACE INDX;
    Index created.
    Elapsed: 00:00:00.02
    STRMADMIN@TGFLXRD SQL> drop index GLOGOWNER.IX_SSD_ITEM_GID;
    Index dropped.
    Elapsed: 00:00:00.05
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> -- let's try now...
    STRMADMIN@TGFLXRD SQL> desc SHIPMENT_STOP_DEBRIEF
    Name Null? Type
    SHIPMENT_GID NOT NULL VARCHAR2(101)
    STOP_NUM NOT NULL NUMBER(3)
    ACTIVITY NOT NULL VARCHAR2(1)
    SEQUENCE_NO NOT NULL VARCHAR2(10)
    S_SHIP_UNIT_GID VARCHAR2(101)
    S_SHIP_UNIT_LINE_NO NUMBER(10)
    ITEM_PACKAGE_COUNT NUMBER(10)
    PACKAGING_UNIT_GID VARCHAR2(101)
    PACKAGING_UNIT_COUNT NUMBER(10)
    TRANSPORT_HANDLING_UNIT_GID VARCHAR2(101)
    TRANSPORT_HANDLING_UNIT_COUNT NUMBER(10)
    ITEM_GID VARCHAR2(101)
    NON_CONF_REASON_CODE_GID VARCHAR2(101)
    SHIP_UNIT_GID VARCHAR2(101)
    S_EQUIPMENT_GID VARCHAR2(101)
    MATCH_TYPE VARCHAR2(20)
    ORDER_RELEASE_LINE_GID VARCHAR2(101)
    DOMAIN_NAME NOT NULL VARCHAR2(50)
    INSERT_USER NOT NULL VARCHAR2(128)
    INSERT_DATE NOT NULL DATE
    UPDATE_USER VARCHAR2(128)
    UPDATE_DATE DATE
    STRMADMIN@TGFLXRD SQL> select count(*) from SHIPMENT_STOP_DEBRIEF;
    COUNT(*)
    0
    Elapsed: 00:00:00.00
    STRMADMIN@TGFLXRD SQL> select count(*) from glogowner.SHIPMENT_STOP_DEBRIEF;
    COUNT(*)
    0
    Elapsed: 00:00:00.01
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> set serveroutput on
    STRMADMIN@TGFLXRD SQL> begin
    2 dbms_apply_adm.execute_error(
    3 local_transaction_id => '10.3.2694',
    4 execute_as_user => false,
    5 user_procedure => null);
    6 end;
    7 /
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_APPLY_ERROR", line 151
    ORA-06512: at "SYS.DBMS_APPLY_ERROR", line 265
    ORA-06512: at "SYS.DBMS_APPLY_ADM", line 467
    ORA-06512: at line 2
    Elapsed: 00:00:00.03
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL>
    STRMADMIN@TGFLXRD SQL> connect / as sysdba
    Connected.
    SYS@TGFLXRD SQL> revoke sysdba from strmadmin;
    Revoke succeeded.
    Elapsed: 00:00:00.07
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL>
    SYS@TGFLXRD SQL> spool off
    -------------------------------------------------------------------------------------------------------------

  • ORA-12015:  cannot create a fast refresh materialized view from a complex q

    Hi,
    I'm facing very strange problem. Please help me why this error is coming
    I'm creating a simple materialized view, but it is giving below error since this is simple select * from.
    CREATE MATERIALIZED VIEW EFMS.MS_TASK
    BUILD IMMEDIATE
    REFRESH FAST
    START WITH SYSDATE
    NEXT (SYSDATE + 1/24)
    WITH ROWID
    AS
    SELECT * FROM MS_TASK@efms_link;
    SELECT * FROM MS_TASK@efms_link
    ERROR at line 8:
    ORA-12015: cannot create a fast refresh materialized view from a complex query
    CREATE MATERIALIZED VIEW LOG ON MSDBO.MS_TASK
    TABLESPACE DBOR_MVLOG
    PCTUSED 0
    PCTFREE 60
    INITRANS 20
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOLOGGING
    PARALLEL ( DEGREE 2 INSTANCES 1 )
    WITH ROWID, PRIMARY KEY
    EXCLUDING NEW VALUES;


    Not is a best practice to use 'select *'

    ORA-12015: cannot create a fast refresh materialized view from a complex query
    Cause:      Neither ROWIDs and nor primary key constraints are supported for complex queries.
    Action:      Reissue the command with the REFRESH FORCE or REFRESH COMPLETE option or create a simple materialized view.
    Then you have to change REFRESH FAST or create a primary key in MS_TASK@efms_link to avility fast refresh.
    . :-) any help with my english is wellcome :-) .

  • ORA-12015: cannot create a fast refresh materialized view from a complex

    Hi All,
    I am trying to create materialized view but i got a error ORA-12015: cannot create a fast refresh materialized view from a complex query.
    Regards,
    narayana

    Hi,
    Please see if (Note: 179466.1 - Diagnosing ORA-12015 fast refresh materialized view / complex queries) helps.
    Regards,
    Hussein

  • Create unique index on flow table

    Hi
    I always get this error 'Create unique index on flow table ERROR" while implementing SCD2. Please help me.I have made an Update Key which is a combination of 4 columns that want a new row to be inserted if there is a change in data.One of the above columns is the EMPLOYEE ID,
    My surrogate key is the table's primary key but I have not defined it as a key in mapping and also I have turned off the Primary Key Constraint Option in Controls Panel as NO.
    Where am I wrong? Also please tell me what to take care off while making Natural Key ?

    There are two solutions:
    1. Only use uppercase in the table name
    2. go in Topology>Physical Architecture and edit the technology, then click on
    the "Language" tab and set "Object Delimiter" to empty.
    Thanks,
    Sutirtha

  • Create Unique Index On Flow does not work for table names 23 characters

    I have a "create unique index on flow table" step that is dynamically generated by the IKM.
    The index name that is generated by the IKM is based on the table name except that the created index name is prefixed with "I$_" and ends with "_idx". Obviously, since Oracle table names can not exceed 30 characters in length, the index creation step will fail if the base table name exceeds 23 characters.
    I have tried to substring the index name generation step in the IKM so that it only uses the first 23 characters of the table name, but have not had any luck with using the "substring" command together with snpRef.getTable call.
    This is the section of the IKM that I desire to change:
    - <Field name="Txt" type="java.lang.String">
    - <![CDATA[
    create unique index      <%=snpRef.getTable("L","INT_NAME","W")%>_idx
    on          <%=snpRef.getTable("L","INT_NAME","W")%> (<%=snpRef.getColList("", "[COL_NAME]", ", ", "", "UK")%>)
    <%=snpRef.getUserExit("FLOW_TABLE_OPTIONS")%>
    ]]>
    </Field>
    I would like to change the above to something similar to the following (note the only change is the addition of substring(1,23))
    - <Field name="Txt" type="java.lang.String">
    - <![CDATA[
    create unique index <%=snpRef.getTable("L","INT_NAME","W")*.substring(1,23)*%_idx
    on          <%=snpRef.getTable("L","INT_NAME","W")%> (<%=snpRef.getColList("", "[COL_NAME]", ", ", "", "UK")%>)
    <%=snpRef.getUserExit("FLOW_TABLE_OPTIONS")%>
    ]]>
    </Field>
    Any help greatly appreciated. Thanks.

    As the index is temporary, just like the I$ talbel, the easiest way is to replace the table name with some unique identifier like the session is:
    bq. I$_&lt;%=odiRef.getSession("SESS_NO")%&gt;_idx
    If for some reason that is not unique enough, add the NNO:
    bq. I$_&lt;%=odiRef.getSession("SESS_NO")%&gt;&lt;%=odiRef.getSession("NNO")%&gt; \\ _idx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ORA-02348: cannot create VARRAY column with embedded LOB

    Hi
    This error message I get when I try to create a table from my schema file which has a (sub-) element of type CLOB.
    In my XML document I have an element which needs to become declared a CLOB (because it's > 4000 bytes), in my Schema I define it's element node like:
    <xs:element name="MocovuState" xdb:SQLType="CLOB">
    I can register this Schema file but when I create the table, I get the error:
    ORA-02348: cannot create VARRAY column with embedded LOB
    Does anybody know how to handle this ?
    Marcel

    You need to use the xdb:storeVarrayAsTable="true" schema annotation so that unbounded elements are created at schema registration time as nested tables. Varrays can not contain CLOBs/BLOBS. Use the schema annotation xdb:SQLType="CLOB" to tell Oracle XMLDB to use CLOB storage for the element. See your schema below:
    P.S. XMLSPY is invaluable as it supports Oracle XML Schema annotations.
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="http://www.yourregisteredschemanamespace.com" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="nRootNode">
              <xs:complexType>
                   <xs:all>
                        <xs:element name="nID" type="xs:long"/>
                        <xs:element name="nStringGroup" type="nStringGroup" minOccurs="0"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="nStringGroup">
              <xs:sequence>
                   <xs:element name="nString" type="nString" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="nString" xdb:SQLType="CLOB">
              <xs:sequence>
                   <xs:element name="nValue" type="nValue" minOccurs="0" xdb:SQLType="CLOB"/>
              </xs:sequence>
              <xs:attribute name="id" type="xs:long" use="required"/>
         </xs:complexType>
         <xs:simpleType name="nValue">
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

  • ORA-12913: Cannot create dictionary managed tablespace

    I am using the following statement:
    CREATE TABLESPACE data01
    DATAFILE 'D:\ORACLE\ORADATA\SSR\data01.dbf' SIZE 2M
    EXTENT MANAGEMENT DICTIONARY;
    and I get the following error message:
    ORA-12913: Cannot create dictionary managed tablespace
    If I take off EXTENT MANAGEMENT DICTIONARY, the statement executes. What am I doing wrong?

    Details about create a tablespace:
    CREATE TABLESPACE
    Purpose
    Use the CREATE TABLESPACE statement to create a tablespace, which is an allocation of space in the database that can contain persistent schema objects.
    When you create a tablespace, it is initially a read/write tablespace. You can subsequently use the ALTER TABLESPACE statement to take the tablespace offline or online, add datafiles to it, or make it a read-only tablespace.
    You can also drop a tablespace from the database with the DROP TABLESPACE statement.
    You can use the CREATE TEMPORARY TABLESPACE statement to create tablespaces that contain schema objects only for the duration of a session.
    See Also:
    Oracle9i Database Concepts for information on tablespaces
    ALTER TABLESPACE for information on modifying tablespaces
    DROP TABLESPACE for information on dropping tablespaces
    CREATE TEMPORARY TABLESPACE
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_74a.htm#SQLRF01403
    Joel P�rez

Maybe you are looking for

  • Error when launching web form

    I'm trying to launch forms on the web using Dev Rel 6. When I start the browser and point to my html file, I get the standard "Starting Java..." message and then the error : Applet exception: class oracle.forms.engine.Main could not be loaded I have

  • Component visibility in the screen,

    Hi I'm facing a problem in the visibility of the component. My need is to identify the component is in visibility or not. ex: In a panel, i'm trying to change the location of the label , at a stage the label gets moved to end and the label is not in

  • System preferences icons disappeared!

    My friend has a problem ... several icons from "System Preferences" simply disappeared one day. Now he doesn't have Accounts, Desktop & ScreenSaver and several others! Does anyone have any idea why this happened and how to solve it? Come on guys, he

  • What is the major difference in MM between R/3 and ECC?

    what is the major difference for MM module if any between R/3 and ECC?

  • Inline images in Messages chat Not Showing?

    Ever since I upgraded to Mavericks, and started using Messages over bonjour, images sent to me over chat require me to download them, instead of being able to see them in the chat window itself. Most of the time, the image appears in the messages win