Updating an Oracle table during activesync

Hi all,
I have an Oracle table resource that has a row for each user in IDM. I need to update certain columns in the table as each user is processed by activesync. The table resource is not assigned to the user. Has anyone had to do this type of thing for one of their projects?
Thank you very much!

vonereen wrote:
I have an Oracle table resource that has a row for each user in IDM. I need to update certain columns in the table as each user is processed by activesync. The table resource is not assigned to the user. Has anyone had to do this type of thing for one of their projects?If you want to use the standard IDM provisioning workflows and built-in tools then you will not be able to update the database row and column without assigning the resource to the user (directly or indirectly through a role). This is because IDM thinks the user has nothing to do with the resource and doesn't even bother trying to update it.
There are several ways around it. The "easiest" way is to use the FormUtil class to get the resource object, get the resource adapter and finally the connection itself. With that connection you can perform standard JDBC SQL operations.
Here's how you get the direct database connection to your resource:
<invoke name="getConnection">
    <invoke name="getDelegate">
        <invoke name="getAdapterProxy" class="com.waveset.adapter.ResourceAdapterBase">
            <invoke class='com.waveset.ui.FormUtil' name='getObject'>
                <invoke name='getLighthouseContext'>
                    <rule name='EndUserRuleLibrary:getCallerSession'/>
                </invoke>
                <s>Resource</s>
                <s>Your Resource Name</s>
            </invoke>
            <invoke name='getLighthouseContext'>
                <rule name='EndUserRuleLibrary:getCallerSession'/>
            </invoke>
        </invoke>
    </invoke>
</invoke>With that you should be able to produce whatever you need to update the table. You'll still have to update the form or workflow to execute some JDBC updates but that's just standard java invokes.

