Primary Key rule Violation error while Insert Record in Compact DB

Hi All,
I have One Table in Server Name "Student"  when i Synchronize this with the help of Microsoft Synchronization Framework
same Table schema with Data has been create in CompactDataBase.
When i insert data in CompactDataDase it give me Primary Key Violation error.
Please Suggest
Example
Table Structure is as Follows:-
Create Table Student(
[Emp_id] int IDENTITY(1,1) NotNull,[Emp_Name] int NOTNULL );insert into Student Values('John');insert into Student Values('Joe');Thanks & RegardsNamit Jain

try this and see if it solves,
also, Emp_name data type is int. it should be varchar.
I suspect the reason is because you already have some data in student table but you identity seeds were not updated and hence it is trying to insert a row with emp_id value that already exists.and hence the primary key violation. also, your table DDL did
not really have an primary key but it would still error since you are inserting duplicate row in the identity column.
so, try resetting the identity seed value to the max(emp_id) in the table.
select max(Emp_ID) from  student
--use the output of the above statement
DBCC CHECKIDENT ('Student', RESEED,<<--use the output of the above statement-->>)
--your max(emp_id) should match with last_value column in the below( do not if this query would run in compact DB though)
select seed_value,increment_value,last_value from sys.identity_columns where object_id=object_id('Student')
now, try your insert.
Hope it Helps!!

