Database adapter - table related by foreign key - not picking

Hi All,
we have a Invoke which picks data from database by using the query feature(not polling) of db adapter.
we are picking data from multiple tables.
there is foreign key relation between tables,which we have defined at the db adapter.
Parent - > child 1
> child 2 > child 3
> child 4 > child 5
So we have a case where parent has 3 rows but children tabls have 3000+.
This error is happening in such cases.
Please let me know.
<2009-08-06 16:58:54,833> <ERROR> <default.collaxa.cube.engine> The execution of this instance "90045" for process "XXSOA_ESP4G_ROUT_ABC_SRC" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information.
<2009-08-06 16:58:54,842> <WARN> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "activity manager": Failed due to unhandled bpel fault.
<2009-08-06 16:58:54,852> <ERROR> <default.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
ORABPEL-02182
JTA transaction is not present or the transaction is not in active state.
The current JTA transaction is not present or it is not in active state when processing activity or instance "90,045". The reason is The execution of this instance "90045" for process "XXSOA_ESP4G_ROUT_ABC_SRC" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information..
Please consult your administrator regarding this error.
     at com.collaxa.cube.engine.CubeEngine.store(CubeEngine.java:5514)
     at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5799)
     at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2086)
     at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:174)
     at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
     at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
     at com.evermind.server.ThreadState.runAs(ThreadState.java:693)
     at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
     at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
     at ActivityManagerBean_LocalProxy_4bin6i8.expireActivity(Unknown Source)
     at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
     at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:141)
     at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
     at java.lang.Thread.run(Thread.java:595)
<2009-08-06 16:58:54,853> <ERROR> <default.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> Not fatal connection error ... not retrying: class com.collaxa.cube.engine.UnhandledFaultException: Failed due to unhandled bpel fault.
<2009-08-06 16:58:54,854> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseDispatchTask::run> Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: JTA transaction is not present or the transaction is not in active state.
The current JTA transaction is not present or it is not in active state when processing activity or instance "90,045". The reason is The execution of this instance "90045" for process "XXSOA_ESP4G_ROUT_ABC_SRC" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information..
Please consult your administrator regarding this error.
ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: JTA transaction is not present or the transaction is not in active state.
The current JTA transaction is not present or it is not in active state when processing activity or instance "90,045". The reason is The execution of this instance "90045" for process "XXSOA_ESP4G_ROUT_ABC_SRC" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information..
Please consult your administrator regarding this error.
     at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:206)
     at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
     at java.lang.Thread.run(Thread.java:595)

Also for above issue , we increased the timeout in transaction manager
transaction-timeout and syncMaxWaitTime properties as follows:
Property     File Location     This Value Must Be...     Example
transaction-timeout     SOA_Oracle_Home\j2ee\home\config\transaction-manager.xml     Larger than the transaction-timeout value in orion-ejb-jar.xml and the syncMaxWaitTime value.     7200
transaction-timeout     SOA_Oracle_Home\j2ee\home\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml     Less than the transaction-timeout value in transaction-manager.xml.
Note: You must set all transaction-timeout properties that display in this file.     3600
syncMaxWaitTime     SOA_Oracle_Home\bpel\domains\domain_name\config\domain.xml
where domain_name is the name of the domain to which you are deploying.     Less than the transaction-timeout value in orion-ejb-jar.xml.     240
2.     
The above refernece was useful in resolcing our issue.
Regards
Arc