Similar Messages

  • Jython error while updating a oracle table based on file count

    Hi,
    i have jython procedure for counting counting records in a flat file
    Here is the code(took from odiexperts) modified and am getting errors, somebody take a look and let me know what is the sql exception in this code
    COMMAND on target: Jython
    Command on source : Oracle --and specified the logical schema
    Without connecting to the database using the jdbc connection i can see the output successfully, but i want to update the oracle table with count. any help is greatly appreciated
    ---------------------------------Error-----------------------------
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 45, in ?
    java.sql.SQLException: ORA-00936: missing expression
    ---------------------------------------Code--------------------------------------------------
    import java.sql.Connection
    import java.sql.Statement
    import java.sql.DriverManager
    import java.sql.ResultSet
    import java.sql.ResultSetMetaData
    import os
    import string
    import java.sql as sql
    import java.lang as lang
    import re
    filesrc = open('c:\mm\xyz.csv','r')
    first=filesrc.readline()
    lines = 0
    while first:
    #get the no of lines in the file
    lines += 1
    first=filesrc.readline()
    #print lines
    ## THE ABOVE PART OF THE PROGRAM IS TO COUNT THE NUMBER OF LINES
    ## AND STORE IT INTO THE VARIABLE `LINES `
    def intWithCommas(x):
    if type(x) not in [type(0), type(0L)]:
    raise TypeError("Parameter must be an integer.")
    if x < 0:
    return '-' + intWithCommas(-x)
    result = ''
    while x >= 1000:
    x, r = divmod(x, 1000)
    result = ",%03d%s" % (r, result)
    return "%d%s" % (x, result)
    ## THE ABOVE PROGRAM IS TO DISPLAY THE NUMBERS
    sourceConnection = odiRef.getJDBCConnection("SRC")
    sqlstring = sourceConnection.createStatement()
    sqlstmt="update tab1 set tot_coll_amt = to_number( "#lines ") where load_audit_key=418507"
    sqlstring.executeQuery(sqlstmt)
    sourceConnection.close()
    s0=' \n\nThe Number of Lines in the File are ->> '
    s1=str(intWithCommas(lines))
    s2=' \n\nand the First Line of the File is ->> '
    filesrc.seek(0)
    s3=str(filesrc.readline())
    final=s0 + s1 + s2 + s3
    filesrc.close()
    raise final

    i changed as you adviced ankit
    am getting the following error now
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 37, in ?
    java.sql.SQLException: ORA-00911: invalid character
    here is the modified code
    sourceConnection = odiRef.getJDBCConnection("SRC")
    sqlstring = sourceConnection.createStatement()
    sqlstmt="update tab1 set tot_coll_amt = to_number('#lines') where load_audit_key=418507;"
    result=sqlstring.executeUpdate(sqlstmt)
    sourceConnection.close()
    Any ideas
    Edited by: Sunny on Dec 3, 2010 1:04 PM

  • Real time update in Oracle Table

    Hi Friends,
    I have a new requirement (challenging) and i need your inputs to proceed further.
    User is expecting an real time update in Oracle Table.
    Example:
    I have an Oracle (10g) table DDSX-CALENDAR table. whenever a record(new) gets inserted into this table, i need to take this record and update the other oracle table (10g) existing in a different environment (schema and server).
    Please let me your inputs about handling this requirement.
    Thanks for your time.
    Regards,
    Diwakar Dayalan

    Thanks Prasath.
    I beleive for setting up the DBlink the user needs to have DBA role.
    How do we know the data has been inserted into the source, do i need to use a trigger for that ?
    In which way i can use the DB link inside a trigger to update the values in the target table.
    Example
    My source tables is
    DDSX_STR_BANK
    Store Number Bank Name Bank Account Number
    0001 BOA 111111111111 (assume previous value is 222222222222 )
    0002 BOA 222222222222 (assume previous value is 111111111111).
    Now two store numbers have got its bank account number updated in the source and the value is inserted, Now my requirement is once the value is inserted in the source, i need to update bank account number in SSDX_STR_BANK table in a different server and schema.
    SSDX_STR_BANK
    Store Number Bank Account Number
    0001 222222222222
    0002 111111111111
    Update the bank account numbers in Sync with the DDSX_STR_BANK.
    Please guide me how to proceed with this requirement.
    Thanks,
    Divakar

  • Updating an oracle table with data from an xml string

    Hi - I need help with the following problem:
    We have a table in the database with a field of xml type. We are going to take each string that gets inserted into the xml type field in the 'xml table' and parse the data into another oracle table with corresponding fields for every element.
    once the record gets inserted into the 'real table' the user might want to update this record they will then insert another record into the 'xml table' indicating an update(with a flag) and then we need to update the 'real table' with the updated values that have been sent in.
    The problem that I am having is that I do not know how to create this update statement that will tell me which fields of the table need to be updated.(only the fields that need to be updated will be in the xml string in the 'xml table').
    Please help me with this - ASAP!

    Are you wanting to upload the file through an Oracle Form or just upload a file? If it isn't via forms, then you should probably post your question here: {forum:id=732}
    You also should post the version of Forms, Database, etc...
    As far as uploading files via a text file, I personally like to use Oracle External Tables even in Forms. You can Google that and there is plenty of information. If you search this forum, then you will see lots of people use UTL_FILE in forms, but you can Google that also for more information.

  • Multiple Updates on Oracle Table

    I am performing multiple updates on an Oracle table that has 4 million records. Currently I am performing the updates serially like mentioned below:
    update test set zone='2' where zone='002';
    update test set zone='2' where zone='102';
    update test set zone='2' where zone='132';
    update test set zone='2' where zone='2';
    update test set zone='2' where zone='202';
    update test set zone='2' where zone='242';
    update test set zone='2' where zone='302';
    update test set zone='3' where zone='003';
    update test set zone='3' where zone='103';
    update test set zone='3' where zone='133';
    update test set zone='3' where zone='203';
    update test set zone='3' where zone='243';
    update test set zone='3' where zone='3';
    update test set zone='3' where zone='303';
    update test set zone='4' where zone='004';
    update test set zone='4' where zone='104';
    update test set zone='4' where zone='134';
    update test set zone='4' where zone='204';
    update test set zone='4' where zone='244';
    update test set zone='4' where zone='304';
    update test set zone='4' where zone='4';
    update test set zone='5' where zone='005';
    update test set zone='5' where zone='105';
    update test set zone='5' where zone='135';
    update test set zone='5' where zone='205';
    update test set zone='5' where zone='245';
    update test set zone='5' where zone='305';
    update test set zone='5' where zone='5';
    update test set zone='6' where zone='006';
    update test set zone='6' where zone='106';
    update test set zone='6' where zone='136';
    update test set zone='6' where zone='206';
    update test set zone='6' where zone='246';
    update test set zone='6' where zone='306';
    update test set zone='6' where zone='6';
    update test set zone='7' where zone='007';
    update test set zone='7' where zone='107';
    update test set zone='7' where zone='137';
    update test set zone='7' where zone='207';
    update test set zone='7' where zone='247';
    update test set zone='7' where zone='307';
    update test set zone='7' where zone='7';
    update test set zone='8' where zone='008';
    update test set zone='8' where zone='108';
    update test set zone='8' where zone='138';
    update test set zone='8' where zone='208';
    update test set zone='8' where zone='248';
    update test set zone='8' where zone='308';
    update test set zone='8' where zone='8';
    update test set zone='2' where zone='02';
    update test set zone='3' where zone='03';
    update test set zone='4' where zone='04';
    update test set zone='5' where zone='05';
    update test set zone='6' where zone='06';
    update test set zone='7' where zone='07';
    update test set zone='8' where zone='08';
    update test set zone='44' where zone='044';
    update test set zone='44' where zone='224';
    update test set zone='45' where zone='045';
    update test set zone='46' where zone='046';
    update test set zone='46' where zone='226';
    update test set zone=null where zone='0';
    update test set zone=null where zone='09';
    update test set zone=null where zone='10';
    update test set zone=null where zone='11';
    update test set zone=null where zone='12';
    update test set zone=null where zone='A ';
    update test set zone=null where zone=' ';
    How can I perform these updates more effeciently and faster? Is there anything I could do to fine tune these updates?
    Thanks

    is zone varchar2(3) ?
    Verify if following Uppercase updates replace your previous updates
    update test set zone='2' where zone='002';
    update test set zone='2' where zone='102';
    update test set zone='2' where zone='132';
    update test set zone='2' where zone='202';
    update test set zone='2' where zone='242';
    update test set zone='2' where zone='302';
    update test set zone='3' where zone='003';
    update test set zone='3' where zone='103';
    update test set zone='3' where zone='133';
    update test set zone='3' where zone='203';
    update test set zone='3' where zone='243';
    update test set zone='3' where zone='303';
    update test set zone='4' where zone='004';
    update test set zone='4' where zone='104';
    update test set zone='4' where zone='134';
    update test set zone='4' where zone='204';
    update test set zone='4' where zone='244';
    update test set zone='4' where zone='304';
    update test set zone='5' where zone='005';
    update test set zone='5' where zone='105';
    update test set zone='5' where zone='135';
    update test set zone='5' where zone='205';
    update test set zone='5' where zone='245';
    update test set zone='5' where zone='305';
    update test set zone='6' where zone='006';
    update test set zone='6' where zone='106';
    update test set zone='6' where zone='136';
    update test set zone='6' where zone='206';
    update test set zone='6' where zone='246';
    update test set zone='6' where zone='306';
    update test set zone='7' where zone='007';
    update test set zone='7' where zone='107';
    update test set zone='7' where zone='137';
    update test set zone='7' where zone='207';
    update test set zone='7' where zone='247';
    update test set zone='7' where zone='307';
    update test set zone='8' where zone='008';
    update test set zone='8' where zone='108';
    update test set zone='8' where zone='138';
    update test set zone='8' where zone='208';
    update test set zone='8' where zone='248';
    update test set zone='8' where zone='308';
    UPDATE TEST SET ZONE=SUBSTR(ZONE,3) WHERE SUBSTR(ZONE,1,2) IN ('10','13','20','24','30')
    update test set zone='2' where zone='2';
    update test set zone='3' where zone='3';
    update test set zone='4' where zone='4';
    update test set zone='5' where zone='5';
    update test set zone='6' where zone='6';
    update test set zone='7' where zone='7';
    update test set zone='8' where zone='8';
    UPDATE TEST SET ZONE=ZONE WHERE ZONE IN ('2','3','4','5','6','7','8') -- SAME VALUE why update ???
    update test set zone='2' where zone='02';
    update test set zone='3' where zone='03';
    update test set zone='4' where zone='04';
    update test set zone='5' where zone='05';
    update test set zone='6' where zone='06';
    update test set zone='7' where zone='07';
    UPDATE TEST SET ZONE=SUBSTR(ZONE,2) WHERE SUBSTR(ZONE,1,1) = '0'
    update test set zone='44' where zone='044';
    update test set zone='44' where zone='224';
    UPDATE TEST SET ZONE='44' WHERE ZONE IN ('044','224')
    update test set zone='45' where zone='045';
    UPDATE TEST SET ZONE='45' WHERE ZONE='045';
    update test set zone='46' where zone='046';
    update test set zone='46' where zone='226';
    UPDATE TEST SET ZONE='46' WHERE ZONE IN ('046','226')
    update test set zone=null where zone='0';
    update test set zone=null where zone='09';
    update test set zone=null where zone='10';
    update test set zone=null where zone='11';
    update test set zone=null where zone='12';
    update test set zone=null where zone='A ';
    update test set zone=null where zone=' ';
    UPDATE TEST SET ZONE=null WHERE ZONE IN ('0','09','10','11','12','A ',' ')if so build a single update
    update test
       set zone = case when SUBSTR(ZONE,1,2) IN ('10','13','20','24','30') then SUBSTR(ZONE,3)
                       when SUBSTR(ZONE,1,1) = '0'                         then SUBSTR(ZONE,2)
                       when ZONE IN ('044','224')                          then '44'
                       when ZONE='045'                                     then '45'
                       when ZONE IN ('046','226')                          then '46'
                       when ZONE IN ('0','09','10','11','12','A ',' ')     then null
                  endonly you know all your zone values (very sensitive to zone addition) add length(zone) conditions if necessary
    Regards
    Etbin

  • How to update an Oracle table from SSIS

    Hi there
    I've been working in a SSIS project where I need to update a table in an Oracle database that is located in a remote server. Until now I have used the OLE DB COMMAND to do this in a sql server database. To access the data that belongs to the Oracle database
    I am using an OCDB task, but this component does not work with an OLE DB COMMAN and I also need to do an inner join with a table in SQL.
    This is the schema of the query that I need to perform:
    UPDATE OT
    SET
    OT.COLUMN1= ST.COLUMN1,
    OT.COLUMN2= ST.COLUMN2,
    OT.COLUMN3= ST.COLUMN3,
    OT.COLUMN4= ST.COLUMN4,
    FROM
    ORACLE_TABLE AS OT INNER JOIN SQL_TABLE ST ON
    OT.COLUMN5 = ST.COLUMN5
    WHERE
    (((OT.COLUMN1) Is Null) AND
    ((ST.COLUMN2) In ('A1','A2','A3') AND
    ((ST.COLUMN3)<>'B1' Or (ST.COLUMN3) Is Null) AND
    ((ST.COLUMN7)=1));
    I am using Microsoft Visual Studio 2010.

    Hi dj2907,
    According to your description, I find that you ever asked a similar question in the forum, and I have answered it. The thread URL is there:
    https://social.technet.microsoft.com/Forums/en-US/aafd209f-56a0-4b09-9b82-0a57bcaa2448/ssis-updating-a-table-with-a-ole-db-command?forum=sqlintegratio
    Based on your current requirement, we should change your current provider to Microsoft OLE DB Provider for Oracle supported by Microsoft or Oracle Provider for OLE DB
    recommended by Microsoft to access the data in Oracle. Then we can directly use the OLE DB Connection Manager for OLE DB Command. The following similar thread is for your reference:
    http://stackoverflow.com/questions/5168772/update-a-row-in-oracle-using-oledb-commandssis
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Update the Oracle Table using BAPI

    Hi All,
        I would like to update Oracle Data Base with my custom BAPI using the Business Logic Transaction.
    Could any one please give me some logic how to do it?.
    Thanks
    R M

    RM,
    Please follow the steps below:
    1) Create and Configure the Data Server for the database you want to access/update (basically
        you are creating a database connection here).
    2) Save and test the connection by clicking the 'Status' button
    3) Create new query template with template type as 'SQL Query' and select the server you have
        configured in step#1
    4) Select the mode as 'Command' and type-in your Insert/Update statements in the 'Fixed Query'
        tab. For example: insert into yourtable values ('[Param.1]','[Param.2]')
    5) Test the query by passing parameters from the 'Parameters' tab. You are supposed to get a
        'Command Execution Successful'  message if the data is successfully posted to the database.
    6) Create a 'SQL Query' action block in your Business logic transaction to access the above query
        and map your Param.1, Param.2 etc. to your BAPI result (on the Link Editor).
    Hope this helps.
    John

  • Updateing oracle table Emp usering JDBC Adapter

    Hi,
    IS any one can help me what is the Format of JDBC Driver and Connection type.When we update a oracle table useing JDBC Adpater.
           Thanks in advance
    Regd's
    Raj

    Hi Raj,
    To access any Database from XI, you will have to install the corresponding Driver on your XI server.
    To install oracle driver, just check this link,
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    The details that have to be entered while adapter configuration if you are using the OJDBC14.jar
    The parameters should be mentioned as follows.
    Connection : <b>jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)></b>
    Driver : <b>oracle.jdbc.driver.OracleDriver</b>
    Also go through these links for more information regarding the same:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/4f34c587f05048adee640f4c346417/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm
    Regards,
    Abhy

  • How to update/query informix table for every update/query on Oracle table

    We have a system that can talk to only Oracle.
    Here, we have a certain program that updates an Oracle table thru a View of the Table. For every database operation on Oracle table View, we want to update a corresponding table in Informix database.
    Similarly for every query on the View of oracle table we want to query informix database and fetch the records from there.
    We want to use Oracle as a medium to access Informix.
    Can some one help me on how to do this ?
    Thanks

    You can use the Transparent Gateway for Informix to access Informix from an Oracle environment. The gateway makes the Informix database look like a remote Oracle database.
    You can take a look at the gateways page on OTN for more information on this. http://otn.oracle.com/products/gateways/content.html
    Look at the Certification matrix to ensure that you are using a certified configuration.

  • Updating all items of HTML itembox to Oracle table

    Hi friends,
    In my assignment,I need your help. I'm wondering how can I update all the items of my HTML itembox ,defined in one of the jsp page, to Oracle table.
    Thanks in advance.

    hsperhar wrote:
    Thanks ,in that I can deal with the servlet programming and collecting and updating the data in my oracle tables. But how would I collect the names/values of all the items of HTML itembox in my servlet/JSP, so that later I can update my oracle table with those string values.Method request.getParameter(String) will catch the selected items only of the itembox. How can I force the form to pass all the names of items of itembox to servlet. You need to pass them separately. But why do you need to do this? You already know at the server side which options are all in the dropdown. Simply because you couldn't have printed it to the response otherwise.
    Plus: how can we substract two arrays. I mean if A[]={1,2,3} & B[]={2,3} then how can I get C[]=A-B={1}Just write an utility method for that. Or use the Collections framework, the List API for example provides you a removeAll() method.

  • Export data from MS sql server table to an oracle table

    I need to move data from a sql server table to an oracle table and when ever the sql server table is updated it needs to automatically update the oracle table. Is there procedure to do this or do I migrate the data once and set up a trigger on the sql server table to update the oracle table? If the trigger is the answer how do I do that?

    You might want to check out Oracle's heterogeneous services functionality if you haven't done so already. Here are a few links:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/toc.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/majfeat.htm#sthref74
    Also, consulting the Oracle streams manual may be helpful -- particularly Chapter 5.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/toc.htm
    Perhaps someone who is more familiar with SQL Server could provide a more helpful answer.

  • Update another database table in Background

    Hi Experts,
    Need a solution to update an Oracle(10g) database which is outside of SAP box run as background job on a daily basis-  for e.g. daily Sales Orders should be updated in oracle table.
    Proposal 1: write direct to oracle tables using secondary database connection concept in ABAP.
    Proposal 2: expose a service from SAP and consume in Oracle.
    Proposal 3: engage XI/PI inbetween.
    Are there still more options suits this particular case? What are the measures that needs to be taken on account of performance?
    anticipating suggestions and guidence,
    -Nikhil Bose

    Hi Marea,
    pls check the documentation and the javadoc for jco
    http://service.sap.com/connectors
    example:
    function = this.createFunction("BAPI_MATERIAL_GETLIST");
                   if (function == null) {
                        System.out.println(
                             "BAPI_MATERIAL_GETLIST" + " not found in SAP.");
                        System.exit(1);
                   codes = function.getTableParameterList().getTable("MATNRSELECTION");
                   codes.appendRows(2); // Add two rows to internal table
                   codes.setValue("I", "SIGN");
                   codes.setValue("EQ", "OPTION");
                   codes.setValue("P1001087", "MATNR_LOW");
                   codes.setValue("", "MATNR_HIGH");
                   codes.nextRow(); // Move onto next row
                   codes.setValue("I", "SIGN");
                   codes.setValue("EQ", "OPTION");
                   codes.setValue("P1001088", "MATNR_LOW");
                   codes.setValue("", "MATNR_HIGH");
                   mConnection.execute(function);
    Regards, Jens

  • Using OleDbDataAdapter Update with InsertCommands and getting blocking locks on Oracle table

    The following code snippet shows the use of OleDbDataAdapter with InsertCommands.  This code is producing many inserts on the Oracle table and is now suffering from contention... all on the same table.  How does the OleDbDataAdapter produce
    inserts from a dataset... what characteristics do these inserts inherent in terms of batch behavior... or do they naturally contend for the same resource. 
    oc.Open();
    for (int i = 0; i < xImageId.Count; i++)
    // Create the oracle adapter using a SQL which will not return any actual rows just the structure
    OleDbDataAdapter da =
       new OleDbDataAdapter("SELECT BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, " +
       "DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE FROM sysadm.PS_RI_INV_PDF_MERG WHERE 1 = 2", oc);
    // Create a data set
    DataSet ds = new DataSet("documents");
    da.Fill(ds, "documents");
    // Loop through invoices and write to oracle
    string[] sInvoices = invoiceNumber.Split(',');
    foreach (string sInvoice in sInvoices)
        // Create a data set row
        DataRow dr = ds.Tables["documents"].NewRow();
        ... map the data
        // Populate the dataset
        ds.Tables["documents"].Rows.Add(dr);
    // Create the insert command
    string insertCommandText =
        "INSERT /*+ append */ INTO PS_table " +
        "(SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, " +
        "EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) " +
        "VALUES (INV.nextval, :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME,  " +
        ":BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)";
    // Add the insert command to the data adapter
    da.InsertCommand = new OleDbCommand(insertCommandText);
    da.InsertCommand.Connection = oc;
    // Add the params to the insert
    da.InsertCommand.Parameters.Add(":BUSINESS_UNIT", OleDbType.VarChar, 5, "BUSINESS_UNIT");
    da.InsertCommand.Parameters.Add(":INVOICE", OleDbType.VarChar, 22, "INVOICE");
    da.InsertCommand.Parameters.Add(":ASSIGNMENT_ID", OleDbType.VarChar, 15, "ASSIGNMENT_ID");
    da.InsertCommand.Parameters.Add(":END_DT", OleDbType.Date, 0, "END_DT");
    da.InsertCommand.Parameters.Add(":RI_TIMECARD_ID", OleDbType.VarChar, 10, "RI_TIMECARD_ID");
    da.InsertCommand.Parameters.Add(":IMAGE_ID", OleDbType.VarChar, 8, "IMAGE_ID");
    da.InsertCommand.Parameters.Add(":FILENAME", OleDbType.VarChar, 80, "FILENAME");
    da.InsertCommand.Parameters.Add(":BARCODE_LABEL_ID", OleDbType.VarChar, 18, "BARCODE_LABEL_ID");
    da.InsertCommand.Parameters.Add(":DIRECT_INVOICING", OleDbType.VarChar, 1, "DIRECT_INVOICING");
    da.InsertCommand.Parameters.Add(":EXCLUDE_FLG", OleDbType.VarChar, 1, "EXCLUDE_FLG");
    da.InsertCommand.Parameters.Add(":DTTM_CREATED", OleDbType.Date, 0, "DTTM_CREATED");
    da.InsertCommand.Parameters.Add(":DTTM_MODIFIED", OleDbType.Date, 0, "DTTM_MODIFIED");
    da.InsertCommand.Parameters.Add(":IMAGE_DATA", OleDbType.Binary, System.Convert.ToInt32(filedata.Length), "IMAGE_DATA");
    da.InsertCommand.Parameters.Add(":PROCESS_INSTANCE", OleDbType.VarChar, 10, "PROCESS_INSTANCE");
    // Update the table
    da.Update(ds, "documents");

    Here is what Oracle is showing as blocking locks and the SQL that has been identified with each of the SIDS.  Not sure why there is contention.  There are no triggers or joined tables in this piece of code.
    Here is the SQL all of the SIDs below are running:
    INSERT INTO sysadm.PS_RI_INV_PDF_MERG (SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) VALUES (SYSADM.INV_PDF_MERG.nextval,
    :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME, :BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1150 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1156 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX3
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 6 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1726 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 2016 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX2

  • I want to update date field in oracle table using database adaptor

    Hi Guys,
    I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
    Pure SQL Exception.
    Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    ORA-01830: date format picture ends before converting entire input string
    </detail>
    i am formated the date using following code and assigned to one variable.
    ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
    this is update query
    update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
    Please provide solution.
    regards
    janardhan

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • Problem refreshing an Oracle table in MapInfo that's been updated in Oracle

    Dear all
    I am doing some digitising work in MapInfo Professional 8, using a table stored in Oracle 10.2g. I have completed the bulk of my digitising and the polygons have been written back to the Oracle database without any issues.
    As I am working with several maps coving the same area, but from different dates, I have simply been copying the shapes from one field to another, for areas that are the same on other maps. This avoids having to digitise an area more than once.
    Here is an example of my table:
    map_index_id  original_map_publication_id  name_of_feature         geographical_coordinates
    5000840       200016                       NORTH STREET            MDSYS.SDO_GEOMETRY [1a]
    5000841       200016                       NORTH STREET QUADRANT   MDSYS.SDO_GEOMETRY [2a]
    5000843       200016                       OLD STEINE              MDSYS.SDO_GEOMETRY [3a]
    5000955       200021                       NORTH STREET            null [1b]
    5000956       200021                       NORTH STREET QUADRANT   null [2b]
    5000957       200021                       OLD STEINE              null [3b]The idea is that the geometry of 1a is copied to 1b, 2a to 2b and so on. The script I am using to do this, is as follows:
    undefine name_of_feature_to_be_used
    undefine name_of_feature_to_be_updated
    UPDATE MAP_INDEX  B
    SET (B.geographical_coordinates) =
    (SELECT A.geographical_coordinates
    FROM MAP_INDEX A
    WHERE A.original_map_publication_id=&&original_map_to_be_used
    AND A.name_of_feature='&&name_of_feature_to_be_used')
    WHERE B.original_map_publication_id=original_map_to_be_updated
    AND B.name_of_feature='&&name_of_feature_to_be_updated';That works okay. The problem I have is that whenever I make changes to the geographical_coordinates column, which is an sdo_geometry column, the changes are not then being picked up by MapInfo Professional when I click refresh DBMS table in that program.
    If I make additional changes in MapInfo and then save the table out, it simply wipes all the changes I have made in Oracle, using my above SQL script.
    I believe what happens when a table is first made mapping in MapInfo, is that MapInfo takes the Oracle sdo_column: geographical_coordinates and links this to a MapInfo column called obj , since MapInfo seems to only allow the spatial column to be called obj. All other columns are brought in using their Oracle names. What I think it isn't doing though, is relinking this column at any point afterwards.
    Am I correct and if so, does anyone have a away round this problem? I made my Oracle table "download table [link to Oracle]". Would keeping the table live, make any difference?
    Kind regards
    Tim

    Hi Ivan and everyone
    Thank you for your reply. The geometries are not always the same. I have now found out what the problem is and how to solve it and I will explain this for the benefit of others.
    When I update a spatial column for a row ,outside of MapInfo Professional 8, it is not picking up the updates.
    When I update a non-spatial column for a row, outside of MapInfo Professional 8, it is picking up the updates.
    When I update a non-spatial column and a geometry column for a row, outside of MapInfo Professional 8, it is picking up the updates for both columns.
    Therefore a solution to my problem is to create an additional non-spatial column, which I update everytime I copy the geometry values. Then when I refresh the table in MapInfo, it will pick up the geometry changes. I do not understand why MapInfo will not pick up the updates to the spatial columns on their own but it is not doing this.
    I did a test to see what would happen if I updated three rows where all three rows had there geometry values updated but only two rows had a non-spatial column value updated.
    When opened up the table in MapInfo, using the following MapInfo SQL:
    Select * From "user name here"."MAP_INDEX_FOR_MAPINFO_USE"
    WHERE not GEOGRAPHICAL_COORDINATES Is Null
    AND original_map_publication_id=200010
    AND original_map_sheet_number_id=330010it brought in only the two rows whose non-spatial column had been updated. The row where only it's spatial column was amended, was not brought in. There was no other rows brought in because no other row for that publication and sheet had been updated.
    Why this is occurring I do not know. It may be that issue was resolved in later versions of MapInfo. I am very happy to have found a solution to my problem. However I do feel it is something I should not be having to do in the first place, no matter how pleased I am to have found a solution.
    Kind regards
    Tim

Maybe you are looking for

  • Is it possible to create the ALV output with dropdown list for the columns

    Hi forum experts,                           Could the ALV output contain the dropdown list for the column names? if yes, then how we can acheive this to happen. Thanks in advance, Regards, Samad. Edited by: Samad arif on Aug 21, 2009 4:40 PM

  • Error in extended program check

    Hi, I m getting following error in Extended Program Check.. <b>The current ABAP command is obsolete Tables with headers are no longer supported in the OO context.</b> for the below declaration.. <b>data: I_fieldcatalog type  slis_t_fieldcat_alv WITH

  • Data Buffer Cache Error Message

    I'm using a load rule that builds a dimenson on the fly and getting the following error: "Not enough memory to allocate the Data Buffer Cache [adDatInitCacheParamsAborted]"I've got 4 other databases which are set up the same as this one and I'm not g

  • Essbase optimalization issue, slow

    Hi everyone, I have made a Planning application which has some larger forms which take over 4 min to open, which could be okay, but what puzzles me is that the Essbase server is not using any system resources when the forms are retrieved. CPU load go

  • Best way to set up Eclipse + Flex 4.5 SDK?

    I have followed this tutorial to set up Eclipse with the Flex 4.5 SDK. It leaves a lot to be desired.  In particular: * Setup is a pain and requires many steps * There doesn't appear to be any source code highlighting for MXML * There does not appear