Unique constraint violation error while bulk insert (TimesTen 7.0.1.0.0)

Hi,
I try to understand while I get error above when doing bulk inserts via TimesTen into Oracle database.
The single inserts after that works perfect (no record will dropped), when doing direct to oracle bulk insert works with same data perfect. We tried it with AWT, then with readonly tables and passtrough=2, nothing works. The error comes even the table is empty.
Any suggestions? is this a bug in timesten itself? Have I connect for bulk inserts direct to oracle database?
Thanks in advanced
Rajko Albrecht

It may be a TT bug but if so it is not an obvious one since bulk inserts definitely work in TimesTen...
Can you please provide:
1. The schema of the table in question (including any indices)
2. Details on how you are doing the bulk inserts (C/ODBC program, Java/JDBC program or ...). Actual program source code would be helpful.
3. A (small) example of the data that you know would give this error.
Thanks,
Chris

Similar Messages

  • Uniques constraint violation error while executing statspack.snap

    Hi,
    I have configured a job to run the statspack snap at a interval of 20 min from 6:00 PM to 3:00 AM . Do perform this task , I have crontab 2 scripts : one to execute the job at 6 PM and another to break the job at 3 AM. My Oracle version is 9.2.0.7 and OS env is AIX 5.3
    My execute scripts look like:
    sqlplus perfstat/perfstat <<EOF
    exec dbms_job.broken(341,FALSE);
    exec dbms_job.run(341);
    The problem is , that the job work fine for weekdays but on weekend get aborted with the error :
    ORA-12012: error on auto execute of job 341
    ORA-00001: unique constraint (PERFSTAT.STATS$SQL_SUMMARY_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1361
    ORA-06512: at "PERFSTAT.STATSPACK", line 2471
    ORA-06512: at "PERFSTAT.STATSPACK", line 91
    ORA-06512: at line 1
    After looking on to metalink , I came to know that this is one listed bug 2784796 which was fixed in 10g.
    My question is , why there is no issue on weekdays using the same script. There is no activity on the db on weekend and online backup start quite late at night.
    Thanks
    Anky

    The reasons for hitting this bug are explained in Metalink, "...cursors with same sql text (at least 31 first characters), same hash_value but a different parent cursor...", you can also find the workaround in Note:393300.1.
    Enrique

  • Unique constraint violation error

    Hello All,
    I have a procedure called - FHM_DASHBOARD_PROC which inserts the data into a table called FHM_DASHBOARD_F fetching records from several tables. However, for a particular type of record, that data is not being inserted because of the Unique constraint violation
    the procedure is:
    create or replace
    PROCEDURE FHM_DASHBOARD_PROC AS
    DB_METRICS_CNT1Z number;
    --V_PODNAME varchar2(10);
    V_KI_CODE_DB_STATSZ varchar2(50);
    V_ERRORSTRING varchar2(100);
    --CURSOR PODNAME_CUR IS SELECT PODNAME,SHORTNAME FROM CRMODDEV.POD_DATA WHERE PODSTATUS_ID=1 AND PODTYPE_ID=1 ORDER BY PODNAME;
    -- DB STATS
    BEGIN
      -- OPEN PODNAME_CUR;
        --   LOOP
          --   FETCH PODNAME_CUR INTO V_PODNAME,V_POD_SHORTNAME ;
            -- EXIT WHEN PODNAME_CUR%NOTFOUND;
               BEGIN
                     SELECT COUNT(*) INTO DB_METRICS_CNT1Z FROM FHM_DB_METRICS_F A, FHM_DB_D B where A.DBNAME=B.DBNAME and PODNAME=V_PODNAME AND DB_DATE=TRUNC(SYSDATE-1);
                               DBMS_OUTPUT.PUT_LINE('DB_METRICS_CNT1Z :'|| DB_METRICS_CNT1Z);
                               IF DB_METRICS_CNT1Z >0 THEN
                        DBMS_OUTPUT.PUT_LINE('DB STATS');
                       INSERT INTO FHM_DASHBOARD_F(PODNAME,DASH_DATE,KI_CODE,KI_VALUE,KI_STATUS)
                          (SELECT PODNAME, DASH_DATE AS CU_DATE, KI.KI_CODE, NVL(PF.KI_VALUE,0),
                                                                  CASE
                                                                   WHEN PF.KI_VALUE = ki.warning_threshold then 2
                        when PF.KI_VALUE=0 then 0
                        ELSE 1
                        END  AS ALERT_STATUS
                        FROM
                        (SELECT PODNAME,DB_DATE AS DASH_DATE,decode(a.stats_last_status,'SUCCEEDED',1,'FAILED',2,'STOPPED',2,NULL,0) KI_VALUE from 
                        FHM_DB_METRICS_F a,fhm_db_d b where a.dbname=b.dbname and podname='XYZ' and db_date=TRUNC(SYSDATE-1) and dbtype='OLTP')PF,
                        FHM_KEY_INDICATOR_D KI where PF.PODNAME=KI.POD_NAME AND KI.TIER_CODE=3 AND KI.KI_NAME='DB_STATS'
                        AND (PF.PODNAME,TRUNC(PF.DASH_DATE),KI.KI_CODE) NOT IN (SELECT PODNAME,DASH_DATE,KI_CODE FROM FHM_DASHBOARD_F));
                                 COMMIT;
                             ELSE
                                    SELECT KI_CODE INTO V_KI_CODE_DB_STATSZ FROM FHM_KEY_INDICATOR_D WHERE POD_NAME=V_PODNAME AND KI_NAME='DB_STATS';
                                     DBMS_OUTPUT.PUT_LINE('V_KI_CODE_DB_STATSZ :'||V_KI_CODE_DB_STATSZ);
                                     INSERT INTO FHM_DASHBOARD_F(PODNAME,DASH_DATE,KI_CODE,KI_VALUE,KI_STATUS) VALUES(V_PODNAME,TRUNC(SYSDATE-1),V_KI_CODE_DB_STATSZ,0,0);
                                     COMMIT;
                             END IF;
         EXCEPTION
                            WHEN OTHERS THEN
                            V_ERRORSTRING :='INSERT INTO FHM_DASHBOARD_F_ERROR_LOG(POD_NAME,KI_NAME,ERRORNO,ERRORMESSAGE,DATETIME) VALUES
                   ('''||V_PODNAME||''',''DB_STATS'','''||SQLCODE||''','''||SQLERRM||''',SYSDATE)';                        
                   EXECUTE IMMEDIATE  V_ERRORSTRING;
                            COMMIT;
              END;
          --END LOOP;
      --CLOSE PODNAME_CUR;
    END;
    END FHM_DASHBOARD_PROC;and the table where the data is inserting is
    CREATE TABLE "CRMODDEV"."FHM_DASHBOARD_F"
        "PODNAME" VARCHAR2(25 BYTE) NOT NULL ENABLE,
        "DASH_DATE" DATE,
        "KI_CODE"   NUMBER NOT NULL ENABLE,
        "KI_VALUE"  NUMBER,
        "KI_STATUS" NUMBER,
        CONSTRAINT "FHM_DASHBOARD_F_DATE_PK" PRIMARY KEY ("DASH_DATE", "PODNAME", "KI_CODE") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS STORAGE(INITIAL 4194304 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CRMODDEV_IDX" ENABLE,
        CONSTRAINT "FHM_DASHBOARD_F_KI_CODE_FK" FOREIGN KEY ("KI_CODE") REFERENCES "CRMODDEV"."FHM_KEY_INDICATOR_D" ("KI_CODE") ENABLE
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE
        INITIAL 3145728 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
      TABLESPACE "CRMODDEV_TBL" ENABLE ROW MOVEMENT ;the Primary key constraint is FHM_DASHBOARD_F_DATE_PK and is on 3 columns of the table DASH_DATE, PODNAME, KI_CODE
    And this is the query used in the Procedure for inserting the data into the table
    (SELECT  PODNAME, DASH_DATE AS CU_DATE, KI.KI_CODE, NVL(PF.KI_VALUE,0),
                                   CASE
                                   WHEN PF.KI_VALUE = ki.warning_threshold then 2
    when PF.KI_VALUE=0 then 0
    ELSE 1
    END  AS ALERT_STATUS
    From
    (Select  Podname,Db_Date As Dash_Date,Decode(A.Stats_Last_Status,'SUCCEEDED',1,'FAILED',2,'STOPPED',2,Null,0) Ki_Value From  -- Added Distinct
    FHM_DB_METRICS_F a,fhm_db_d b where a.dbname=b.dbname and podname in ('XYZ') and db_date = TRUNC(SYSDATE-2) and dbtype='OLTP')PF,
    Fhm_Key_Indicator_D Ki Where Pf.Podname=Ki.Pod_Name And Ki.Tier_Code=3 And Ki.Ki_Name='DB_STATS'
    And (Pf.Podname,Trunc(Pf.Dash_Date),Ki.Ki_Code) Not In (Select Podname,Dash_Date,Ki_Code From Fhm_Dashboard_F));It gives *2 record* as result
    XYZ 20-JAN-12     2521     1     1
    XYZ 20-JAN-12     2521     1     1
    So it gives Unique constraint violation error while inserting. Then, I changed in the above inserting code by adding a distinct clause. After that the query gives only ONE record as result. However, that record also is not being inserted into the table and giving the same error.
    Now the question is How shall I insert this record into the table successfully ?
    Though the message is too long, However, I have given you the full structure of the object/procedure and error.
    Thank You in Advance.

    when you have 5 columns in the result set adding DISTINCT is n ot the solution as you may get the same error again.
    Check the target table whether the data exists before inserting ..if not check the table structure for unique constraint created on other columns.
    select *from <table_name>
    where
    DASH_DATE=date '2012-01-20'
    and PODNAME='XYZ'
    and  KI_CODE=2521;

  • ORA-00001 Unique constraint Violation Error

    We are upgrading our NW BW 7.01 java server to 7.3 and during the Downtime phase of the Installer, while running the Offline Migration, we are getting an error "EP-KM-BC: Unique Constraint Violation error: ORA-000001".  Unknown Object# (12xxxxxx) does not exist. We have one CI and two DI. Any help would be greatly appreciated.

    Hi Anil,
    You need to clear the data from the table
    1. SHD_AP_PROPVALUE
    2. SHD_KMC_AP_PROP
    3. SHD_AP_MC
    Repeat the phase and also follow the sapnote
    1873288 - RUN_OFFLINE_MIGRATION phase fails during SAP NetWeaver migration
    Also paste the logs of RUN_OFFLINE_MIGRATION phase.
    With Regards
    Ashutosh Chaturvedi

  • Regarding ORA-00001: unique constraint violation error

    Hi ,
    This is Venkat. I am new to OWB.
    When I run the mapping I am getting the ORA-00001: unique constraint violation error.
    My loading type is Update/Insert.
    My target table Primarykey is combination of 3 keys.
    Please give me the suggestions. It is very urgent.
    Thanks,
    Venkat

    1) If you can disable/drop the indexes on the table, you can load the data and then do a SQL query grouping by the PK/UI to show which rows have a count > 1 i.e. the duplicates.
    2) If you can't alter the target table, perhaps create a dummy copy of the table without pk/indexes and load to that and then do above query.
    3) Run the mapping via the debugger and set a breakpoint just before your target table and examine the data to see if you can spot the duplicates.
    4) Put a deduplicator into the mapping (just before target table), this may allow you to load data but doesn't solve the real problem as to why you have duplicates.
    Si

  • Unique Key Violation error while updating table

    Hi All,
    I am having problem with UNIQUE CONSTRAINT. I am trying to update a table and getting the violation error. Here is the over view. We have a table called ActivityAttendee. ActivityAttendee has the following columns. The problem to debug is this table has
    over 23 million records. How can I catch where my query is going wrong?
    ActivityAttendeeID INT PRIMARY KEY IDENTITY(1,1)
    ,ActivityID INT NOT NULL (Foreign key to parent table Activity)
    ,AtendeeTypeCodeID INT NOT NULL
    ,ObjectID INT NOT NULL
    ,EmailAddress VARCHAR(255) NULL
    UNIQUE KEY is on ActivityID,AtendeeTypeCodeID,ObjectID,EmailAddress
    We have a requirement where we need to update the ObjectID. There is a new mapping where I dump that into a temp table #tempActivityMapping (intObjectID INT NOT NULL, intNewObjectID INT NULL)
    The problem is ActivityAttendee table might already have the new ObjectID and the unique combination.
    For example: ActivityAttendee Table have the following rows
    1,1,1,1,NULL
    2,1,1,2,NULL
    3,1,1,4,'abc'
    AND the temp table has 2,1
    So essentially when I update in this scenario, It should ignore the second row because, if I try updating that there will be a violation of key as the first record has the exact value. When I ran my query on test data it worked fine. But for 23 million records,
    its going wrong some where and I am unable to debug that. Here is my query
    UPDATE AA
    SET AA.ObjectID = TMP.NewObjectID
    FROM dbo.ActivityAttendee AA
    INNER JOIN #tmpActivityMapping TMP ON AA.ObjectID = TMP.ObjectID
    WHERE TMP.NewObjectID IS NOT NULL
    AND NOT EXISTS(SELECT 1
    FROM dbo.ActivityAttendee AA1
    WHERE AA1.ActivityID = AA.ActivityID
    AND AA1.AttendeeTypeCodeID = AA.AttendeeTypeCodeID
    AND AA1.ObjectID = TMP.NewObjectID
    AND ISNULL(AA1.EmailAddress,'') = ISNULL(AA.EmailAddress,'')

    >> I am having problem with UNIQUE CONSTRAINT. I am trying to update a table and getting the violation error. Here is the over view. We have a table called Activity_Attendee. <<
    Your problem is schema design. Singular table names tell us there is only one of them the set. Activities are one kind of entity; Attendees are a totally different kind of entity; Attendees are a totally different kind of entity. Where are those tables? Then
    they can have a relationship which will be a third table with REFERENCES to the other two. 
    Your table is total garbage. Think about how absurd “attendee_type_code_id” is. You have never read a single thing about data modeling. An attribute can be “attendee_type”, “attendee_code” or “attendee_id”but not that horrible mess. I have used something like
    this in one of my busk to demonstrate the wrong way to do RDBMS as a joke, but you did it for real. The postfix is called an attribute property in ISO-11179 standards. 
    You also do not know that RDBMS is not OO. We have keys and not OIDs; but bad programmers use the IDENTITY table property (NOT a column!), By definition, it cannot be a key; let me say that again, by definition. 
    >> ActivityAttendee has the following columns. The problem to debug is this table has over 23 million records [sic: rows are not records]<<
    Where did you get “UNIQUE KEY” as syntax in SQL?? What math are you doing the attendee_id? That is the only reason to make it INTEGER. I will guess that you meant attendee_type and have not taken the time to create an abbreviation encoding it.
    The term “patent/child” table is wrong! That was network databases, not RDBMS. We have referenced and referencing table. Totally different concept! 
    CREATE TABLE Attendees
    (attendee_id CHAR(10) NOT NULL PRIMARY KEY, 
     attendee_type INTEGER NOT NULL  --- bad design. 
        CHECK (attendee_type BETWEEN ?? AND ??), 
     email_address VARCHAR(255), 
    CREATE TABLE Activities
    (activity_id CHAR(10) NOT NULL PRIMARY KEY, 
    Now the relationship table. I have to make a guess about the cardinally be 1:1, 1:m or n:m. 
    CREATE TABLE Attendance_Roster
    (attendee_id CHAR(10) NOT NULL --- UNIQUE??
       REFERENCES Attendees (attendee_id), 
     activity_id Activities CHAR(10) NOT NULL ---UNIQUE?? 
      REFERENCES Activities (activity_id)
     PRIMARY KEY (attendee_id, activity_id), --- wild guess! 
    >> UNIQUE KEY is on activity_id, attendee_type_code_id_value_category, object_id, email_address <<
    Aside from the incorrect “UNIQUE KEY” syntax, think about having things like an email_address in a key. This is what we SQL people call a non-key attribute. 
    >> We have a requirement where we need to update the ObjectID. There is a new mapping where I dump that into a temp table #tempActivityMapping (intObjectID INTEGER NOT NULL, intNewObjectID INTEGER NULL) <<
    Mapping?? We do not have that concept in RDBMS. Also putting meta data prefixes like “int_” is called a “tibble” and we SQL people laugh (or cry) when we see it. 
    Then you have old proprietary Sybase UODATE .. FROM .. syntax. Google it; it is flawed and will fail. 
    Please stop programming until you have a basic understanding of RDBMS versus OO and traditional file systems. Look at my credits; when I tell you, I think I have some authority. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Reattempt of insert after a ORA-0001 unique constraint violation

    Hi,
    I'm inserting into a table. The primary key on this table is made up of the user id and a one-up transaction number. Unfortunately, I cannot change the design of this table.
    Because I have to query the table to get the next transaction number before I insert into the table, I sometimes get a ORA-0001 (unique constraint violation) error because some other session grabbed the next transaction number and committed before I did.
    To deal with this I retry the insert, that is, read the table again for the next tran number and insert. I allow for this up to 3 times. If after the third attempt I fail again, I rollback.
    I'm seeing 3 records in the table.
    So here are my questions: Do I need to rollback when I get the ORA-0001 error? I thought I wouldn't have to. If I do, why? The insert failed, how could the commit statement commit 3 records?
    Thanks!

    No, the userid and transaction numbers are not the same (combined) for each of the 3 rows.
    Here is the logic to retry again when I get a ORA-0001:
    PROCEDURE insert_record(
    table1_rec_in IN table1%ROWTYPE,
    tran_number OUT table1.trans_number%TYPE,
    attempt_number IN PLS_INTEGER)
    IS
    next_tran_number table1.trans_number%TYPE;
    BEGIN
    SELECT NVL(MAX(trans_number), 0) + 1
    INTO next_tran_number
    FROM table1
    WHERE userid = table1_rec_in.table1_userid;
    INSERT INTO table1
    (userid,
    trans_number,
    amount,
    transdate)
    VALUES
    (table1_rec_in.userid,
    next_tran_number,
    table1_rec_in.amount,
    SYSDATE);
    tran_number := next_tran_number;
    EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN
    IF attempt_number < 3
    THEN
    DECLARE
    next_attempt_number PLS_INTEGER;
    BEGIN
    next_attempt_number := attempt_number + 1;
    insert_record(
    table1_rec_in,
    tran_number,
    next_attempt_number);
    END;
    ELSE
    RAISE unable_to_insert_rec;
    END IF;
    WHEN OTHERS THEN
    RAISE unable_to_insert_rec;
    END;
    I'm using recursion to try the insert again. Is this the source of my problems? I don't see it and can't reproduce it.

  • Unique Constraint Violation on Merge

    I'm getting a unique constraint violation on the following but I don't understand why. I know there are duplicates on remote.customer_id but I'm doing a distinct on that column but still the error. In my local table, customer_id is the primary key so it must be unique. If I remove the primary key constraint altogether, the error goes away.
    Can anyone tell me why both DISTINCT and UNIQUE fail to eliminate duplicates in this merge statement? I have confirmed that remote.customer_id is the source of the duplicates.
    merge into CUSTOMER c
    using (
    select DISTINCT remote.customer_id,
    remote.name_1,
    remote.name_2,
    remote.name_3,
    remote.name_4,
    remote.house_number_and_street,
    remote.city,
    remote.region,
    remote.country_code,
    remote.postal_code,
    p.customer_id_of_bus_partner
    from D_CUSTOMER@BW_LINK remote
    left join D_CUSTOMER_PARTNER_FUNCTIONS@BW_LINK p
    on p.customer_id = remote.customer_id
    where p.partner_function_id = 'ZS'
    ) remote
    on (c.customer_id = remote.customer_id)
    when matched then
    update set c.name_1 = remote.name_1,
              c.name_2 = remote.name_2,
              c.name_3 = remote.name_3,
              c.name_4 = remote.name_4,
              c.house_number_and_street = remote.house_number_and_street,
              c.city = remote.city,
              c.region = remote.region,
              c.country_code = remote.country_code,
              c.postal_code = remote.postal_code
    when not matched then
    insert (c.customer_id,
                   c.name_1,
                   c.name_2,
                   c.name_3,
                   c.name_4,
                   c.house_number_and_street,
                   c.city,
                   c.region,
                   c.country_code,
                   c.postal_code,
                   c.customer_id_of_bus_partner
    values (remote.customer_id,
                   remote.name_1,
                   remote.name_2,
                   remote.name_3,
                   remote.name_4,
                   remote.house_number_and_street,
                   remote.city,
                   remote.region,
                   remote.country_code,
                   remote.postal_code,
                   remote.customer_id_of_bus_partner
    LOG ERRORS INTO DML_ERROR_LOG ('Customer Merge') REJECT LIMIT 5;
    Edited by: bjiggs on Mar 25, 2010 10:56 AM

    When you mentioned the following in previous post...
    +unable to get a stable set of rows in the source tables+
    ...I suspected this :-)
    This is EQUIVALENT to "Mutating Table trigger/function" error...
    ...in the sense that the the "target rows" which are
    supposed to be changed (by this statement)
    are FOUND/MATCHED in the "source result set" MULTIPLE TIMESThe main reason this error comes up is...
    In the SOURCE result set, there are MORE than one ROW that MATCHED the TARGET result set.
    In this scenario the row with PK=3 matches more than one SOURCE rows, which one is supposed to be used for updating?
    Yes indeed, oracle is unable to get a stable set of rows in source tables.
    However the PK=4 is not matched in the target result set, so the statement will attenpt to insert both rows resulting in UNIQUE contraint error.
    This was the case with OP in this posts.
    This can be seen in your example by commenting one of the rows in table S with PK=3.
    sudhakar@ORCL>drop table D;
    Table dropped.
    sudhakar@ORCL>drop table S;
    Table dropped.
    sudhakar@ORCL>create table D ( pk number, a varchar2(10),
      2  constraint d_pk primary key (pk));
    Table created.
    sudhakar@ORCL>
    sudhakar@ORCL>insert into D values( 1, 'a');
    1 row created.
    sudhakar@ORCL>insert into D values( 2, 'a');
    1 row created.
    sudhakar@ORCL>insert into D values( 3, 'a');
    1 row created.
    sudhakar@ORCL>
    sudhakar@ORCL>commit;
    Commit complete.
    sudhakar@ORCL>
    sudhakar@ORCL>create table S ( pk number, a varchar2(10));
    Table created.
    sudhakar@ORCL>
    sudhakar@ORCL>insert into S values( 1, 'b');
    1 row created.
    sudhakar@ORCL>insert into S values( 2, 'b');
    1 row created.
    sudhakar@ORCL>insert into S values( 3, 'b');
    1 row created.
    sudhakar@ORCL>--insert into S values( 3, 'b');
    sudhakar@ORCL>insert into S values( 4, 's');
    1 row created.
    sudhakar@ORCL>insert into S values( 4, 't');
    1 row created.
    sudhakar@ORCL>
    sudhakar@ORCL>commit;
    Commit complete.
    sudhakar@ORCL>
    sudhakar@ORCL>
    sudhakar@ORCL>merge into d
      2  using s
      3  on (d.pk = s.pk)
      4  when matched then update
      5  set d.a = s.a
      6  when not matched then insert
      7  (d.pk, d.a)
      8  values (s.pk, s.a);
    merge into d
    ERROR at line 1:
    ORA-00001: unique constraint (SUDHAKAR.D_PK) violated
    sudhakar@ORCL>vr,
    Sudhakar B.

  • Unique constraint violation

    Hi,
    I am a newbie to oracle..
    I have a composite primary key consisting of sequence,reg_no,srvc_code and srvc_type..
    when i tried inserting a record through the application it is showing that Unique constraint violated..But i did not find the record in the table for the same values
    and if I insert the same values with an sql insert statement,the record is inserted successfully..Please suggest me the possibilities of getting such an error.

    952759 wrote:
    Hi,
    I am a newbie to oracle..
    I have a composite primary key consisting of sequence,reg_no,srvc_code and srvc_type..
    when i tried inserting a record through the application it is showing that Unique constraint violated..But i did not find the record in the table for the same values
    and if I insert the same values with an sql insert statement,the record is inserted successfully..Please suggest me the possibilities of getting such an error.Either Oracle is mistaken or you are mistaken.
    I'll give you 1000 to 1 odds that Oracle is correct & you are mistaken.
    How can we reproduce what you report?
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • First Row Record is not inserted from CSV file while bulk insert in sql server

    Hi Everyone,
    I have a csv file that needs to be inserted in sql server. The csv file will be format will be like below.
    1,Mr,"x,y",4
    2,Mr,"a,b",5
    3,Ms,"v,b",6
    While Bulk insert it coniders the 2nd column as two values (comma separte) and makes two entries .So i used filelterminator.xml.  
    Now, the fields are entered into the column correctly. But now the problem is, the first row of the csv file is not reading in sql server. when i removed the  terminator,  i can get the all records. But i must use the above code terminator. If
    am using means, am not getting the first row record.
    Please suggests me some solution.
    Thanks,
    Selvam

    Hi,
    I have a csv file (comma(,) delimited) like this which is to be insert to sql server. The format of the file when open in notepad like below:
    Id,FirstName,LastName,FullName,Gender
    1,xx,yy,"xx,yy",M
    2,zz,cc,"zz,cc",F
    3,aa,vv,"aa,vv",F
    The below is the bulk insert query which is used for insert above records,
    EXEC(BULK INSERT EmployeeData FROM '''+@FilePath+'''WITH
    (formatfile=''d:\FieldTerminator.xml'',
    ROWTERMINATOR=''\n'',
    FIRSTROW=2)'
    Here, I have used format file for the "Fullname" which has comma(,) within the field. The format file is:
    The problem is , it skip the first record (1,xx,yy,"xx,yy",M) when i use the format file. When i remove the format file from the query, it takes all the records but the "fullName" field makes the problem because of comma(,) within the
    field. So i must use the format file to handle this. So please suggest me , why the first record skipped always when i use the above format file.
    If i give the "FirstRow=1" in bulk insert, it shows the "String or binary data would be truncated.
    The statement has been terminated." error. I have checked the datatype length.
    Please update me the solution.
    Regards,
    Selvam. M

  • Unique constraint violation on version enabled table

    hi!
    we're facing a strange problem with a version enabled table that has an unique constraint on one column. if we rename an object stored in the table (the name-attribute of the object is the one that has a unique constraint on the respective column) and rename it back to the old name again, we get an ORA-00001 unique constraint violation on the execution of an update trigger.
    if the constraint is simply applied as before to the now version enabled table, I understand that this happens, but shouldn't workspace manager take care of something like that when a table with unique constraints is version enabled? (the documentation also says that) because taking versioning into account it's not that we try to insert another object with the same name, it's the same object at another point in time now getting back it's old name.
    we somewhat assume that to be a pretty standard scenario when using versioned data.
    is this some kind of bug or do we just miss something important here?
    more information:
    - versioning is enabled on all tables with VIEW_WO_OVERWRITE and no valid time support
    - database version is 10.2.0.1.0
    - wm installation output:
    ALLOW_CAPTURE_EVENTS OFF
    ALLOW_MULTI_PARENT_WORKSPACES OFF
    ALLOW_NESTED_TABLE_COLUMNS OFF
    CR_WORKSPACE_MODE OPTIMISTIC_LOCKING
    FIRE_TRIGGERS_FOR_NONDML_EVENTS ON
    NONCR_WORKSPACE_MODE OPTIMISTIC_LOCKING
    NUMBER_OF_COMPRESS_BATCHES 50
    OWM_VERSION 10.2.0.1.0
    UNDO_SPACE UNLIMITED
    USE_TIMESTAMP_TYPE_FOR_HISTORY ON
    - all operations are done on LIVE workspace
    any help is appreciated.
    EDIT: we found out the following: the table we are talking about is the only table where the unique constraint is left. so there must have been a problem during version enabling. on another oracle installation we did everything the same way and the unique constraint wasn't left there, so everything works fine.
    regards,
    Andreas Schilling
    Message was edited by:
    aschilling

    hi!
    we're facing a strange problem with a version enabled table that has an unique constraint on one column. if we rename an object stored in the table (the name-attribute of the object is the one that has a unique constraint on the respective column) and rename it back to the old name again, we get an ORA-00001 unique constraint violation on the execution of an update trigger.
    if the constraint is simply applied as before to the now version enabled table, I understand that this happens, but shouldn't workspace manager take care of something like that when a table with unique constraints is version enabled? (the documentation also says that) because taking versioning into account it's not that we try to insert another object with the same name, it's the same object at another point in time now getting back it's old name.
    we somewhat assume that to be a pretty standard scenario when using versioned data.
    is this some kind of bug or do we just miss something important here?
    more information:
    - versioning is enabled on all tables with VIEW_WO_OVERWRITE and no valid time support
    - database version is 10.2.0.1.0
    - wm installation output:
    ALLOW_CAPTURE_EVENTS OFF
    ALLOW_MULTI_PARENT_WORKSPACES OFF
    ALLOW_NESTED_TABLE_COLUMNS OFF
    CR_WORKSPACE_MODE OPTIMISTIC_LOCKING
    FIRE_TRIGGERS_FOR_NONDML_EVENTS ON
    NONCR_WORKSPACE_MODE OPTIMISTIC_LOCKING
    NUMBER_OF_COMPRESS_BATCHES 50
    OWM_VERSION 10.2.0.1.0
    UNDO_SPACE UNLIMITED
    USE_TIMESTAMP_TYPE_FOR_HISTORY ON
    - all operations are done on LIVE workspace
    any help is appreciated.
    EDIT: we found out the following: the table we are talking about is the only table where the unique constraint is left. so there must have been a problem during version enabling. on another oracle installation we did everything the same way and the unique constraint wasn't left there, so everything works fine.
    regards,
    Andreas Schilling
    Message was edited by:
    aschilling

  • Uniqueness constraint violation: service

    Hi;
    I upgrade to bpel 3.1.3.5.0; and after i cannot create a web service proxy from bpel process ! i always had this error "uniqueness constraint violation: service "
    Any ideas

    WSDLs were supplied by third party managing the web service I am attempting to generate the proxies for. I'm unsure of the method used to create the WSDL files.

  • Password Violation error while creating users from Admin interface

    Guys,
    The Sun Identity Manager system throws policy violation error while creating users from Sun Identity Manager Admin interface.
    Current System:
    1. I have configured TAM Pass-Thru authentication for End User Login Application.
    2. I have an admin user 'testsjimadmin1' who has admin capabilities. testsjimadmin1 user has default SJIM password policy.
    3. I have custom password policies configured for different orgainizatoions
    Problem:
    1. The Sun Identity Manager throws a password policy violation error when 'testsjimadmin1' tries to create an user with valid or invalid password from Sun Identity Manager Admin interface.
    2. If TAM Pass-thru authentication is removed for 'End User Login Application' and Sun Identity Manager default authentication is configured for 'End User Login Application' then testsjimadmin1 was able to create user successfully without any errors.
    Please let me know if any configurations are required to be made on Sun Identity Manager for TAM Pass-Thru authentication so that admin users can create users successfully from admin interface.
    Appreciate your help!!!
    Thanks
    Vijay

    Guys,
    The Sun Identity Manager system throws policy violation error while creating users from Sun Identity Manager Admin interface.
    Current System:
    1. I have configured TAM Pass-Thru authentication for End User Login Application.
    2. I have an admin user 'testsjimadmin1' who has admin capabilities. testsjimadmin1 user has default SJIM password policy.
    3. I have custom password policies configured for different orgainizatoions
    Problem:
    1. The Sun Identity Manager throws a password policy violation error when 'testsjimadmin1' tries to create an user with valid or invalid password from Sun Identity Manager Admin interface.
    2. If TAM Pass-thru authentication is removed for 'End User Login Application' and Sun Identity Manager default authentication is configured for 'End User Login Application' then testsjimadmin1 was able to create user successfully without any errors.
    Please let me know if any configurations are required to be made on Sun Identity Manager for TAM Pass-Thru authentication so that admin users can create users successfully from admin interface.
    Appreciate your help!!!
    Thanks
    Vijay

  • The Microsoft Exchange Mailbox Replication service was unable to process a request due to an unexpected error. : Error: An Active Directory Constraint Violation error occurred

    Hello,
    We have a multi domain parent child AD domain infrastructure and now we upgraded our exchange from Exchange 2007 to Exchange 2013. Since last few days, we see the below error on the mailbox server event viewer.
    EVENT ID : 1121
    The Microsoft Exchange Mailbox Replication service was unable to process a request due to an unexpected error. 
    Request GUID: '93a7d1ca-68a1-4cd9-9edb-a4ce2f7bb4cd' 
    Database GUID: '83d028ec-439d-4904-a0e4-1d3bc0f58809' 
    Error: An Active Directory Constraint Violation error occurred on <domain controller FQDN>. Additional information: The name reference is invalid. 
    This may be caused by replication latency between Active Directory domain controllers. 
    Active directory response: 000020B5: AtrErr: DSID-0315286E, #1:
    Our Exchange setup is in parent domain, but we keep on getting this error for various domain controllers in each child domain in the same site. We then configured one of the parent domain domain controller on Exchange. Still we are getting this error for
    the configured parent domain DC.
    Verified the AD replication and there is no latency or pending stuffs.
    Any support  to resolve this issue will be highly appreciated. Thank you in advance.
    Regards,
    Jnana R Dash

    Hi,
    In addition to Ed's suggestion, I would like to clarify the following things for troubleshooting:
    1. Please restart IIS at first.
    2. If the issue persists, please ping your DC on your Exchange server to check if Exchange can communicate with DC.
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Help needed for PK_REV_COL unique constraint violation

    We’re receiving a SNPW.PK_REV_COL unique constraint violation when trying to reverse a pipe delimited source file. There are no duplicate column names within the source file but the same column names are used across several different input files. Does anyone have a solution to this problem?

    Hi,
    This is a problem with the Reversed tables from ODI.
    Go to work repository and truncate any "snp_rev...." tables.
    That should solves it.
    Cezar Santos
    [www.odiexperts.com]
    Edited by: Cezar Santos - www.odiexperts.com on 20/10/2009 15:34

Maybe you are looking for

  • Stuck with question mac

    My mac stuck on empty folder with question mark. I tried installing new OS from USB flash but I couldn't see the hardrive and installation showed progress but it was installing on "OS X Base system" So I tried switching harddrives with a similar mac

  • Airport Express to Tivo?

    I've got an new internet-enabled Tivo in the living room, but there's no RJ-45 outlet there. I've also got an Airport Express that's been gathering dust since almost everyone else now provides free WiFi. Seems like a cool trick would be to use the AE

  • Can anyone explain the array-binary implementation?

    Hi, i have a final exam tomorrow, and I got stuck on the array implementation of a binary tree, can anyone please provide me a code that implements the tree non recursively into an array, the book has a recursive code, which i tried to trace, but it

  • Why does installation cd not work for new hard drive for 2009 MacBook pro?

    my hard drive died in my 2009 MacBook pro so I bought a 1tb ssd drive and had the store physically install the drive only.   I arrived home and stuck in the original installation disc and pressed and held the c key after the chime. Nothing happened.

  • Titles and buttons needs to be defined again

    JHeadstart 11.1.1 Technical Preview 2 Hello Developers, I have 4 application Modules in 1 Project. Every time I make a change in 1 of the app. Modules and generate this application, the Titles do not exist anymore (e.g. ???TABLE_TITLE_AMBEDRIJF2???)