ODI is recovering not Unique key constraint

I created a table with script below and reverse engineering it.

create table test
(primary_id number,
 unique_not_null_ID number not null,
  col3 number,
 col4 varchar2(200),
 col5 varchar2(2000),
primary key (primary_id),
unique (unique_not_null_ID) 
)

But all looking in the constraint of the data store only the primary key is here

Also, within the quick edit tab Interface is show

(1) Primary_id: = UK and CN of check

(2) Unique_not_null_id: = CN is the Coachman


So, why there no Unique constraint picked up?


I think then it will only mark it too fast Edition.

Hi spear,

Please note that during standard reverse engineering unique keys are not reverse engineering. Then you need to either do reverse engineering on measurement or add a unique touch to the ODI level.

https://docs.Oracle.com/CD/E28280_01/integrate.1111/e12643/create_rev_model.htm#ODIDG225

Tags: Business Intelligence

Similar Questions

  • Disable the unique key constraint

    Hello

    Is it possible to disable a unique key constraint?
    I tried the following code:

    ALTER TABLE table_name
    DISABLE the CONSTRAINT uk_constraint_name

    that seems to work fine, but when I try to insert or update a record that the unique constraint is still on. However, Toad in the United Kingdom is marked as disabled.

    What do I need to drop the UK and re-create it after my updates?

    Thank you

    The behavior that I have demonstrated that during
    a. you have an existing UNIQUE Index
    b. you add a Unique key constraint (with the same or another name, any - except that the error message contains the name of the index is different, if the constraint is disabled)

    OTOH, if you set the Unique key on the table without pre-existing index constraint, Oracle creates an Index. If you disable this constraint, Oracle removes the Index.
    So, if it is a small table and you can afford to recreate the Index each time, you can follow this method.

    SQL> create table t_2 (col_1 number, col_2 varchar2(5));
    
    Table created.
    
    SQL> alter table t_2 add constraint t_2_uk unique (col_1);
    
    Table altered.
    
    SQL> select index_name, uniqueness, status from user_indexes where table_name = 'T_2';
    
    INDEX_NAME                     UNIQUENES STATUS
    ------------------------------ --------- --------
    T_2_UK                         UNIQUE    VALID
    
    SQL> insert into t_2 values (1,'a');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> alter table t_2 disable constraint t_2_uk;
    
    Table altered.
    
    SQL> insert into t_2 values (1,'b');
    
    1 row created.
    
    SQL> select index_name, uniqueness, status from user_indexes where table_name = 'T_2';
    
    no rows selected
    
    SQL>SQL> select constraint_name, constraint_type, status from user_constraints where table_name = 'T_2';
    
    CONSTRAINT_NAME                C STATUS
    ------------------------------ - --------
    T_2_UK                         U DISABLED
    
    SQL> alter table t_2 enable constraint t_2_uk;
    alter table t_2 enable constraint t_2_uk
    *
    ERROR at line 1:
    ORA-02299: cannot validate (AWRADMIN.T_2_UK) - duplicate keys found
    
    SQL> delete t_2 where col_2 = 'b';
    
    1 row deleted.
    
    SQL> alter table t_2 enable constraint t_2_uk;
    
    Table altered.
    
    SQL> select index_name, uniqueness, status from user_indexes where table_name = 'T_2';
    
    INDEX_NAME                     UNIQUENES STATUS
    ------------------------------ --------- --------
    T_2_UK                         UNIQUE    VALID
    
    SQL>
    

    Hemant K Collette

  • Unique key violation - the DB adapter

    Hello

    I have a composite SOA (deployed in clusters of 4 nodes) who questions database and calls a stored procedure (which invokes the records in multiple tables). Now, when I'll be large amount of data in the source database, the composite is mark and tries to insert the records in the target database. But sometimes error cases dating violation of unique key constraint while inserting records into the target database.

    Is locks of adapter DB table before inserting the records so that others may not violate the constraints and they will be able to see changes made by other SOA forums?

    Thank you!

    Yes, certainly not DbAdapter... the problem is the way you do your check and the lack of a facility of mutex in BPEL... Assuming you are using BPEL...

    Ideal scenario...

    1 check key has... There is no instance

    example 1 - insert the key... was ok

    example 2 - check button has exist......

    instance 2 - updates of key has... ok

    Parallel scenario...

    1 check key has... There is no instance

    2 check key has... There is no instance

    example 1 - insert the key... was ok

    example 2 - Insert key a... failure... duplicate a key...

    Hope you get what I'm trying to show here... There is nothing there to prevent another instance to check the existence of the key even before the first instance commits the transaction that inserted the key...

    BPEL is not a mutex AFAIK... something like the statement "synchronized" in Java for example...

    https://docs.Oracle.com/javase/tutorial/essential/concurrency/locksync.html

    Thus, you must use a different approach, for example, try and introduce first always, if the insertion fails try and update... It's 'thread safe' than the approach that you use...

    Much better is to is to abandon controls at all and always insert using the key substitution, such as sequences or guid... If you insert an Oracle database, simply use a sequence, or use the function generate GUIDs BPEL...

    https://en.Wikipedia.org/wiki/Surrogate_key

    See you soon,.

    Vlad

  • How to associate an index with a foreign key constraint

    I understand how to associate a primary key constraint or a Unique key constraint index...
    Yet I don't see how to associate the index of a foreign key constraint. Is this possible?

    Thank you
    Bob Larsen

    Hi Bob,

    In Data Modeler, physical model for Oracle primary and unique keys dialog boxes offer an Index field using, which is used to generate the 'using_index_clause' in the DDL for primary and Unique key constraints.
    However the Oracle Database DDL does not have the "using_index_clause" for Foreign Key constraints, thus Data Modeler does not provide this feature for foreign keys.

    So, you will need to create a separate Index that uses the same columns as the foreign key (using the index page of the table properties dialog box in the relational model).

    David

  • Is this a BUG?  Export of data besides the foreign key constraints

    I use SQL Developer 1.5.4 with patches installed 59,47 and 59,59. I want to do an export of database from a scheme of 10 g XE and include all objects in the DOF resulting. So I select ALL the checkboxes in the Export Wizard and when I get to step 3 to specify the objects, I don't see any of my constraints in the list box... not foreign key constraints, without constraints of primary key, without check constraints, nothing. Is this a bug, or is there a workaround, or which could possibly hurt? We want to be able to use the database export function to easily transport and track the changes to our entire schema using source control compares.

    Any help or suggestions replacement would be apprieciated.

    Thank you
    Matt

    Bug 8679318 follows this question

  • Short ODI IKM Unique key error

    Hello

    I am trying to load data in and short 3.1 datadomain through the IKM ODI of short downloaded from delivery. I use ODI 11.1.1.1.7 with IKM SQL for short for 3.1. I managed to solve the problem all the way until step 9 of the dataload

    Here are the steps to get that:

    Step 1-4 Drop, Create, load, Analyze table work

    6 - integration - context properties of loading RecordWriter

    7 initialize Logger

    8 validate Options

    9 initialize short schema (ERROR)

    Above step 9 errors with:

    org.apache.bsf.BSFException: exception of Jython:

    Traceback (most recent call changed):

    File "< string >", line 57, < module >

    File '< string >", line 15, in throwException

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

    at org.python.core.PyReflectedConstructor.constructProxy(PyReflectedConstructor.java:163)

    java.lang.Exception: java.lang.Exception: there is no unique key in the schema

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)

    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine (SnpScripting


    I'm sure I'm missing something and I can't find it in the documentation. Help, please.


    Thanks in advance.

    This cased by you did not indicate the unique key in your column of your data store in the models.

    1 extend the data store in the models.

    2. expand the attributes

    3. double-click on the PK column you want

    4. click on the Flexfields

    5 uncheck "short property is Unique.

    Or you do not want to set a short Server Unique key and let the server automatically generate the PK.

    You can open your interface and in the configuration of IKM together the value of 'AUTO_GENERATE_RECORSPEC' is true.

  • After the upgrade of Windows Windows 7 10, could not recover my product key.

    Original title: windows 7

    After the upgrade to windows 10 windows 7, could not recover my product key. When I connect my system am get notification that you may be victim of software counterfeiting and copy of windows is not genuine. you do me too much this error code. 0xC004F057. Please help me to recover my product key. my windows does not work after the upgrade as well.

    I suggest that you run the diagnostic tool Microsoft Genuine Advantage in normal mode and copy and paste the results into a response for further analysis:

    http://go.Microsoft.com/fwlink/?LinkId=52012

    Run the tool and when it ends, click the copy button, open a text such as Word or Notepad file and select Edit, paste. You can paste directly into an answer here. Open a response, right click and select Paste.

  • Foreign key constraint, not recognized during the synchronization of data with the model dictionary

    Hello

    Data Modeler is a foreign key constraints do not recognize when synchronizing data with the model dictionary, although the foreign key is there (in the database that a data dictionary is read). I can't find any criterion when a foreign key is not recognized by the Data Modeler. Are there limits to the length of the attribute, or the number of columns in a foreign key, or other limitations which may lead to this behavior not to recognize a fk by Data Modeler? I have columns more than 32 characters. I compared with the fk is recognized by DM, but I can't find anything that indicates why it is not recognized.

    I wonder if someone also has constraints of foreign keys that are not recognized in the comparison of data bases and model?

    Thank you

    Robert

    Hi Robert,.

    Thanks for the comments, I logged a bug.

    Philippe

  • Primary key and unique key not Null

    Hello gurus,

    Asked in an interview about the difference between primary and unique keys.
    I talked Unique keys can accept null values, but they are unique through should have the table. So, the next question asked me was "a Unique key NOT NULL can be treated as the primary key?

    Tricky question! :)
    I said yes! that it meets the requirement to be a primary key for this particular table, but since this isn't really a primary key, that it can't be covered in the foreign keys.

    The interviewer wanted just a Yes or no.

    Can someone please put some of this?

    Thanks in advance!

    Two things.
    1. unique can also be referenced as a foreign key. If your statement "but because this isn't really a primary key may not be seized key foreign." is not true.
    2. primary key and Unique key are different (for example you can have more than one UK in a table but PK's alone) and to know the difference, read some RDBMS concepts.

    I'm curious to know what is the outcome of your interview? ;)

  • Why we cannot create more than one primary key on a table. Why we create several unique key on a table. Please explain if anyone have details of this.

    Why we cannot create more than one primary key on a table. Why we create several unique key on a table. Please explain if anyone have details of this.

    «a primary key has semantic meaning, it is to be immutable (never change of value), unique and not null.»

    a unique constraint is simply "at any time, these values are unique - they can change and they can be null.

    You use a unique when constraint

    (a) you do not already have a primary key for a table can have only one
    (b) you allow NULL values in attributes
    "(c) to allow you to update the values in the attributes.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:5541352100346689891

  • table partitioned and unique keys

    I really don't understand why Oracle does not apply in some cases, unique keys.

    Let's say I have a table

    create table t (t_type not null, t_key not null, id not null, not null value)

    list partition (t_type)

    (

    type1 partition values ('ppp1"),

    rest of partition (default) values

    ) as

    Select "ppp" | rownum, rownum, rownum, rownum of double connect by rownum < = 100;

    And following changes in the indices for unique keys

    -1

    create index idx_1 on t (t_key, id);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -2

    create index idx_1 on t (t_key, id, t_type);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -3

    create index idx_1 on t (t_key, id, t_type) local;

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -4

    create an index only idx_1 on t (t_key, id);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -5

    create an index only idx_1 on t (t_key, id, t_type);

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -6

    create an index only idx_1 on t (t_key, id, t_type) local;

    ALTER table t add constraint t_uk unique (t_key) using index idx_1;

    Drop index idx_1;

    -7

    create index idx_1 on t (t_key, t_type, id) local;

    ALTER table t add t_uk unique constraint (t_key, t_type) using index idx_1;

    ALTER table drop constraint t_uk drop index;

    -8

    create an index only idx_1 on t (t_key, t_type, id) local;

    ALTER table t add t_uk unique constraint (t_key, t_type) using index idx_1;

    Drop index idx_1;

    I got the set of questions:

    1. first and second cases were performed with success while 4th and 5th failed.

    The only difference is that the overall index in 4th and 5th cases are unique.

    It is unclear why ' ORA-14196: specified index cannot be used to apply the constraint. ' has occurred.

    2. in the third case index is similar to that in second place with the only difference that it is local.

    Still, it is not clear why it failed with ORA-14196.

    3 and the last question why ORA-14196 arose in 8 cases, while the 7th, it didn't.

    The only difference is the local index in 8 cases is unique.

    Thank you

    Hi Alex

    (1) index 4 and 5 cannot be used to police the unique constraint as a unique index must have the same list of column under duress. Index 4, to establish in a non-unique index or to remove the column id of the index. To index 5, you will need to make a non-unique index or remove the columns id and index t_type.

    (2) 3 index cannot be used to the unique constraint of police that it is a local index and is not partitioned column (t_type) in both the definition of index/constraint. If allowed, this would require Oracle having to visit each partition to ensure that any new value of t_key is truly unique, that would not scale. Include the t_type column in the constraint and the index to both t_type and t_key as of the columns (so move the id column 3rd position) and it would be successful.

    (Index 3) 8 fails for the same reason as in 1). It's a unique index with a different column from the constraint list. Remove the id column of the index or to make it a non-unique index and it will be successful.

    In summary, a unique index MUST have the same list of column than the constraint and a local index MUST have the partitioning columns in both the definition of index/constraint.

    See you soon

    Richard Foote

    http://richardfoote.WordPress.com/

  • Unique key on the partitioned table range

    Hello

    We use a range of composite range-hash partitioned table

    Use index - try to do this have same tablespace to the local partitions but not liking it

    ALTER table RETAILER_TRANSACTION_COMP_POR
    Add primary key constraint RETAILER_TRANSACTION_COMP_PK (DWH_NUM)
    using index
    LOCAL


    ORA-14039: partitioning columns must be a subset of the columns in a unique index key

    Without local then fine but does not have same tablespace to walls and don't want to make this part of the partition key.

    Range Tbal partitioned - it's just a UK to avoid duplicates
    [oracle@localhost ~]$ oerr ora 14039
    14039, 00000, "partitioning columns must form a subset of key columns of a UNIQUE index"
    // *Cause:  User attempted to create a UNIQUE partitioned index whose
    //          partitioning columns do not form a subset of its key columns
    //          which is illegal
    // *Action: If the user, indeed, desired to create an index whose
    //          partitioning columns do not form a subset of its key columns,
    //          it must be created as non-UNIQUE; otherwise, correct the
    //          list of key and/or partitioning columns to ensure that the index'
    //          partitioning columns form a subset of its key columns
    
  • by specifying the index tablespace in to disable the primary key constraint

    Hello
    during the ETL I want to disable constraints PK/UK to speed up the load;
    on activation of the constraint, the corresponding indices are created in a different tablespace while they were initially on the creation of the table itself
    I tried to disable PK / UK with the option 'keep the index', the index value corresponding to the status of "unusable" and use ' alter session set skip_unusable_indexes = true', but then I can't insert rows with the error.
    Error: ORA-01502: index 'xxx' or partition of such index is in unusable state
    can anyone tell if there is a way to allow the PK/UK constraint and specify the storage space for the corresponding indices, or keep the index and inserts works?
    I'd like to avoid to drop constraints / indexes and re-create them both from scratch after the load
    Thank you for the advice
    Thank you
    Rgds

    >
    can anyone tell if there is a way to allow the PK/UK constraint and specify the storage space for the corresponding indices, or keep the index and inserts works?
    I'd like to avoid to drop constraints / indexes and re-create them both from scratch after the load
    >
    Have you tried specifying the table space in the USING clause when you activate the constraint?

    ALTER TABLE emp ENABLE PRIMARY KEY USING INDEX TABLESPACE myTS;
    

    See DBA guide
    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/indexes003.htm
    >
    Creating an Index associated with a constraint

    Oracle database applies a UNIQUE key or a constraint integrity PRIMARY KEY on a table by creating a unique index on the unique key or primary key. This index is created automatically by the database when the constraint is enabled. No action is required by you when you run the CREATE TABLE or ALTER TABLE statement to create the index, but you can optionally specify an ESCALATION using clause to exercise control over his creation. This includes them when a constraint is defined and enabled, and when a constraint defined but disabled is selected.
    >
    Note the last sentence two sentences:
    >
    You can optionally specify an ESCALATION using clause to exercise control over his creation. This includes them when a constraint is defined and enabled, and when a constraint defined but disabled is selected.
    >
    You realize, I hope, that the only way can Oracle KNOWS that the index contains valid values is to rebuild?

  • primary key constraint...

    Hi all

    I have a table 'employees' on 'hr' scheme, now, I created a user 'rahul' on the same database and pulling a request by logging in with the user "rahul" which is:

    create table rahul.employees
    as (select * from hr.employees); -ps: I have the privilege to read data from hr.employees

    Now, the above query works fine, the only issue is that employe_id is the primary key for the table hr.employees and when I check the table of rahul.employees, the pruimary key constraint is missing, however the structure of the table and the data is there according to my expectations.

    I so want to know how to create a table with data using the definition of schema_name.table_name as well as the primary key constraint.

    Concerning
    Rahul karou

    Mac_Freak_Rahul wrote:
    Thanks for the reply, but this query returns me nothing, is it a question of privilege?

    Concerning
    Rahul

    Are you an error? Otherwise, the result will be CLOB, just copy from your clint tool and paste it into a Notepad...

    between it's table

    CREATE TABLE "HR"."EMPLOYEES1"
       (     "EMPLOYEE_ID" NUMBER(6,0),
         "FIRST_NAME" VARCHAR2(20),
         "LAST_NAME" VARCHAR2(25) CONSTRAINT "EMP_LAST_NAME_NN" NOT NULL ENABLE,
         "EMAIL" VARCHAR2(25) CONSTRAINT "EMP_EMAIL_NN" NOT NULL ENABLE,
         "PHONE_NUMBER" VARCHAR2(20),
         "HIRE_DATE" DATE CONSTRAINT "EMP_HIRE_DATE_NN" NOT NULL ENABLE,
         "JOB_ID" VARCHAR2(10) CONSTRAINT "EMP_JOB_NN" NOT NULL ENABLE,
         "SALARY" NUMBER(8,2),
         "COMMISSION_PCT" NUMBER(2,2),
         "MANAGER_ID" NUMBER(6,0),
         "DEPARTMENT_ID" NUMBER(4,0),
          CONSTRAINT "EMP_SALARY_MIN" CHECK (salary > 0) ENABLE,
          CONSTRAINT "EMP_EMAIL_UK" UNIQUE ("EMAIL")
      USING INDEX  ENABLE,
          CONSTRAINT "EMP_EMP_ID_PK" PRIMARY KEY ("EMPLOYEE_ID")
      USING INDEX ENABLE,
          CONSTRAINT "EMP_MANAGER_FK" FOREIGN KEY ("MANAGER_ID")
           REFERENCES "HR"."EMPLOYEES" ("EMPLOYEE_ID") ENABLE,
          CONSTRAINT "EMP_JOB_FK" FOREIGN KEY ("JOB_ID")
           REFERENCES "HR"."JOBS" ("JOB_ID") ENABLE,
          CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPARTMENT_ID")
           REFERENCES "HR"."DEPARTMENTS" ("DEPARTMENT_ID") ENABLE
       ) 
    
  • Error when creating a scenario - ODI-15018 CKM not selected

    Hi gurus

    I have and trying to load flat files in a MSSQL data store. Flat files have set the width of the columns and I managed to load a template file into the data store. This table has a primary key Auto Increment.

    However, I am trying to use a variable for the name of the file, because there is a lot of files in the folder. I declared the variable and put it in a package with the Interface for loading data. When I try to create a scenario I get the following error: * ODI-15018 CKM not selected *.

    I checked the following on my interface:

    Flow control is set to FALSE
    I have CKM SQL selected under the control of the Interface section

    I used the following sources for this work:

    http://gerardnico.com/doc/ODI/Webhelp/en/UserManual/Designer/project/variable/create_variables.htm
    http://www.odigurus.com/2012/02/fixed-width-flat-file-RDBMS-table.html
    http://John-Goodwin.blogspot.com.au/2009/06/ODI-series-processing-all-files-in.html


    Help, please.

    Thank you

    Published by: 800166 on June 6, 2012 09:04

    You have all the constraints that are defined on your store of data at all?
    Static control is attributed to what your interface?

Maybe you are looking for

  • macOS Sierra can fully shutdown

    Hi, yesterday I just upgrade my MacBook Pro for macOS Sierra, when I shut down my computer, it can close all the application and turn my screen in the dark, but my apple macbook light logo still on. I have to press and hold the power button to shutdo

  • How can I retrieve files from the Gallery?

    'Gallery' is an option which is usually a default value for the recording of things such as documents, but there seems to be no way to recover anything of him. I usually avoid altogether but sometimes, when I'm not alert enough, stuff gets through in

  • Private browsing on right context menu on the shortcut icon of Mozilla's Firefox on MS Win XP

    I am already aware that the Mozilla Firefox browser has the ability to always start Firefox in private browsing mode by putting the brand into its Options on... However, I noticed that on MS Win 7 OS, we can run Mozilla Firefox browser directly, by c

  • Order the CD from recovery or recover the original settings?

    Hi all I just got my laptop L500-1XL a week ago. When I got it I was annoyed by HALF my hard drive supported by the recovery partition.and the thought that the recovery CD would do the same job. So I formatted and reinstalled. Only one problem... I n

  • CM1017 MFP will not print

    I just bought and installed all 4 toner cartridges for my cm1017 and settled.  The printer says no problem, reports of the utility of diagnosis of hp without questions or problems, when I connect to the ip address of the printer all the pages show no