Similar Messages

  • Data Modeler 3.0 EA1 - Logical Relation to Foreign Key not generating

    When use "Engineer to Relational Model" the only time it creates foreign keys from my relations is when those relations are of the type many-to-many. I've added a Primary UID for each table and I have tried to use the Apply Naming Standard options but nothing seems to work.
    I tested my design with the design rules feature I have no errors.
    Does anyone have any ideas?
    Greg

    Hi Greg,
    probably you added primary uid after first engineering to relational model. You can check whether those uids are selected in engineering dialog.
    Also you can check log file in datamodeler\datamodeler\log directory for logged problems there.
    Philip

  • BUG: foreign key not altered when on delete is changed

    JDeveloper 10.1.2.0.0
    Problem: create a master/detail relation in the database diagram. Set the foreign key to restrict references. Generate DDL directly in the database to create the tables and FK. Alter the FK to cascade on delete and regenerate the DDL in the database. The FK does not get the cascade delete value.

    Thank you for reporting the problem, I have filed the bug as bug number 4710066.
    Regards,
    Lisa Sherriff
    JDev QA

  • SQL Developer Data Modeler - Relation to Foreign Key Generation

    SQL Developer Data Modeler 2.0.0 Build 584.
    I am having trouble with Relations to Foreign Keys when Forward Engineering a Relational Model from a Logical Model.
    First of all, the Naming Standard is not applied to the Foreign Keys when I perform the Engineer to Relational Model.
    So I right click on the Relational Model from the Browser and Apply Naming Standards to Keys and Constraints.
    I uncheck everything but Foreign Keys.
    Now, Foreign Keys are named according to my Naming Standards.
    However, this process also performs renames on the Column Foreign Keys even though I specifically unchecked that option.
    This appears to be a BUG in the software and I haven't found a way around it.
    I tried using {column} instead of {ref column} in the Naming Standard Template for Column Foreign Key, but that simply resulted in renaming my columns to "{column}".
    Please confirm and/or let me know of any work-around for this.
    Thanks,
    Dan

    Hi Philip,
    Thanks for the reply.
    Is this recorded as a bug to be addressed in the future?
    Should I submit this problem via Oracle Support?
    The other work-around I came up with is to override every Relation name in the Logical Model with the name I want to use in the Relational Model.
    When the Relational Model is Engineered, this becomes my Foreign Key name.
    Of course, this is not how I want to do things, so I am hoping for a bug fix someday.
    Regards,
    Dan

  • How to insert data into two tables linke with foreign key..

    I have two tables
    1)EMP(emp_ID,username,emp_type_code)
    emp_ID is primary key, emp_type_code is a foreign key references emptype table.
    2)emptype(emp_type_code,emp_type_descripton)
    emp_type_code is primary key
    Could anyone help me ..how to insert data into EMP table. How to insert data into two tables linke with foreign key..

    CREATE TABLE "CATDB"."DWDIMUSER"
    "USER_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_ID" NUMBER(10,0),
    "FULLNAME" VARCHAR2(20 BYTE),
    "FNAME" VARCHAR2(20 BYTE),
    "LNAME" VARCHAR2(20 BYTE),
    "USER_SUBTYPE" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMUSER_PK" PRIMARY KEY ("USER_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE,
    CONSTRAINT "DIMUSER_DIMSPECIALTY_FK" FOREIGN KEY ("SPECIALTY_ID") REFERENCES "CATDB"."DWDIMSPECIALTY" ("SPECIALTY_ID") DISABLE
    CREATE TABLE "CATDB"."DIMSPECIALTY"
    "SPECIALTY_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_NAME" VARCHAR2(100 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("SPECIALTY_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    INSERT INTO DIMUSER (FullName, FNAME, LNAME, USER_TYPE, USER_SUBTYPE)
    SELECT DISTINCT
    Engineer AS FullName,
    regexp_substr(Engineer , '[^,| ]+', 1, 1) as FName,
    regexp_substr(Engineer , '[^,| ]+', 1, 2) as LName ,
    'Engineer'
    FROM EMPLOYEELOOKUP;
    INSERT INTO DIMSPECIALTY (SPECIALTY_NAME)
    SELECT DISTINCT SPECIALITY
    FROM EMPLOYEELOOKUP;
    COMMIT;
    CREATE TABLE employeelookup ...IS A TABLE THAT HAS ALL THE DATA NEDED TO BE FILLED IN BOTHE TABLES...
    CREATE TABLE "CATDB"."EMPLOYEELOOKUP"
    "EMPLOYEELOOKUP_ID" NUMBER(10,0) NOT NULL ENABLE,
    "ENGINEER" VARCHAR2(25 BYTE),
    "SPECIALTY" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("EMPLOYEELOOKUP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    DATA IN EMPLOYEELOOKUP
    Engineer, Specialty,
    John, Dow, Electronis,
    Dow, Jons, Technician
    Stan Smithers Sales
    Mark, Richards Marketing
    Jenny, Lane Marketing
    John, Lee Sales
    I NEED TO LOAD THE FOREIGN KEY IN DIMUSER FROM THE DIMSPECIALTY TABLE?
    BY USING THE LOOKUP TABLE TO MARCH THE NAMES UNDER THE Engineer COLUMN, SPECIALTY COLUMNE DISTICTIVLY BY JOINING THE DIMSPECILTY TO RISTIVE THE PRIMARY KEY AND FILL IT IN THE DIMUSER TABLE AS A FOREIGNE KEY.

  • Recreating foreign key not working? two proc one to drop constraint and another to recreate foreign constraint in database?

    CREATE PROC [dbo].[SP_DropForeignKeys] 
    AS
    BEGIN
    DECLARE @FKTABLE_OWNER SYSNAME, @FKTABLE_NAME sysname, @FK_Name sysname
    DECLARE Cursor_DisableForeignKey CURSOR FOR  
    SELECT   schema_name(schema_id), object_name(parent_object_id), name
    FROM   sys.foreign_keys
    OPEN Cursor_DisableForeignKey
    FETCH NEXT FROM   Cursor_DisableForeignKey  
    INTO  @FKTABLE_OWNER  , @FKTABLE_NAME, @FK_Name 
    DECLARE @SQL nvarchar(max)
    WHILE @@FETCH_STATUS = 0   
    BEGIN  
    SET @SQL  = 'ALTER TABLE [' + @FKTABLE_OWNER + '].[' + @FKTABLE_NAME   
               + ']  DROP CONSTRAINT [' + @FK_NAME + ']'  
    select @sql
    EXECUTE (@SQL)
    FETCH NEXT FROM   Cursor_DisableForeignKey INTO @FKTABLE_OWNER, @FKTABLE_NAME, @FK_Name
    END  
    CLOSE Cursor_DisableForeignKey
    DEALLOCATE Cursor_DisableForeignKey
    END
    create proc [dbo].[SP_CreateForeignKeys]
    as
    DECLARE @schema_name sysname;
    DECLARE @table_name sysname;
    DECLARE @constraint_name sysname;
    DECLARE @constraint_object_id int;
    DECLARE @referenced_object_name sysname;
    DECLARE @is_disabled bit;
    DECLARE @is_not_for_replication bit;
    DECLARE @is_not_trusted bit;
    DECLARE @delete_referential_action tinyint;
    DECLARE @update_referential_action tinyint;
    DECLARE @tsql nvarchar(4000);
    DECLARE @tsql2 nvarchar(4000);
    DECLARE @fkCol sysname;
    DECLARE @pkCol sysname;
    DECLARE @col1 bit;
    DECLARE @action char(6);
    SET @action = 'CREATE';
    DECLARE FKcursor CURSOR FOR
        select OBJECT_SCHEMA_NAME(parent_object_id)
             , OBJECT_NAME(parent_object_id), name, OBJECT_NAME(referenced_object_id)
             , object_id
             , is_disabled, is_not_for_replication, is_not_trusted
             , delete_referential_action, update_referential_action
        from sys.foreign_keys
        order by 1,2;
    OPEN FKcursor;
    FETCH NEXT FROM FKcursor INTO @schema_name, @table_name, @constraint_name
        , @referenced_object_name, @constraint_object_id
        , @is_disabled, @is_not_for_replication, @is_not_trusted
        , @delete_referential_action, @update_referential_action;
    WHILE @@FETCH_STATUS = 0
    BEGIN
              BEGIN
            SET @tsql = 'ALTER TABLE '
                      + QUOTENAME(@schema_name) + '.' + QUOTENAME(@table_name)
                      + CASE @is_not_trusted
                            WHEN 0 THEN ' WITH CHECK '
                            ELSE ' WITH NOCHECK '
                        END
                      + ' ADD CONSTRAINT ' + QUOTENAME(@constraint_name)
                      + ' FOREIGN KEY ('
            SET @tsql2 = '';
            DECLARE ColumnCursor CURSOR FOR
                select COL_NAME(fk.parent_object_id, fkc.parent_column_id)
                     , COL_NAME(fk.referenced_object_id, fkc.referenced_column_id)
                from sys.foreign_keys fk
                inner join sys.foreign_key_columns fkc
                on fk.object_id = fkc.constraint_object_id
                where fkc.constraint_object_id = @constraint_object_id
                order by fkc.constraint_column_id;
            OPEN ColumnCursor;
            SET @col1 = 1;
            FETCH NEXT FROM ColumnCursor INTO @fkCol, @pkCol;
            WHILE @@FETCH_STATUS = 0
            BEGIN
                IF (@col1 = 1)
                    SET @col1 = 0
                ELSE
                BEGIN
                    SET @tsql = @tsql + ',';
                    SET @tsql2 = @tsql2 + ',';
                END;
                SET @tsql = @tsql + QUOTENAME(@fkCol);
                SET @tsql2 = @tsql2 + QUOTENAME(@pkCol);
                FETCH NEXT FROM ColumnCursor INTO @fkCol, @pkCol;
            END;
            CLOSE ColumnCursor;
            DEALLOCATE ColumnCursor;
            SET @tsql = @tsql + ' ) REFERENCES ' + QUOTENAME(@schema_name) + '.' + QUOTENAME(@referenced_object_name)
                      + ' (' + @tsql2 + ')';           
            SET @tsql = @tsql
                      + ' ON UPDATE ' + CASE @update_referential_action
                                            WHEN 0 THEN 'NO ACTION '
                                            WHEN 1 THEN 'CASCADE '
                                            WHEN 2 THEN 'SET NULL '
                                            ELSE 'SET DEFAULT '
                                        END
                      + ' ON DELETE ' + CASE @delete_referential_action
                                            WHEN 0 THEN 'NO ACTION '
                                            WHEN 1 THEN 'CASCADE '
                                            WHEN 2 THEN 'SET NULL '
                                            ELSE 'SET DEFAULT '
                                        END
                      + CASE @is_not_for_replication
                            WHEN 1 THEN ' NOT FOR REPLICATION '
                            ELSE ''
                        END
                      + ';';
            END;
        PRINT @tsql;
        IF @action = 'CREATE'
            BEGIN
            SET @tsql = 'ALTER TABLE '
                      + QUOTENAME(@schema_name) + '.' + QUOTENAME(@table_name)
                      + CASE @is_disabled
                            WHEN 0 THEN ' CHECK '
                            ELSE ' NOCHECK '
                        END
                      + 'CONSTRAINT ' + QUOTENAME(@constraint_name)
                      + ';';
            PRINT @tsql;
            END;
        FETCH NEXT FROM FKcursor INTO @schema_name, @table_name, @constraint_name
            , @referenced_object_name, @constraint_object_id
            , @is_disabled, @is_not_for_replication, @is_not_trusted
            , @delete_referential_action, @update_referential_action;
    END;
    CLOSE FKcursor;
    DEALLOCATE FKcursor;
    GO
    exec [dbo].[SP_DropForeignKeys] 
    exec [dbo].[SP_CreateForeignKeys]
    droped proc worked perfect but when i execute [dbo].[SP_CreateForeignKeys] and try to see again foreign key constraints but result is empty?
    can anybody suggest me what's wrong with these script?

    droped proc worked perfect but when i execute [dbo].[SP_CreateForeignKeys] and try to see again foreign key constraints but result is empty?
    Well, if you have dropped the keys, you have dropped them. They can't be recreated out of the blue. You need to use modify procedure to save the ALTER TABLE statements in a temp table, drop the keys, truncate the tables, and the run a cursor over the
    temp table. In a single transaction, so that you don't lose the keys if the server crashes half-way through.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Foreign key not working in a table control set on a pop-up window

    Hi Experts,
    I have created a table control using EEWB on BUPA object. I have moved this table control using BUCO transaction to address view. As the address is displayed in BP transaction as a pop-up window, when the error message from the foreign key verification should raise the pop-up window is closed and nothing happens. What I want is the error doesn,t let the window to be closed and show an error message.  Any suggestion to achieve that?
    Thanks in advance.
    Rosa

    Hi,
    Please check demo program DEMO_DYNPRO_TABLE_CONTROL_2.
    Try to copy to custom program and make the following line changes.
    MODULE CHECK_ALL INPUT.
      CASE OK_SAVE.
        WHEN 'ALLM'.
          LOOP AT ITAB.
    *       IF itab-mark = 'X'.
    *         MESSAGE i888 WITH 'Zeile' sy-tabix 'markiert'.
    *       ENDIF.
            ITAB-MARK = 'X'.
            MODIFY ITAB.
          ENDLOOP.
    Hope this will help ...
    Regards,
    Ferry Lianto

  • Database Adapter using Logical Delete Polling Strategy not updating field

    I have an ESB database adapter defined against a table. The adapter is set to use the Logical Delete Polling Strategy, and the table has an extra column defined as the "delete" field. When I register the adapter to the ESB and add a record to the table, the adapter reads the contents of the record as expected. However, 15 seconds later (that being the polling interval) it reads it again, and again 15 seconds after that, ad infinitum.
    I have defined the logical delete field as a single character field and set the Read value for "T" (a record is normally inserted with that field having a null value). Results as outlined in the previous paragraph. I redefined the field as a number and set the Read value to "1" (with a record normally inserted with that field having a value of "0"). Results as outlined in the previous paragraph.
    Apparently the update of the logical delete value to the Read value is not occurring. My question (obviously) is: Why?
    Thanks for your time.

    Here is the adapter WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="Poll_PM_LOG"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
    schemaLocation="PollPMLOG_table.xsd"/>
    </schema>
    </types>
    <message name="LogCollection_msg">
    <part name="LogCollection" element="top:LogCollection"/>
    </message>
    <portType name="Poll_PM_LOG_ptt">
    <operation name="receive">
    <input message="tns:LogCollection_msg"/>
    </operation>
    </portType>
    <binding name="Poll_PM_LOG_binding" type="tns:Poll_PM_LOG_ptt">
    <pc:inbound_binding/>
    <operation name="receive">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
    DescriptorName="PollPMLOG.Log"
    QueryName="Poll_PM_LOG"
    PollingStrategyName="LogicalDeletePollingStrategy"
    MarkReadFieldName="PROCESSED"
    MarkReadValue="T"
    SequencingFieldName="ID"
    MaxRaiseSize="1"
    MaxTransactionSize="unlimited"
    PollingInterval="15"
    NumberOfThreads="1"
    UseBatchDestroy="false"
    ReturnSingleResultSet="false"
    MappingsMetaDataURL="PollPMLOG_toplink_mappings.xml" />
    <input/>
    </operation>
    </binding>
    <service name="Poll_PM_LOG">
    <port name="Poll_PM_LOG_pt" binding="tns:Poll_PM_LOG_binding">
    <jca:address location="eis/DB/PM"
    UIConnectionName="PM"
    ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
    />
    </port>
    </service>
    <plt:partnerLinkType name="Poll_PM_LOG_plt" >
    <plt:role name="Poll_PM_LOG_role" >
    <plt:portType name="tns:Poll_PM_LOG_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    The field PROCESSED is defined as CHAR(1), and is normally null when a record is inserted. The value of the field is to be set to 'T' when the record is read by the polling adapter.

  • Corrupt dump file, foreign keys not generated on import

    Hi,
    In our refresh job, we get the dump file from production and use it to refresh the schema in UAT.
    The dump file thus we got from production seems to be corrupt - as its giving error - "IMP-00008: unrecognized statement in the export file: "
    But the error we are getting is for few users, while other users are being imported fine. For the users which got imported fine, the foreign keys are missing !!!
    There is no "error" in the import log regarding the foreign keys.
    We tried to get the indexfile and it has all "Create Table" statements, along with indexes, primary key, check constraints etc .... only the FOREIGN KEYS are missing.
    How can this be explained ?
    With Regards,
    Shalini.

    Some suggestions:
    1. Check Note:111384.1 if you are trying to import from the tape directly.
    2. You can set a bigger buffer size and check whether the error reappears.
    3. If you are trying to perform a full import and the error always seemed to be happening when it tried to import the 56th user, you set init.ora parameter license_max_users (which is set to 55) to a bigger value.
    These are apart from the main reason for this error, i.e., corrupted export file or Import internal bug.

  • Two columns in the same table that are foreign keys to the same master key

    i want to create a table let say X, which have two columns that are foreign key that reference the same column in the master table, so does this count as bad database design.

    here is the full ddl for the two table, where in the second table there are two columns that represent the primary key and they are also two foreign keys to the same columns in the master table (items)
    Desc item table;
    Item_id
    Item_name
    Item_price
    Item_quantitiy
    Create table item_recommendation ( item_id varchar(20), recommended_item varchar(20),
    CONSTRAINT recom_primary PRIMARY KEY (item_id, recommended_item),
    CONSTRAINT F1 FOREIGN KEY (item_id) REFERENCES items(item_id), ),
    CONSTRAINT F2 FOREIGN KEY (recommended_item) REFERENCES items(item_id));

  • Creating Column in table or use Foreign Key

    I have a bunch of tables that are year specific, so I need to store the year in the record. I'm not sure if I should create a column in each table called 'year' or create a master 'Year' table and use a foreign key to it in all my other tables. Any advice?
    PK_ID NUMBER Constraint pk1
    PRIMARY KEY
    YEAR VARCHAR2(4)
    --- or----
    PK_ID NUMBER Constraint pk1
    PRIMARY KEY
    FK_YEAR NUMBER Constraint fk_year
    REFERENCES year_table(PK_ID)

    Does your "year" entity have any attributes ?
    Why do you have a year, which to most people seems to be a number, stored as a varchar2(4) ? And what are you going to do about the Y10K problem ?
    How about making the ID of year the numeric value of the year you are storing - then you have eat your cake and have it ;)
    Seriously, though, why do you want a table to say that the year 2008 is the year identified by a meaningless unique number ?
    Regards
    Jonathan Lewis
    http:/jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Nested table as column & foreign key

    Hi,
    I have question - is possible to create foreign key (constraint) which references to element in nested table (for example element named ID)?
    Thanks for replies, Petr

    Also, what is the logic of foreign key constraint not being supported? The following is supposition.
    As far as I know, Oracle have not formally explained why this is not supported. My guess is: it's too hard.
    Quite why it's too hard I don't know but I suspect it is to do with the implementation of NESTED TABLEs. Remember, the actual data for the Nested Table is stored in a separate table - that's why we need the STORE AS clause. Consequently, the nested table already has a foreign key - to join the rows in it to the appropriate rows in the parent table - which is not exposed to us (it uses magic columns).
    This is just another good reason not to use nested tables to store data. Just have a proper child table and then you can build all the reational integrity you like.
    Cheers, APC

  • Query the name of the parent table in a foreign key constraint

    Hello,
    Does anyone know how to query for the parent table name in a foreign key constraint? I don't see that relationship in ALL_CONS_COLUMNS or ALL_CONSTRAINTS.
    Thanks in advance,
    Michael

    or try this...
    SELECT rc.TABLE_NAME "PK_Table_Name",cc.TABLE_NAME "FK_Table_Name",
           case when cc.column_name = rc.column_name
                then c.TABLE_NAME || '(' || cc.COLUMN_NAME || ')'
                else r.TABLE_NAME || '(' || rc.COLUMN_NAME || ') = ' ||c.TABLE_NAME || '(' || cc.COLUMN_NAME || ')' end as "TABLE_NAME(COLUMN_NAME)"
    from all_constraints c,
         all_constraints r,
         all_cons_columns cc,
         all_cons_columns rc
    WHERE
         r.table_name = upper('emp')
    and      c.CONSTRAINT_TYPE = 'R'
    and     c.R_OWNER = r.OWNER
    and     c.R_CONSTRAINT_NAME = r.CONSTRAINT_NAME
    and     c.CONSTRAINT_NAME = cc.CONSTRAINT_NAME
    and     c.OWNER = cc.OWNER
    and     r.CONSTRAINT_NAME = rc.CONSTRAINT_NAME
    and     r.OWNER = rc.OWNER
    and     cc.POSITION = rc.POSITION
    ORDER BY r.TABLE_NAME;

  • Table with n foreign key vs n tables or n foreign key vs 1 table?

    Hi,
    we have a scenario with n tables containing some attributes one table for one category of attribute (es: color, role, type, etc..) of a principal entity and 1 table for the principal entity with n foreign keys vs every attribute table.
    Some propose to create a unique table called attributes in which put every attribute with an attributetype for each record.
    My question is: the principal entity will have n foreign keys vs the same attribute table. Is this perfomant? which is the best solution?
    Thanks in advance.
    v.

    >
    we have a scenario with n tables containing some attributes one table for one category of attribute (es: color, role, type, etc..) of a principal entity and 1 table for the principal entity with n foreign keys vs every attribute table.
    Some propose to create a unique table called attributes in which put every attribute with an attributetype for each record.
    My question is: the principal entity will have n foreign keys vs the same attribute table. Is this perfomant? which is the best solution?
    >
    Ask those 'Some propose' how a foreign key to the 'same attribute table' will prevent the WRONG value from being used for a column.
    1. Principal entity has a column for 'color' and a column for 'role'.
    2. There are FKs on the 'color' column and the 'role' column that both point to the 'same attribute table'
    3. Legal values for 'color' are: 1, 2, 3
    4. Legal values for 'role' are: 10, 20, 30
    What prevents someone from updating the 'color' column to a value of 20?
    Ask those 'Some propose' how your one attribute table will store attributes that are of different datatypes.
    1. 'color' uses numbers: 1, 2, 3
    2. 'type' uses strings: 'type1', 'type2', 'type3'
    3. 'holiday' uses dates: 12/25/2013, 01/01/2014
    How do your 'Some propse' plan to store ALL of those values in one column? They are likely to say they will use VARCHAR2.
    Ok - so how do you keep someone from updating 'holiday' to a value of 'type2' or a value of '3'?
    You can't easily validate the data to begin with and you can't easily prevent 'dirty' data from getting into the system.
    You also can't easily explain to ANYONE, for example new developers, how to properly use and maintain the table.
    I haven't heard you mention even ONE potential benefit to doing things the way that 'Some propose'. So - DON'T DO THAT!

  • Composite primary key as foreign key not working

    i want have two tables
    in one table i make a composite primary key
    and in the other table i refer one of the column of the composite key from the above table as foreign key in this table but this didn't work.
    eg:
    create table temp1
    ( name char2(10),
    ssn# number(10)
    address varchar2(10)
    constraint (cons_1)primary key(name,ssn#) );
    create table temp2
    ( name1 char2(10) references temp1(name),
    add varchar(20));
    this didn't work....can't create temp2 table it's giving error

    The following includes some corrections and some suggestions. Your original code had several problems: missing comma, invalid name, invalid data type, no unique key for the foreign key to reference. The following fixes all of those and adds some meaningful names for the constraints and formats it so that it is easier to read.
    CREATE TABLE temp1
      (name       VARCHAR2 (10),
       ssn#       NUMBER   (10),
       address    VARCHAR2 (10),
       CONSTRAINT temp1_name_ssn#_pk
                  PRIMARY KEY (name, ssn#),
       CONSTRAINT temp1_name_uk
                  UNIQUE (name))
    Table created.
    CREATE TABLE temp2
      (name1      VARCHAR2 (10),
       address    VARCHAR2 (20),
       CONSTRAINT temp2_name1_fk
                  FOREIGN KEY (name1)
                  REFERENCES temp1 (name))
    Table created.

Maybe you are looking for