Running Cursor script to update Oracle Table.

I have the following script. I have a cursor in which i perform an update operation on a oracle table. But The table "ICS_TRADE_DETAILS " is not getting updated. Am i doing something wrong? I get the correct values populated in the "lastChanged" and "tradeID" fields.
Help Appreciated !!!!
DECLARE
lastChanged VARCHAR2(32);
tradeID VARCHAR2(32);
CURSOR c1 IS
SELECT TRADEID,LASTCHANGED
from CVSELECT;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO tradeID,lastChanged
DBMS_OUTPUT.PUT_LINE('lastChanged: '||lastChanged);
DBMS_OUTPUT.PUT_LINE('tradeID: '||tradeID);
update ICS_TRADE_DETAILS
SET LASTCHANGED=lastChanged
WHERE CTRADEID=tradeID;
COMMIT;
EXIT WHEN c1%NOTFOUND;
END LOOP;
CLOSE c1;
END;

ji li wrote:
Is this related to someone else pulling data from the table(s) you are updating (and committing frequently)?
If so, wouldn't the undo segments hold enough of the changed data for the dataset to be consistent?
The reason I ask is because I've always been of the impression it was better to commit frequently as opposed to doing autonomous (all or none) processing.When you open a cursor, Oracle needs to fetch data as of that particular SCN. So if someone is potentially updating the table while you are reading data, you want to make sure that Oracle will have the UNDO data in hand to be able to get back to the old state. If you commit in the loop, however, Oracle now believes that your session is no longer interested in older UNDO data so it may well purge that data too quickly, causing ORA-01555 errors. Fetching across a commit is almost certainly a bad idea.
Commit frequency should be driven exclusively by logical units of work. If you have a loop, the logical unit of work is almost always the whole set of rows that you want to process. If processing dies in the middle, you're generally much better off having everything rolled back than in having half the rows processed and not knowing which half were processed and which half were not. If you are processing extremely large numbers of rows (i.e. data warehouse loads), it is sometimes worthwhile to code all the extra logic required to make the process restartable and to commit periodically in order to avoid situations where something dies 2 hours into a run and you have to spend another 2 hours rolling back those changes before you can restart. But that's the exception to the rule and generally only appropriate after spending quite a bit of effort performance tuning which would remove 99% of loops in the first place.
Justin