Similar Messages

  • Error while inserting record in Key-Flex Values Set interface

    Guys
    on 11.5.10.2
    Actually the problem is being occurred while inserting value in Job Flex Field Value set, we have created two segment for job key flex filed, No and name, it was working fine, but since we have uploaded bulk data via api "fnd_flex_values_pkg.INSERT_ROW" which was around 100 off record, but after completion this task system is not taking new value by Values set interface, and show message "APPS-FND-01206: You entered duplicate values or sequence of value that must be unique for every record",
    However, we insert the job number through api, it is inserting without error while
    Interface is not taking value and raise duplicate message error,
    which is APPS-FND-01206
    Please Advice.

    Thanks for supporting dunacan
    I have mentioned both of segment detail . please advice,
    1.One is Job No segment
    Segment1 number 10
    Required Check Yes
    Value set Info JOB_NO
    List Type : List of Values
    Security Type : No Security
    Format Validation : select number 7,0 and check on number only (0-9)
    Validation Type Independent
    2.One is Job Name segment
    Segment2 number 20
    Required Check Yes
    Value set Info JOB_NAME
    List Type : List of Values
    Security Type : No Security
    Format Validation : select CHAR 60 Validation Type Independent
    It was strange that how could it possible duplication value without having database,i am unable to find this issued,
    Edited by: oracle0282 on Jan 17, 2011 3:32 AM

  • Error while inserting records in sqlLite database

    Hi all
    I am building a hybrid web app in SMP using phonegap and html.
    I am trying to insert records in sql database but i get an error with an undefined error code
    Please see below :
    function openDatabaseFoo() {
      db = window.openDatabase(clientDBName, clientDBVersion, clientDBDisplayName, clientDBMaxSize);
    function createDBTables() {
      db.transaction(function(tx) {
      // Create mine table
      var fooCreate = 'CREATE TABLE IF NOT EXISTS ' + fooTable+ ' (empNo, empName)';
      tx.executeSql(fooCreate , [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessfully created';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error creating table = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    the creation of tables is happening properly because i am getting a success message in the alerts.
    I am getting the error when i am trying to insert records in the above table
    function insertDataTable(){
    db.transaction(function(tx) {
    var insertSql = 'INSERT INTO ' + fooTable + ' (empNo, empName) VALUES ("1603","baker")';
    tx.executeSql(insertSql, [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessful insertingdata.';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error inserting data sql = " + insertSql + " Error code = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    can some one please help.Also guide me where can i check the sqlLite database logs to see more about the error.
    I would really appreciate the help.I have been onto this since past few days now
    Regards
    Shweta

    What is err.code, or the value of msg when the error occurs?
    Thanks,
    Andrew.

  • Error while inserting record into database using BPEL

    I am trying to read from an xml file using a File Adapter and insert the values read into a database (by invoking a database adapter).
    I formed the BPEL Process in the following manner:
    1.Receive activity to receive the values read from the file
    2.Assign activiuty to assign the values read to the Database input variable
    3.Invoke activity to invoke the Database adapter.
    The process deploys fine although with a warning : Trying to assign incompatible types.
    But when the process is executed, it is faulting at the invoke stage.
    The error i am getting is :
    <messages><input><InvokeDBInput><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmployeesCollection"><EmployeesCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
    <ns0:Employees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio10133\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
         <Name>John Smith</Name>
         <Email>[email protected]</Email>
         <Department>Finance</Department>
         <Designation>Accountant</Designation>
         <Grade>5</Grade>
    </ns0:Employees>
    </EmployeesCollection>
    </part></InvokeDBInput></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="summary"><summary>file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FileToDBTest1_3.5_1558cd90a5c3c9708cd747f1b3638054.tmp/SaveToDB.wsdl [ SaveToDB_ptt::insert(EmployeesCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Mapping Not Found Exception.
    The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
    ; nested exception is:
         ORABPEL-11627
    Mapping Not Found Exception.
    The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
    Make sure that the input xml is valid relative to the xsd and that the mapping exists in the Mappings.xml. If an old version of the descriptor without this mapping has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this attribute/mapping.
    </summary>
    </part><part name="detail"><detail>null</detail>
    </part></bindingFault></fault></messages>
    The xml and xsd files i have used are these:
    XML File (Employee.xml ) :
    <?xml version="1.0" encoding="UTF-8"?>
    <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio1013\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB">
         <Name>John Smith</Name>
         <Email>[email protected]</Email>
         <Department>Finance</Department>
         <Designation>Accountant</Designation>
         <Grade>5</Grade>
    </person>
    Schema file : (emp.xsd) :
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xmlns.oracle.com/filetoDB"
    xmlns="http://xmlns.oracle.com/filetoDB"
    elementFormDefault="qualified">
    <xs:element name="person">
    <xs:complexType>
    <xs:sequence>
         <xs:element name="Name" type="xs:string"/>
         <xs:element name="Email" type="xs:string"/>
         <xs:element name="Department" type="xs:string"/>
         <xs:element name="Designation" type="xs:string"/>
         <xs:element name="Grade" type="xs:integer"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element></xs:schema>
    can someone help me out?

    I figured where i was going wrong...added a transform activity after the assign activity to map the file input fieds to the database columns. Now it works fine.

  • Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?

    Hi team,
    How resolve the below error 
    Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?
    Thanks,
    Ram
    RAM

    Hi team,
    How resolve the below error 
    Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?
    Thanks,
    Ram
    RAM
    There can be two reasons
    1. The insert script used is having multiple instances of the records with Key as 12610 returned from the source query. If this is the issue add a logic to include only the unique set of id values for records by avoiding duplicates. There are several approaches
    for this like using ROW_NUMBER with PARTITION BY, using a join with derived table etc
    2. The record with Key 12610 already exist in your destination table and your script is again trying to insert another instances of record with same key. This can be avoided by adding a NOT EXISTS condition with a subquery which will check and return only
    those records which doesnt already exist in the source
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Violation of PRIMARY KEY constraint 'XPKLocalizedLabel'. Cannot insert duplicate key in object 'MetadataSchema.LocalizedLabel'.

    Hello everyone,
    I am getting the following error while importing the CRM 2013 managed solution, Does anyone have any idea regarding this, What could be the possible cause for this ?
    "Violation of PRIMARY KEY constraint 'XPKLocalizedLabel'. Cannot insert duplicate key in object 'MetadataSchema.LocalizedLabel'. The duplicate key value is (184191c0-1d6f-e411-9400-e41f13be2efc, 25a01723-9f63-4449-a3e0-046cc23a2902, 0,
    Jan 1 1900 12:00AM). The statement has been terminated."
    and this guids in the error message is different from organization to organization. Where it is having fix with the solution or organization ?
    please help me to solve this.
    Thanks in advance, Veeresh

    Hi All,
    I have exported one unmanaged solution from my development CRM system and imported in to production, while importing i am getting the following error. 
    "Violation of PRIMARY KEY constraint 'XPKLocalizedLabel'. Cannot insert duplicate key in object 'MetadataSchema.LocalizedLabel'. The duplicate key value is (184191c0-1d6f-e411-9400-e41f13be2efc, 25a01723-9f63-4449-a3e0-046cc23a2902,
    0, Jan 1 1900 12:00AM).
    The statement has been terminated."
    The key point i have noticed here is, recently i have updated my CRM system with server pack 1 and development organization is created after the server pack is installed and production organization is created before the server pack is installed. and
    i have tried this in some other organization which is created before the server pack 1 installed it is failed there also and some organization which is created after the server pack 1 is installed it is imported successfully.
    so i can see here it is not able to import solution into organization which is created before server pack 1 is installed from which is created after the server pack 1 is installed.
    please help me to solve this error.
    Thanks,
    Veeresh
    Thanks in advance, Veeresh

  • [SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is

    I have migrated my SCCm 2007 environment to SCCM 2012 SP1 CU4.
    I noticed in the System Status\Component Status\SMS_STATE_SYSTEM a lot of errors like the one below:
    Microsoft SQL Server reported SQL message 2627, severity 14: [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is (1, 0, S0220438, 0). : spUpdateClassi
    Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
    When looking up the deployment ID and recreate the Deployment the problem is solved. But I have 700 packages and don't want to manually do this action on all packages. I think it is related to the migration i did and something went wrong there :-(
    Besides it will retriggers the deployment to the clients which is also not preferred.
    Is there another way to solve this by e.e.g do something directly in the SQL database tables ?

    Hi,
    It is not supported by Microsoft that do something directly in SQL database.
    If you want to do that, you could make a call to CSS.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SQL Exception Error while Inserting

    hi i m getting this error while inserting
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("APPS"."XXGEN_BAND5_ASSESSMENT_DETAILS"."PERSON_ID")

    While you are inserting value to the table.You are not passing PERSON_Id value which is the primary key in your table.If your page is EO based then while you are initializing the VO based on that EO.You are not setting the value of Person_id prior to commiting the data.
    Hope it helps!!!
    Thanks
    AJ

  • Error while Inserting DB

    Hi,
    We are getting the below error while inserting a record in to DB. It is not occuring always, as sometimes the transactions are passing and some times it is throwing the below error. Any one faced this issue and have solution for the same?
    The invocation resulted in an error: <jca-transport-application-error xmlns="http://www.bea.com/wli/sb/transports/jca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <jca-transport-error-message>Invoke JCA outbound service failed with application error</jca-transport-error-message>
    <jca-runtime-fault-detail>
    <eis-error-code xsi:nil="true"/>
    <eis-error-message xsi:nil="true"/>
    <exception>com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invokeOneWay(JCATransportOutboundOperationBindingServiceImpl.java:114)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendOneWay(JCATransportEndpoint.java:191)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:168)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
    at sun.reflect.GeneratedMethodAccessor900.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy142.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:380)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.post(JCABindingReferenceImpl.java:197)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invokeOneWay(JCATransportOutboundOperationBindingServiceImpl.java:109)
    ... 37 more
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceProcessor_1.00/src/osb/resources/wsdls/Service_DB_Write_1.00 [ ServiceDBAdp_ptt::insert(SampleMiddlewareLogCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    ; nested exception is:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:662)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:353)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:312)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:291)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:345)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.post(JCABindingReferenceImpl.java:195)
    ... 38 more
    Caused by: BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [ServiceDBAdp.SampleMiddlewareLog].
    Caused by java.lang.ArrayIndexOutOfBoundsException.
    Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake.
    at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:682)
    at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:648)
    at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:696)
    at oracle.tip.adapter.db.DBInteraction.executeOutboundWrite(DBInteraction.java:1056)
    at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:240)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:529)
    ... 43 more
    Caused by: java.lang.ArrayIndexOutOfBoundsException</exception>
    </jca-runtime-fault-detail>
    </jca-transport-application-error>.
    Thanks

    Hi
    Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array you are sending.
    make sure your table can able to recieve that array of data

  • Error while adding record

    I am getting the following error while adding record into the table CM_RECIPE_ITEM :
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.
    Thanking You,
    Yogesh
    CM_RECIPE_ITEM Table
    CRI_ID------CRI_CR_ID--------CRI_BOM_CODE--------CRI_CIFG_CODE---------CRI_CIRM_CODE--------CRI_SEQ--------CRI_QTY--------CRI_RM_COST
    625----------464-----------------PRODUCT3001----------FG003----------------------10---------------------------1-------------------60-----------------10
    626----------464-----------------PRODUCT3001----------FG003----------------------12---------------------------2-------------------40------------------10
    Global temporary table
    DROP TABLE COSTMAN.INTERIM CASCADE CONSTRAINTS;
    CREATE GLOBAL TEMPORARY TABLE COSTMAN.INTERIM
    ROW_ID ROWID
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    BEGIN
    INSERT INTO interim VALUES (:new.rowid);
    END;
    Trigger to update data on CM_RECIPE table
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3_AFTER"
    AFTER INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    BEGIN
    FOR ds IN (SELECT row_id FROM interim) LOOP
    UPDATE CM_RECIPE
    SET CR_RMC = (
    SELECT SUM(CRI_QTY * CRI_RM_COST)/SUM(CR_QUANTITY)
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = CR_BOM_CODE
    AND rowid = ds.row_id
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (
    SELECT CIFG_PACKING + CIFG_OVERHEAD +CIFG_OTHERS
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id
    ) + CR_RMC;
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN =
    (SELECT CIFG_DP_RATE
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id) - CR_TOTAL_COST) / CR_TOTAL_COST;
    END LOOP;
    END;
    /

    yogeshyl wrote:
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.The error message points to the trigger...

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • 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

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

  • Error while saving record "User:johndoe":     Error -14071

    I have added my augmented users from the AD server. When I select user and to apply a setting under Preferences I get this on attempting an "Apply", Error while saving record "User:johndoe":Error -14071. I'm authenticating to my LDAP not AD/All Domains.
    I have the server bound correctly to the AD server. Bound to AD, then promoted to OD master.
    Tried WGM from another Mac, same error.
    I recall my AD admin extending the ad schema last year for OS X 10.4.
    Thoughts? Thanks.

    Thanks David and Mabel, and all for the suggestions. I did go through "Leveraging Active..." prior to posting. I did try your method of canceling the authorization to WGM and viewing Directories. I would select a user from this method and try to apply something from MCX, but still got the -14070 error. Yes, I do have my client bound 1st OD, 2nd AD, with OD first on the search policy for the client.
    I though I had solved my issue by authenticating to WGM and LDAP. Then selecting Groups and the Members tab, I define an OD group and select that group. I can then click the "+" towards the right of the window. Then select my AD there which populates. I can add my AD groups or single users to my OD group. Then I'm able to apply MCX settings. But, no "blue" circle next to the group's silhouette. How is my method possibly incorrect?
    Also, at some point I unbound my client from AD and it seems the client is ok with getting AD info off my OD server. Example, my AD sharepoint mounts for PHD.
    But, I do have a pause of 20 secs. are more when logging into the client as well as accessing applications. Side effect of my method?

  • Error while Inserting message in JMS

    Version : SOA 11G
    I am getting following error while inserting message in JMS.
    rror Message: {http://schemas.oracle.com/bpel/extension}bindingFault
    Fault ID     default/TestingSOA!2.0*soa_3b8b3493-6062-457c-8213-5dd613c95dd3/TransformData/30014-BpInv0-BpSeq0.3-4
    Fault Time     06-Dec-2010 03:25:10
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Produce_Message' failed due to: ERRJMS_ERR_CR_QUEUE_PROD. ERRJMS_ERR_CR_QUEUE_PROD. Unable to create Queue producer due to JMSException. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>[JMSExceptions:045103]While trying to find a topic or a queue we could not find the specific JMSServer requested. The linked exception may contain more information about the reason for failure.</detail></part><part name="code"><code>null</code></part></bindingFault></bpelFault>
    Steps followed while creating JMS
    1. Login to weblogic console
    2. Click Services>Messaging>JMS Module
    3. Select SOAJMSModule
    4. Click new, select Queue and press Next
    5. Give JMS Name and JNDI
    5. Pick Subdepolyment as "SOASUBDeployment" from dropdown and select JMS Server as "SOAJMSServer" and click "Finish"

    Steps followed while creating JMS
    +1. Login to weblogic console+
    +2. Click Services>Messaging>JMS Module+
    +3. Select SOAJMSModule+
    +4. Click new, select Queue and press Next+
    +5. Give JMS Name and JNDI+
    +5. Pick Subdepolyment as "SOASUBDeployment" from dropdown and select JMS Server as "SOAJMSServer" and click "Finish"+
    Next u need to create Connection Factory and u need to update or create(if doesnt exist) a new plan.xml
    Follow the below link:
    http://www.packtpub.com/article/installation-configuration-oracle-soa-suite-11g-2

Maybe you are looking for

  • Safari 2.0.4 crashes often but not always

    here enclosed the report, can you help me?? Date/Time: 2007-07-14 12:12:52.196 +0200 OS Version: 10.4.10 (Build 8R218) Report Version: 4 Command: Safari Path: /Applications/Safari.app/Contents/MacOS/Safari Parent: WindowServer [105] Version: 2.0.4 (4

  • Font not appearing as it should

    Hi all! I am currently working on an Arabic project and within it I am using a Nastaliq font [a sort of persian typeface]. In Microsoft Word, the font is perfect. It appears as it should be with all of the correct kashidas [extensions within Arabic w

  • Password check failed fatal error system halted CNU9384PJY

    BOOTING ENTER CURRENT PASSWORD THREE TIMES GOES TO PASSWORD CHECK FAILED FATAL ERROR SYSTEM HALTEDCNU9384PJY AFTER NETBOOK SET UP FOR A WHILE THANKS FOR ANY HELP

  • Tools for Mobile App Development with HTML5/CSS

    Hi -- I am interested in learning to develop cross platform mobile apps using HTML5 and CSS. Which Adobe product(s) (and other tools) are best for this? I'm guessing that Apache Cordova and Adobe PhoneGap Build are places to start but I'm looking for

  • Why is my data showing up on my moms phone? where is all her data

    i updated my moms phone on my sreen name on itunes and now all her info is gone....even on her itunes. where is it at?