Similar Messages

  • Run repartition but no update to table RSDCUBE

    hi expert,
    i got a question about partition.
    i have some cube containing data without partition  and i don't want to delete the data then do the partition. so i run the repartition directly and i found that:
    after i ran the repartition , the table RSDCUBE didn't update the fields PARTMODE to 'X' but the fields (Partitioning time char. Lower limit (partitioning value) Upper Limit (Partitioning Value) and Maximum number of partitions) are updated.
    i am wondering if it will affect the system or it is OK?
    thank you!
    i have read the online help,here is the explaination:
    Repartitioning  
    Use
    Repartitioning can be useful if you have already loaded data to your InfoCube, and:
    ●      You did not partition the InfoCube when you created it.
    ●      You loaded more data into your InfoCube than you had planned when you partitioned it.
    ●      You did not choose a long enough period of time for partitioning.
    ●      Some partitions contain no data or little data due to data archiving over a period of time.
    it recommends that if you haven't do the partition, you can also use partition. the result is no update to table RSDCUBE. i am not sure if it will lead to any system dump or program error.
    Edited by: hongyu wang on Jan 21, 2011 7:23 AM

    Ok, in short:
    After repartitioning of an formely not partitioned Infocube you check the RSCUBE table and find that the flag PARTMODE is not set to 'X' as you would expect it.
    When you in turn create the infocube already partitioned, the flag is set accordingly.
    I tried this out and in fact, the repartitioning does not seem to set the flag (on Oracle).
    However, if you modify the IC afterwards again (e.g. change the description), save this and active the infocube then the flag is updated correctly.
    Also copying the infocube without the PARTMODE flag does lead to a new Infocube which - after saving and activating it - does have the flag set correctly.
    So in general: the flag doesn't seem to be used very much on Oracle  (instead it's much more important for DB6!) and you should be safe using it the way it works right now.
    regards,
    Lars

  • Updating Oracle table with info from Sybase query

    I hope this is the correct forum for this question.
    I am fairly new to Java and JDBC. I am trying to figure out what the best method for updating information in Oracle tables with data from a Sybase table. I would prefer to use Oracle’s transparent gateway but this is not an option my company will pay for so I am creating a java stored procedure and using JDBC to connect to the Sybase database.
    The process I think I need to go thru is
    1.     Query an Oracle table to get the records that need to be updated and the “key” information to query the Sybase table with.
    2.     Use that result to query the Sybase database to get the fields that need to be updated in the Oracle table for those records.
    3.     Update the records on the Oracle table with the data from the Sybase query.
    I know I can just do this procedurally, row-by-row, but I was wondering if anyone knows of a way to accomplish this with SQL and no loops. Is there a way to make a result set available as a “SQL table” for another JDBC query?
    Basically what I would like to do is:
    OraQuery = “ select sybinfo from sometable where updated_date = null”;
    Statement orastmt1 = OraConn.createStatement();
    ResultSet Orars1 = orastmt1.executeQuery (OraQuery);
    SybQuery = “select update_date, sybinfo from sybtable where sybinfo = Orars1.sybinfo”;
    Statement sybstmt = SybConn.createStatement();
    ResultSet Sybrs = sybstmt1.executeQuery (SybQuery);
    OraUpdate = “update (select update_date from sometable, Sybrs where sometable.sybinfo = Sybrs.sybinfo) set update_date = Sybrs.update_date”;
    Statement orastmt2 = OraConn.createStatement();
    ResultSet Orars2 = orastmt2.executeQuery (OraUpdate);
    This may not be possible but if anyone has done something similar and wouldn’t mind sharing I would appreciate it. If there is a “better” way of accomplishing this I am open to suggestions.
    Thanks

    you can try using cachedRowSet() for the Oracle side query.
    The rows in this could be populated using the sybase side query's resultset and then all of this could updated into Oracle in one shot.

  • J2ME app.: To update Oracle table by sending data through mobile phone

    Hello all,
    I want to develop a mobile app to update the table of oracle database by sending the data through the SMS (Short Message Service). Means I'll send a sms through my cellphone containing some data and this data will be used to update the remote oracle database. How to do that?. Plz help.
    Thanx in advance.

    hi
    My problem is here I need to update the loginfo table with the file name, count of records, table name and datetime.
    For instance my dat file is XX.dat
    my database table name is Mytable
    Total record count is 10,00,000 records
    datetime as on this date
    the data in the XX.dat file I am using the controlfile (SQL*loader and dumping into the Mytable.Now my 10,00,000 records are dumped into the Mytable.
    This process information I want to store it in the loginfo table. For this I need the trigger
    CREATE OR REPLACE TRIGGER MYTRIGG
    AFTER INSERT ON MYTABLE
    Declare
    V_Count Number;
    Begin
    Select count(*) into V_Count from Mytable;
    Insert into Loginfo(TotalRecords,Date)
    Values(V_Count,Sysdate);
    end;
    This is the trigger I have used.But in my loginfo table instead of one value as 10,00,000 it is getting each record as row by row
    1
    4
    100
    1000
    10,00,000
    So I need only one value to be stored and at the same time my tablename and filename must also be stored.
    Kindly help me
    suroop

  • Running shell scripts from within oracle. A big task is forgotten

    Dear List,
    I have some shell shell scripts which do some tasks on the linux OS level.
    I am calling the Korn scripts using a java class, which in turn is being called from a PLSQL function.
    All but one of the 10 script works fine. This is the script which does the most work, and takes on average 40 minutes usually.
    Why does Oracle forget the running of the shell script? I wait in my PLSQL function for the return code, but it never comes. The scripts I have not written myself !
    I look forward to your reply on this matter.
    regards
    Ben

    Hi
    If you are using the Oracle database 10g, the new dbms_scheduler package allows you to run shell scripts. The dbms_scheduler.create_job procedure have one parameter called the job_action in which you specify the full path of the shell script.
    I hope this will help

  • 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

  • Update oracle table using data through ODBC

    Hi,
    I want to update tables inside an Oracle 8i database.
    The updates depend on data in a mySql database that I want to approach using an ODBC connection.
    I cannot figure out what I need to do to select data from an ODBC source from an oracle session.
    What do I have to call this external table ...
    Edward

    The following link may be relevant. Check it out.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/server.817/a76960/hs_admin.htm

  • Updating oracle tables from sqlserver

    I wish to have replication from sqlserver 7.0 to oracle 8.1.7
    database done in real time. Since tranparent gateway only goes
    from oracle to sqlserver, I guess ODBC connectivity is the last
    resort. Are there any other tools or methods that I can
    accomplish this task.
    Thx
    Daniel

    Daniel,
    you can create snapshot for ms tables. Example:
    CREATE SNAPSHOT "KISELYOV"."SH_SEMIINPUT"
    PCTFREE 10 PCTUSED 40 MAXTRANS 255 STORAGE ( INITIAL 128K NEXT
    128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0 FREELISTS 1
    FREELIST GROUPS 1)
    TABLESPACE "USERS"
    BUILD IMMEDIATE
    REFRESH COMPLETE
    ON DEMAND
    AS
    select * from [email protected]
    where ho.world in my case is a database link for Interbase
    Server via ODBC.
    And you can refresh those snapshots when you need.
    Dmitry.

  • INSERT into Oracle table as SELECT from MS Access table

    I'm trying to pull some data across from an MS Access database. I really need to pick and choose what is coming across, so migration isn't what I need. I can connect to the Access DB from SQL Developer, export data and so forth. However, I can't seem to find a way to directly access data in the MDB file from an Oracle connection. The two options that I can think of which would be perfect (if they are possible) are:
    1. If it's possible to SELECT between two open connections in SQL Developer. I can (and have) had both my Oracle conection where I want the data to go and the source Access connection opened simultaneously, but I can't see any way to address a query from one connection to another.
    2. If it's possible to create the equivalent of a database link to the Access MDB file from within my Oracle database so that I can address the query via that.
    Right now I'm exporting individual tables from Access to files, then doing a bunch of Search and Replace operations to convert them to SQL scripts with INSERT statements in the format required, then running those scripts in my Oracle connection. It works, but is very slow and tedious.

    You need to create a database link based on Database Gateway for ODBC. This gateway allows you to connect from an Oracle database to a foreign data store using a 3rd party ODBC driver.
    A suitable 3rd party ODBC driver which allows you to connect from Oracle to MS Access is the ODBC driver from Microsoft available on Windows platforms - I'm not aware of any 3rd party ODBC driver for MS Access available on Unix platforms.
    So when using DG4ODBC on Windows you can connect from your Oracle database (even when the database resides on Unix) to DG4ODBC on Windows which then connects to the Ms Access database using the MS Access ODBC driver.
    There's a separate Forum for those configs:
    Heterogeneous Connectivity

  • Updating a table using cursor is taking long time in oracle

    Hi,
    I am working on the oracle database 11gR2. I am trying update a table column which is newly added through cursor. below is the cursor.
    BEGIN
         FOR lcur_tab IN (select l.LOGIN_ID as login_id, lt.ERROR_CODE as error_code from LOGIN l INNER JOIN LOGIN_TASK lt ON (l.LAST_LOGIN_TASK_ID = lt.LOGIN_TASK_ID) )
         LOOP
                   UPDATE ACCOUNT SET LOGIN_ERROR_CODE = lcur_tab.error_code where ACCOUNT_ID IN (SELECT ACCOUNT_ID FROM LOGIN_ACCOUNT where LOGIN_ID = lcur_tab.login_id ) ;
         end LOOP;
         commit;
    END;
    In the cursor we are trying to copy the Login table error_code value to LOGIN_ERROR_CODE of ACCOUNT Table, for the accounts associated with that Login. Here newly added column is LOGIN_ERROR_CODE in account table. this account table have 11million rows in it. when i used the above cursor it took 3hours and still running. So we stopped after that. Is there any way i can change this cursor syntax to update those column values. How can we do this type of updates?
    Also i am planning to run thus update in the background . I don't have much knowledge on the PL/SQL stuff. So please help on this.
    Thanks in advance.
    Edited by: Hari on Mar 21, 2012 10:06 PM

    Is there a reason that you don't want to do this with a single `UPDATE` statement? That should be quite a bit more efficient.
    Something like
    UPDATE account a
       SET login_error_code = (
          select lt.error_code
            from login_task lt
                 join login l on (l.last_login_task_id = lt.login_task_id)
                 join login_account la on (la.login_id = l.login_id)
           where la.account_id = a.account_id )
    WHERE EXISTS (
          select 1
            from login_task lt
                 join login l on (l.last_login_task_id = lt.login_task_id)
                 join login_account la on (la.login_id = l.login_id)
           where la.account_id = a.account_id );Justin

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • 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

  • Oracle 11gr2 ODBC - error updating linked table (Ora 01722 and 01461)

    Good day folks,
    My shop has just moved to 11gR2 client and server. We were previously using 11gR1 with no issues (and before that, 10, 9, 8, etc). After moving from 11r1 to 11r2, we began getting errors from some of our MS Access ODBC applications with linked Oracle tables. The error would occur when executing an UPDATE statement that had a table join in it. Here is a simple example:
    UPDATE TableX SET TableX.Fieldx = “valuex” WHERE TableX.Fieldx = TableZZZ.Fieldx AND TableZZZ.fieldzzz is not null
    Currently, after moving to 11r2 client, an update query like the one above will error out in one of the following ways:
    - odbc -- update on a linked table failed - Ora 01722 invalid number
    - ORA-01461: can bind a LONG value only for insert into a LONG column
    - Or it will say that the records were not updated because they are locked.
    In some cases, I have noticed some records being updated that were not supposed to be updated.. records that the where clause was meant to exclude. That is very unsettling.
    I understand that perhaps an update statement shouldn’t be joining table and perhaps it should be done over a couple calls, but the reality is – this code is out there in abundance and if there is a solution that doesn’t amount to my changing all this code or reverting to 11gR1, I would love to find it.
    Since the query runs fine using SQL Plus and also runs fine if I run it against a local table in Access rather than a linked Oracle table – I figured the issue was possibly with the Oracle 11r2 ODBC driver. So, I switched the Oracle ODBC driver (sqora32.dll version 11.2.0.1 with version 11.1.0.7), and the problem went away.
    I believe this verifies the issue resides with Oracle ODBC version 11.2.0.1. Can anyone help? I'm assuming it's not particularly wise to simply swap sqora32.dll files on all my clients machines, so I am searching for an actual solution here instead.
    I also did performed ODBC tracing to see what Access is handing to the Oracle ODBC driver. I then used database or SQLNet tracing to see what the ODBC driver was handing off to SQLNet/database.
    The results are in the following post:
    Thanks guys!!

    SQLNET TRACE
    If you want an Admin level trace, I can have one right away.
    (856) [13-JUN-2010 22:11:00:657] nsopen: opening transport...
    (856) [13-JUN-2010 22:11:00:657] nttcni: Tcp conn timeout = 60000 (ms)
    (856) [13-JUN-2010 22:11:00:657] nttcni: trying to connect to socket 1364.
    (856) [13-JUN-2010 22:11:00:688] nttcni: connected on ipaddr 142.139.221.62
    (856) [13-JUN-2010 22:11:00:688] nttcon: set TCP_NODELAY on 1364
    (856) [13-JUN-2010 22:11:00:688] nsopen: transport is open
    (856) [13-JUN-2010 22:11:00:688] nsnainit: inf->nsinfflg[0]: 0x61 inf->nsinfflg[1]: 0x61
    (856) [13-JUN-2010 22:11:00:688] nsopen: global context check-in (to slot 0) complete
    (856) [13-JUN-2010 22:11:00:688] nscon: doing connect handshake...
    (856) [13-JUN-2010 22:11:00:688] nscon: sending NSPTCN packet
    (856) [13-JUN-2010 22:11:00:688] nscon: sending 233 bytes connect data
    (856) [13-JUN-2010 22:11:00:688] nsdo: 233 bytes to NS buffer
    (856) [13-JUN-2010 22:11:00:719] nscon: got NSPTRS packet
    (856) [13-JUN-2010 22:11:00:719] nscon: sending NSPTCN packet
    (856) [13-JUN-2010 22:11:00:719] nscon: sending 233 bytes connect data
    (856) [13-JUN-2010 22:11:00:719] nsdo: 233 bytes to NS buffer
    (856) [13-JUN-2010 22:11:00:735] nscon: got NSPTAC packet
    (856) [13-JUN-2010 22:11:00:735] nscon: connect handshake is complete
    (856) [13-JUN-2010 22:11:00:735] nscon: nsctxinf[0]=0x61, [1]=0x21
    (856) [13-JUN-2010 22:11:00:735] nsnainconn: inf->nsinfflg[0]: 0x61 inf->nsinfflg[1]: 0x21
    (856) [13-JUN-2010 22:11:00:735] nsnasend: bytes to send: 158
    (856) [13-JUN-2010 22:11:00:735] nsdo: 158 bytes to NS buffer
    (856) [13-JUN-2010 22:11:00:735] nsnareceive: buffer address: 0x132c34 bytes wanted: 2048
    (856) [13-JUN-2010 22:11:00:735] nsnareceive: calling NS to receive 2048 bytes into address 0x132c34
    (856) [13-JUN-2010 22:11:00:766] nsdo: 153 bytes from NS buffer
    (856) [13-JUN-2010 22:11:00:766] nsnareceive: received 153 bytes
    (856) [13-JUN-2010 22:11:00:766] nsnareceive: no more data to receive - returning
    (856) [13-JUN-2010 22:11:00:766] nsnareceive: total bytes received: 153
    (856) [13-JUN-2010 22:11:01:063] nsnasend: bytes to send: 77
    (856) [13-JUN-2010 22:11:01:063] nsdo: 77 bytes to NS buffer
    (856) [13-JUN-2010 22:11:01:063] nsnareceive: buffer address: 0x132c34 bytes wanted: 2048
    (856) [13-JUN-2010 22:11:01:063] nsnareceive: calling NS to receive 2048 bytes into address 0x132c34
    (856) [13-JUN-2010 22:11:01:079] nsdo: 64 bytes from NS buffer
    (856) [13-JUN-2010 22:11:01:079] nsnareceive: received 64 bytes
    (856) [13-JUN-2010 22:11:01:079] nsnareceive: no more data to receive - returning
    (856) [13-JUN-2010 22:11:01:079] nsnareceive: total bytes received: 64
    (856) [13-JUN-2010 22:11:01:079] naun5authent: Authentication type is 0
    (856) [13-JUN-2010 22:11:01:079] nsnasend: bytes to send: 1862
    (856) [13-JUN-2010 22:11:01:079] nsdo: 1862 bytes to NS buffer
    (856) [13-JUN-2010 22:11:01:079] nsnareceive: buffer address: 0x132c34 bytes wanted: 2048
    (856) [13-JUN-2010 22:11:01:079] nsnareceive: calling NS to receive 2048 bytes into address 0x132c34
    (856) [13-JUN-2010 22:11:01:141] nsdo: 165 bytes from NS buffer
    (856) [13-JUN-2010 22:11:01:141] nsnareceive: received 165 bytes
    (856) [13-JUN-2010 22:11:01:141] nsnareceive: no more data to receive - returning
    (856) [13-JUN-2010 22:11:01:141] nsnareceive: total bytes received: 165
    (856) [13-JUN-2010 22:11:01:141] nsnasend: bytes to send: 33
    (856) [13-JUN-2010 22:11:01:141] nsdo: 33 bytes to NS buffer
    These lines are present using both version of sqora32.dll
    (856) [13-JUN-2010 22:11:01:141] nszgwop: SQLNET.WALLET_OVERRIDE not found, using default.
    (856) [13-JUN-2010 22:11:01:157] nscontrol: Vect I/O support: 0(856) [13-JUN-2010 22:11:01:391] nioqrc: Recieve: returning error: 3111
    (856) [13-JUN-2010 22:11:01:391] nsdo: sending NSPTMK packet
    (856) [13-JUN-2010 22:11:01:391] nserror: nsres: id=0, op=77, ns=12630, ns2=0; nt[0]=0, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    These lines only happen when using the R2 version of sqora32.dll
    (856) [13-JUN-2010 22:11:01:719] nioqrc: Recieve: returning error: 3111
    (856) [13-JUN-2010 22:11:01:719] nsdo: sending NSPTMK packet
    (856) [13-JUN-2010 22:11:01:860] nserror: nsres: id=0, op=0, ns=12630, ns2=0; nt[0]=0, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    (856) [13-JUN-2010 22:21:03:782] nstimarmed: no timer allocated

Maybe you are looking for

  • Trying to get my videos off iphone and onto a dvd

    So I have a few questions..if anyone can help its so much appreciated! I am trying to get my iphoto videos onto a dvd with my macbook pro. Just bought IDVD. I made a dvd with a few clips just to make sure it worked and it worked good except.... 1. Do

  • Where's the beef? I mean the audio...?

    When I export a movie from FCP with audio (it gives me the option) and then import it to LT the audio channels do not appear. What am I missing? Also, is there any upgrade for LT with newer Live Fonts and other stuff? Thanks, Carlos

  • CNN PipeLine for the Mac! -- sorta: Parallels

    Awesome!!!! I have wanted to run CNN PipeLine on a Mac since it first came out. The Mac version is amazingly weak when compared against the Windows version, since the thing is written mainly for the Windows world. Now I can... This MacBook is certain

  • PT880 w/2.8E HT BIOS v1.2 won't boot XP or XP install, runs Linux fine.

    So I had issues getting my Prescott to boot anything, but flashing to v1.2 lets me consistently boot to an MS DOS floppy, and also to my Knoppix CD (bootable Linux).  However, when I try to boot to my previous Windows XP installation, it just blinks

  • Interactive Report - Aggregate Calculations

    How can I get a variance or stddev calculation in an interactive report? This should function exactly the same as a sum or average aggregation. As I don't see a way to do it with the interface, and at the very least, I am hoping someone can help with