Deadlock when delete rows with blob.

Hello
I have the following issue. I try to clean a table that contains a BLOB column.
To do this I use SQLDBC I create a statement that contains the LOB column, I fetch the line, load the Blob. and before fetching the next line, I send a delete request. and I fall in the deadlock.
If I fetch the next line before sending the delete request there is no deadlock, there is also no deadlock if i do not request le LOB column in the select.
In fact when I made select with LOB, there is the follwing line in DOMAIN.LOCKS
SESSION;TRANSCOUNT;PROCESS;USERNAME;DATE;TIME;TERMID;LASTWRITE;LOCKMODE;LOCKSTATE;APPLPROCESS;APPLNODE;SCHEMANAME;OWNER;TABLENAME;TABLEID;ROWIDLENGTH;ROWIDHEX;ROWID;
295513;                4290;438;ESKDBADM;2010-06-17;12:05:46;ly-delorme-u..1674;?;tab_share;?;5748;LY-DELORME.esker.corp;?;?;?;0000800000046919;0;?;?
when i send the delete request the following lock appears in DOMAIN.LOCKS. A exclusif lock on the column I want to delete. It's ok
SESSION;TRANSCOUNT;PROCESS;USERNAME;DATE;TIME;TERMID;LASTWRITE;LOCKMODE;LOCKSTATE;APPLPROCESS;APPLNODE;SCHEMANAME;OWNER;TABLENAME;TABLEID;ROWIDLENGTH;ROWIDHEX;ROWID;
295521;                4287;167;ESKDBADM;2010-06-17;12:05:49;ly-delorme-u..1674;         5;row_exclusive;write;5748;LY-DELORME.esker.corp;ESKDBADM;ESKDBADM;DBM350_AUTOTESTXML;0000000000000934;5;00C51133800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
BUT there is a dead lock , I think because of the following entry in DOMAIN.LOCK_WAITS
TABLENAME;TABLEID;H_TERMID;H_PROCESS;H_APPLPROCESS;H_APPLNODE;H_ROWIDHEX;H_ROWID;H_LOCKMODE;H_DATE;H_TIME;H_LOCKTIMEOUT;R_TERMID;R_PROCESS;R_APPLPROCESS;R_APPLNODE;R_ROWIDHEX;R_ROWID;R_REQMODE;R_DATE;R_TIME;R_REQTIMEOUT;
?;0000800000046919;ly-delorme-u..1674;438;5748;LY-DELORME.esker.corp;?;?;tab_share;2010-06-17;12:05:46;?;ly-delorme-u..1674;167;5748;LY-DELORME.esker.corp;?;?;tab_exclusive;2010-06-17;12:05:49;      3585
The database request a tab_exclusive lock on tableid 0000800000046918 but there is already a tab_share lock on this.
Do you why there is a lock on the table :  tableid 0000800000046918 ?
How to avoid this lock using SQLDBC ?
Thanks for you help.
Yann.

this is the same reply as previous reply, this carriage return. I hope.
Hello,
Here is code that explain my issue.
I create a table like this :
create table "ESKDBADM"."DBM350_AUTOTESTXML"( "MSN" INTEGER not null, "DIST_FILE" BLOB, constraint SYSPRIMARYKEY primary key ("MSN"))
And then I try to delete row with the following program. I do not understand why the request SELECT Msn, DIST_FILE FROM DBM350_AUTOTESTXML set a share lock on the tableid : 000080000004691D.
I do not find this tableid in the "SYSINFO"."FILES" table.
SESSION;TRANSCOUNT;PROCESS;USERNAME;DATE;TIME;TERMID;LASTWRITE;LOCKMODE;LOCKSTATE;APPLPROCESS;APPLNODE;SCHEMANAME;OWNER;TABLENAME;TABLEID;ROWIDLENGTH;ROWIDHEX;ROWID;
295697; 5220;172;ESKDBADM;2010-06-21;11:01:40;ly-delorme-u..1CDC;?;tab_share;?;7388;LY-DELORME.esker.corp;?;?;?;000080000004691D;0;?;?
// SQLDBC.cpp : Defines the entry point for the console application.
// YOU MUST CHANGE CONNECTION SETTINGS.
#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <comdef.h>
#include <iostream>
#include "SQLDBC.h"
using namespace SQLDBC;
static void parseArgs(int argc, wchar_t **argv);
static SQLDBC_Connection *connectDB(SQLDBC_Environment * env = NULL);
static char* convertToUCS2(char *src);
static void usage();
SQLDBC_Environment *g_env;
typedef struct ConnectArgsT {
  bstrt username;
  bstrt password;
  bstrt dbname;  
  bstrt host;    
  bstrt request;    
} ConnectArgsT;
ConnectArgsT connectArgs;
void exitOnError(SQLDBC_ErrorHndl &err);
int _tmain(int argc, _TCHAR* argv[])
   parseArgs(argc, argv);
   SQLDBC_Connection *conn = connectDB();
   //* Create a new statment object and execute it.
   SQLDBC_PreparedStatement *stmt = conn->createPreparedStatement();
   // FREEZE
   if (connectArgs.request.length() == 0)
           connectArgs.request = "SELECT Msn, DIST_FILE FROM DBM350_AUTOTESTXML";     
   /* NO FREEZE
   if (connectArgs.request.length() == 0)
           connectArgs.request = "SELECT Msn FROM DBM350_AUTOTESTXML";
   char command = (char)((LPCWSTR)(connectArgs.request));
    //* Executes the UNICODE encoded SQL command.
   SQLDBC_Retcode ret = stmt->prepare((const char*)command, SQLDBC_StringEncodingType::UCS2Swapped);
   exitOnError(stmt->error());
   stmt->execute();
   exitOnError(stmt->error());
   // * Get the resultset.  
   SQLDBC_ResultSet *result;
   result = stmt->getResultSet();
   exitOnError(stmt->error());
   // * Fetch the row from the resultset.     
   result->next();
        SQLDBC::SQLDBC_RowSet* pRowset =  result->getRowSet();
     ret = pRowset->fetch();          
   exitOnError(result->error());
   wchar_t szString[30];
   SQLDBC_Length ind;
Get a string value from the column.
   result->getObject(1, SQLDBC_HOSTTYPE_UCS2_SWAPPED, szString, &ind, sizeof(szString)); // Retreive MSN.
   // Delete de line.
   // Create a new connection for delete
   SQLDBC_Connection *conn2 = connectDB(g_env);
   //* Create a new statment object and execute it.
   SQLDBC_PreparedStatement *stmt2 = conn2->createPreparedStatement();
     std::wstring st = L"DELETE FROM DBM350_AUTOTESTXML WHERE MSN=";
     st +=  szString;
     stmt2->prepare((char*)st.c_str(), SQLDBC_StringEncodingType::UCS2Swapped);
    //* Executes the UNICODE encoded SQL command.
     ret = stmt2->execute();
   exitOnError(stmt->error());
   printf("%s\n", szString);
   return 0;
static char *convertToUCS2(char *src)
  int len = strlen(src);
  wchar_t w=(wchar_t)calloc(len, sizeof(wchar_t));
  int nc = mbstowcs(w, src, len);
  if ((size_t)-1 == nc) {
    fprintf(stderr, "Conversion to UCS2 failed. Execution stopped.\n");
    exit(1);
  short s=(SQLDBC_Int2)calloc(nc+1, sizeof(SQLDBC_Int2));
  int i;
  for(i=0; i<nc; i++) {
    s<i> = w<i>;
  free(w);
  return (char*)s;
static char* strupper(char *str)
    char *p=str;
    while(*p) {
        p=toupper(p);
        ++p;
    return str;
static wchar_t *argv0;      
#ifdef WIN32
#define STRICMP _stricmp
#else
#define STRICMP strcasecmp
#endif
SQLDBC_Connection *connectDB(SQLDBC_Environment * env)
  char errorText[200];
  SQLDBC_Retcode rc;
  if (g_env == NULL)
Every application has to initialize the SQLDBC library by getting a
reference to the ClientRuntime and calling the SQLDBC_Environment constructor.
       SQLDBC_IRuntime *runtime;
       runtime = SQLDBC::GetClientRuntime(errorText, sizeof(errorText));
       if (!runtime) {
          fprintf(stderr, "Getting instance of the ClientRuntime failed %s\n", errorText);
          usage();
       env = new SQLDBC_Environment(runtime);
       g_env = env;
Create a new connection object and open a session to the database.
  SQLDBC_Connection *conn = env->createConnection();
  printf("Connecting to '%s' on '%s' as user '%s'\n",
         (char)connectArgs.dbname, (char)connectArgs.host, (char*)connectArgs.username);
  rc = conn->connect(connectArgs.host, connectArgs.dbname,
                     connectArgs.username, connectArgs.password);
  if(SQLDBC_OK != rc) {
    fprintf(stderr, "Can't connect to '%s'.\nERROR: %d:'%s'\n",
            connectArgs.dbname, conn->error().getErrorCode(), conn->error().getErrorText());
    exit(1);
  return conn;
static void parseArgs (int argc, wchar_t **argv)
  argv0 = wcsdup(argv[0]);
setting defaults for demo database
  connectArgs.username = "ESKDBADM";
  connectArgs.password = "DELORME";
  connectArgs.dbname = "EDP350";
  connectArgs.host = "ly-delorme";
use values from command line
  if (argc > 5) {
    connectArgs.request = argv [5];
  if (argc > 4) {
    connectArgs.host = argv [4];
  if (argc > 3) {
    connectArgs.dbname = argv [3];
  if (argc > 2) {
    connectArgs.password = argv [2];
  if (argc > 1) {
    if (!wcsicmp(argv [1], L"-h"))
      usage();
    else {
      connectArgs.username = argv [1];
  strupper(connectArgs.username);
  strupper(connectArgs.password);
void exitOnError(SQLDBC_ErrorHndl &err)
  if(err) {
    fprintf(stderr, "Execution stopped %d:'%s'", err.getErrorCode(), err.getErrorText());
    exit(1);
static void usage()
  wchar_t *s = wcsrchr(argv0, L'/');
  if (!s)
    s = wcsrchr(argv0, L'
  if (s)
    *s = '\0';
  printf("Syntax: %s [-h] | [<connect_options>]\n"
         "\tconnect_options :: \n"
         "\t\t[ <username> \n"
         "\t\t[ <password>\n"
         "\t\t[ <database_name>\n"
         "\t\t[ <database_server> ]]]]\n"
           "\t\t[ <request> ]]]]\n"
         "\tCalling %s without any arguments will use user '%s','%s'\n"
         "\t\ton database '%s' at server '%s'\n",
         argv0, argv0,
         connectArgs.username, connectArgs.password,
         connectArgs.dbname, connectArgs.host);
  exit(1);

Similar Messages

  • Can LogMiner capture DMLs against rows with Blob datatype?

    Hi,
    Can LogMiner catch DMLs against rows with Blob datatype?
    if a Blob column is 4G big each row, and you delete millions of
    rows, but your redo log files is only 600M totally, I don't know (not sure) how those before-images of data can be stored in redo logfiles (also, you may need a very large log_archive_dest to hold those before-images )
    please help to explain.
    Thanks
    Roy

    Hi,
    Can LogMiner catch DMLs against rows with Blob datatype?
    if a Blob column is 4G big each row, and you delete millions of
    rows, but your redo log files is only 600M totally, I don't know (not sure) how those before-images of data can be stored in redo logfiles (also, you may need a very large log_archive_dest to hold those before-images )
    please help to explain.
    Thanks
    Roy

  • Deleting  rows with missing values in field in start routine of update rule

    Hello experts,
    how can I delet rows with missing values in a specific field in the start routine of update rules?
    I think ABAP code should look something like this:
    delete ...  from DATA_PACKAGE where Z_NO = ''.
    thanks in advance for any suggestions!
    hiza

    Write:
    delete data_package where field = value.
    Hope it helps.
    Regards

  • How to use insert row with BLOB to Oracle when use connection pool?

    Hi, All,
    I am writing a program to store files (mapped to be a column with BLOB datatype
    in the table) to Oracle database.
    But I always get java.lang.ClassCastException:weblogic.jdbc.rmi.SerialBlob
    Here is my code, please help. Thanks a lot!!
    String sqlNewRow = "insert into documents (id, companyid, updatedate, description,
    document, addby, title) ";
    sqlNewRow += "values (?, ?, TO_DATE(?, 'MM/DD/YY'), ?, EMPTY_BLOB(), ?,
    con.setAutoCommit(false);
    ps = con.prepareStatement(sqlNewRow);
    ps.setInt(1, documentid);
    ps.setInt(2, companyid);
    ps.setString(3, updatedate);
    ps.setString(4, description);
    ps.setString(5, username);
    ps.setString(6, filename);
    ps.executeUpdate();
    ps.close();
    String sqlLockRow = "select document from documents where id = ? for update";
    java.sql.PreparedStatement pst = con.prepareStatement(sqlLockRow);
    pst.setInt(1, documentid);
    java.sql.ResultSet rset = pst.executeQuery();
    rset.next();
    java.sql.Blob dbBlob = rset.getBlob(1);
    out.println("it's=" + dbBlob.getClass());
    OutputStream dbBlobOut = ((weblogic.jdbc.vendor.oracle.OracleThinBlob)dbBlob).getBinaryOutputStream();
    dbBlobOut.write(oneString.getBytes());
    dbBlobOut.close();
    rset.close();
    pst.close();

    Have you defined
    OutputStream dbBlobOut
    as weblogic.jdbc.vendor.oralce.OracleThinBlob?
    Mitesh
    Almond wrote:
    Hi, All,
    I am writing a program to store files (mapped to be a column with BLOB datatype
    in the table) to Oracle database.
    But I always get java.lang.ClassCastException:weblogic.jdbc.rmi.SerialBlob
    Here is my code, please help. Thanks a lot!!
    String sqlNewRow = "insert into documents (id, companyid, updatedate, description,
    document, addby, title) ";
    sqlNewRow += "values (?, ?, TO_DATE(?, 'MM/DD/YY'), ?, EMPTY_BLOB(), ?,
    con.setAutoCommit(false);
    ps = con.prepareStatement(sqlNewRow);
    ps.setInt(1, documentid);
    ps.setInt(2, companyid);
    ps.setString(3, updatedate);
    ps.setString(4, description);
    ps.setString(5, username);
    ps.setString(6, filename);
    ps.executeUpdate();
    ps.close();
    String sqlLockRow = "select document from documents where id = ? for update";
    java.sql.PreparedStatement pst = con.prepareStatement(sqlLockRow);
    pst.setInt(1, documentid);
    java.sql.ResultSet rset = pst.executeQuery();
    rset.next();
    java.sql.Blob dbBlob = rset.getBlob(1);
    out.println("it's=" + dbBlob.getClass());
    OutputStream dbBlobOut = ((weblogic.jdbc.vendor.oracle.OracleThinBlob)dbBlob).getBinaryOutputStream();
    dbBlobOut.write(oneString.getBytes());
    dbBlobOut.close();
    rset.close();
    pst.close();

  • Deleting rows with child records

    Hi,
    I want to delete some records from master table based on where condition. But I want all the corresponding child record should also delete from the respective child tables..
    Can anyone tell me how to go about it with example( eg emp & dept table of scotts)
    Regards

    I have been to slow for posting...
    Please note that I hate doing this
    SCOTT@LSC01> select count(*) from emp;
      COUNT(*)
            14
    SCOTT@LSC01> delete dept where deptno=10;
    <font color=red>1 row deleted.</font>
    SCOTT@LSC01> select count(*) from emp;
      COUNT(*)
            11the risk is that someone is not aware of deleting rows, and instead of getting
    SCOTT@LSC01> delete dept where deptno=10;
    delete dept where deptno=10
    ERROR at line 1:
    ORA-02292: integrity constraint (SCOTT.FK_DEPTNO) violated - child record foundhe is deleting rows in other tables and will never be aware of that deletion ...

  • Records added into the DB when deleting row in List

    I have a list with an add button at the bottom. Every entry has a delete button on the left.
    Whenever I create new entries and then delete some rows, the newly created entries are automatically saved.
    How can I solve this? Deleting calls getOADBTransaction.commit(), is there a way to isolate deleting form saving?

    Hi,
    When do some operations on Records from OAF page it maintains a list of state of entity, and on the basis of this state it performs the DML operations like insert/Update and Delete.
    Your case is no exception if you are inserting some records OAF will mark these for insertion, deleted records will marked for deletion and on commit data will be posted to DB accordingly.
    Still if you don't want to save the data, explictly change the VO Row status as Initialize(same as we do while inserting new record STSTUS_INITIALIZED) then OAF will not consider this row for insertion.
    Hope this will give you some clue.
    Regards,
    Reetesh Sharma

  • Page not found error when deleting row in multirow form

    I have a tabular form and when I try to delete one or more rows from the tabular section, I get the confirmation box pop-up window and then this error:
    "The requested URL /apex/wwv_flow.accept was not found on this server"
    I checked other postings and found instructions to generate a trace so here is what I think shows the error :
    wwv_flow.accept(P_FLOW_ID=>:P_FLOW_ID,P_FLOW_STEP_ID=>:P_FLOW_STEP_ID,P_INSTANCE=>:P_INSTANCE,P_PAGE_SUBMISSION_ID=>:P_PAGE_SUBMISSION_ID,P_REQUEST=>:P_REQUEST,P_ARG_NAMES=>:P_ARG_NAMES,P_T01=>:P_T01,P_T02=>:P_T02,P_T03=>:P_T03,P_T05=>:P_T05,P_T06=>:P_T06,P_T07=>:P_T07,P_T08=>:P_T08,P_T09=>:P_T09,F04=>:F04,F05=>:F05,F08=>F08,F06=>:F06,F07=>:F07,F02=>:F02,F03=>:F03,FCS=>:FCS,F01=>:F01,P_MD5_CHECKSUM=>:P_MD5_CHECKSUM);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    end if;
    :rc__ := rc__;
    :db_proc_time__ := dbms_utility.get_time - start_time__;
    end;
    Embedded PL/SQL Gateway: /apex/wwv_flow.accept HTTP-404 ORA-06550: line 6, column 44:
    PLS-00103: Encountered the symbol "WITH" when expecting one of the following:
    := . ( @ % ; not null range default character
    Embedded PL/SQL Gateway: (wpu.c,626) longjumping back to the beginning
    Embedded PL/SQL Gateway: (wpu.c,488) cleaning up before longjmp
    Embedded PL/SQL Gateway: (wpu.c,492) doing a rollback
    Embedded PL/SQL Gateway: (wpcs.c, 76) Executed 'rollback' (rc=0)
    Any ideas why this is happening?
    Thanks

    I kept looking into the trace file and a before the text in the initial posting I found this:
    Embedded PL/SQL Gateway: (wppr.c,1021) lcase(procname): wwv_flow.accept
    Embedded PL/SQL Gateway: (wppr.c,1302) The CALL block: len=2881, bind_count=37
    declare
    rc__ number;
    start_time__ binary_integer;
    simple_list__ owa_util.vc_arr;
    complex_list__ owa_util.vc_arr;
    F08 FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2t with the difference of 11 months apart.^M
    2 For some of them calculate the AWT that includeFLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2tas setup.^M
    For some of them include the AWt monotribuista code to be calculated.^M
    3. Some oFLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2led.^M
    The error says "ORA-06550: line 6, column 44: PLS-00103: Encountered the symbol "WITH" "
    so it points to the following line in the code:
    "F08 FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2t with the difference of 11 months apart.^M"
    So... can anyone give me a clue why the code is built this way (looks like the variable definition is truncated)
    Thanks in advance for your help!

  • Deadlock when deleting from rsstatmanpsa during DSO activation

    We are experiencing intermittent Oracle deadlocks during DSO activation in our BI system.  The deadlocks occur when the following SQL statement is executed:
          delete from rsstatmanpsa where
                 partnr >= l_s_status-rnr_sid and
                 psa     = l_s_status-dta.
    This is at line 83 of the SET STATUS method of class CL_RSSM_STATMAN.  (See below for runtime error details.)
    When these errors occur the background job for the DSO activation is cancelled with the message ABAP/4 processor: DBIF_RSQL_SQL_ERROR.  Strangely, when this occurs as part of a process chain, the status of the process variant does not get updated until/unless someone displays the process chain log, at which point the status changes and follow-on events are triggered.  In other words, the process chain does not seem to be receiving word that the DSO activation process has abended, so we do not receive alerts that a problem has occurred.
    Has anyone else experienced this issue?
    Thanks,
    Bob
    P.S.  We are running BI 7.0, Patch Level 15 on Oracle 10.2.0.4.0
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "SET_STATUS" "(METHOD)", nor was it propagated by a RAISING clause.
    How to correct the error
    Database error text........: "ORA-00060: deadlock detected while waiting for
    resource"
    Internal call code.........: "[RSQL/DELE/RSSTATMANPSA ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "CL_RSSM_STATMAN===============CP" or "CL_RSSM_STATMAN===============CM008"
    "SET_STATUS"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SET_STATUS" "(METHOD)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    Information on where terminated
    Termination occurred in the ABAP program "CL_RSSM_STATMAN===============CP" -
    in "SET_STATUS".
    The main program was "RSPROCESS ".
    In the source code you have the termination point in line 83
    of the (Include) program "CL_RSSM_STATMAN===============CM008".
    The program "CL_RSSM_STATMAN===============CP" was started as a background job.
    Job Name....... "BI_PROCESS_ODSACTIVAT"
    Job Initiator.. "ALEREMOTE"
    Job Number..... 05302800
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    procedure "SET_STATUS" "(METHOD)", but it was neither handled locally nor
    declared
    in the RAISING clause of its signature.
    The procedure is in program "CL_RSSM_STATMAN===============CP "; its source
    code begins in line
    1 of the (Include program "CL_RSSM_STATMAN===============CM008 ".
    Source Code Extract
    Line
    SourceCde
    53
    if i_with_internal_check is initial.
    54
    l_s_status = i_s_status.
    55
    call function 'RSSM_GET_TIME'
    56
    importing
    57
    e_timestamps = l_s_status-ts_last_changed.
    58
    if l_s_status-ts_proc_started <= '10000101000000'.
    59
    l_s_status-ts_proc_started = l_s_status-ts_last_changed.
    60
    endif.
    61
    if l_s_status_exist is initial.
    62
    insert rsstatmanstatus from l_s_status.
    63
    if sy-subrc <> 0.
    64
    message x000.
    65
    endif.
    66
    else.
    67
    modify rsstatmanstatus from l_s_status.
    68
    if sy-subrc <> 0.
    69
    message x000.
    70
    endif.
    71
    endif.
    72
    delete from rsstatmanpart where
    73
    rnr      = l_s_status-rnr and
    74
    dta      = l_s_status-dta and
    75
    dta_type = l_s_status-dta_type.
    76
    select single * from rsstatmanpsa into l_s_psa where
    77
    rnr      = l_s_status-rnr and
    78
    psa      = l_s_status-dta.
    79
    if sy-subrc = 0.
    80
    delete from rsmdatastate_psa where
    81
    psa  = l_s_status-dta and
    82
    type = l_s_status-dta_type.
    >>>>>
    delete from rsstatmanpsa where
    84
    partnr >= l_s_status-rnr_sid and
    85
    psa     = l_s_status-dta.
    86
    else.
    87
    select single * from rsmdatastate_psa into l_ds_psa where
    88
    psa  = l_s_status-dta and
    89
    type = l_s_status-dta_type.
    90
    if sy-subrc = 0 and l_ds_psa-sid_checked > l_s_status-rnr_sid.
    91
    delete from rsmdatastate_psa where
    92
    psa  = l_s_status-dta and
    93
    type = l_s_status-dta_type.
    94
    delete from rsstatmanpsa where
    95
    partnr >= l_s_status-rnr_sid and
    96
    psa     = l_s_status-dta.
    97
    endif.
    98
    endif.
    99
    if i_with_commit = 'X'.
    100
    call function 'DB_COMMIT'.
    101
    endif.
    102
    endif.

    Walter,
    Thanks for the suggestion.  This is the same recommendation I just received from SAP.
    We are currently in the midst of regression testing for a major release, so cannot implement these corrections immediately.  I'll post again after we implement the corrections and let you know if they solve our problem.
    Thanks again.
    Bob

  • Deadlock when deleting a not linked data record in a parent table

    Hello, who knows about this problem with Oracle 10g:
    Our installation of Oracle 10.2g behaves different from Oracle 9.2 concerning locking of data records:
    To prevent that different users edit a complex data record at the same time and store it, the user has to put
    the data record into the "edit mode" and we lock it with "Select CharFieldZ from TableX where ID = 1 for UPDATE NOWAIT".
    In this data record references (= foreign keys) to other tables are used; with foreign key constraints we
    prevent those data records of these tables from being deleted, which are used in data records of tableX: on
    deleting such a record Oracle gives an error message ORA-02292, which the application translates for the
    user: "You cannot delete this record, because it is used somewhere else".
    Now when locking data record A under Oracle 10.2g, which contains a foreign Key upon data record 1 of tableF,
    and trying to delete data record 2 of tableF, a deadlock appears, even when this data record is not used
    anywhere else.
    Further conditions:
    - Data record 2 was created before locking of data record A.
    - In the same session tableF was opened for reading before.
    Is there a parameter, which leads Oracle 10.2g to return to the former behavoir ?
    or: how is it possible to prevent a deadlock anyhow else ?
    Thanks in advance
    Lothar Weidl-Walther
    Germany
    Edited by: schatzag on 04.02.2009 14:22
    for easier demonstration the SQL-scripts:
    Installation:
    DELETE TableF;
    DELETE TableX;
    CREATE TABLE TableF
    ( ID INTEGER NOT NULL,
    NAME VARCHAR2(30 BYTE) NOT NULL);
    CREATE UNIQUE INDEX PK_TableF ON TableF(ID);
    ALTER TABLE TableF ADD CONSTRAINT PK_TableF PRIMARY KEY(ID);
    INSERT INTO TableF VALUES (1, 'Record1');
    INSERT INTO TableF VALUES (2, 'Record2');
    commit;
    CREATE TABLE TableX
    ( ID INTEGER NOT NULL,
    NAME VARCHAR2(30 BYTE) NOT NULL,
    CharFieldZ VARCHAR2(100 BYTE),
    TableF_ID INTEGER);
    ALTER TABLE TableX ADD (
    CONSTRAINT FK_TableX_TableF
    FOREIGN KEY (TableF_ID)
    REFERENCES TableF (ID));
    INSERT INTO TableX VALUES (1, 'ComplexRecord1', 'User1', 1);
    commit;
    Session1:
    SELECT CharFieldZ FROM TableX WHERE ID = 1 FOR UPDATE NOWAIT;
    SELECT * FROM TableF;
    Session2:
    DELETE FROM TableF WHERE ID = 2;
    Edited by: schatzag on 04.02.2009 14:26

    I'm not aware that the locking mechanism did change between Oracle 9i and 10g. Can you provide a simple and reproducable example?
    You current description is very "uncomplete", e.g. this statement would lock the full table, but I think that is not what your application does.
    Select CharFieldZ from TableX for UPDATE NOWAITAs Peter already mentioned you should check if there are any other differences between the databases. Let me mention just a few points that I can think of at the moment:
    * indexes
    * FK constraints with DELETE CASCADE
    * higher oracle block size (can lead to more ITL locks)
    Edited by: Sven W. on Feb 4, 2009 2:18 PM

  • Delete rows with time stamp

    Dear All,
    I am trying to delete few rows, which have date and timestamp. I was able to delete the rows except dates with timestamp "12:00:00 PM". I even tried the "trunc" function. Please find the sample data below.
    GC_ID--------COMPANY_ID......TRANSACTION_DATE----------TRANSACTION_CODE
    14558-----------101350-------------1/31/2009 12:00:00 PM-------------6550
    14528-----------101080-------------1/31/2009 12:00:00 PM-------------1510
    14308-----------101510-------------1/31/2009 12:00:00 PM-------------1511
    14308-----------101510-------------1/31/2009 12:00:00 PM-------------1506
    14818-----------101611-------------1/31/2009 12:00:00 PM-------------1511
    With Regards
    Phani

    If you want to be precise and have other rows where seconds and minutes are specified then specify "AM" in the format mask, as follows;
    create table t
    (gc_id number
    ,company_id number
    ,transaction_date timestamp
    ,transaction_code number
    insert into t values (14558, 101350, to_timestamp('01/31/2009 12:00:00 PM', 'mm/dd/yyyy hh12:mi:ss AM'), 6550)
    delete from t where transaction_date = to_timestamp ('01/31/2009 12:00:00 PM', 'mm/dd/yyyy hh12:mi:ss AM')
    /or better still use;
    '01/31/2009 12:00:00', 'mm/dd/yyyy hh24:mi:ss'

  • Keeping formulas intact when deleting rows in Numbers '09

    In a Numbers spreadsheet, how do I delete (or add) rows in the body of the spreadsheet, without affecting lower rows which contain a formula?

    Depends what you mean by "without affecting lower rows which contain a formula."
    Formulas with cell references will adjust those references to fit the new circumstances.
    Example: D9 contains =C3
    Row 2 is selected and Table > Add Row Above is used to insert a new row (now row 2) above. Row 2 becomes Row 3, Row 3 becomes Row 4 etc. and the formula in D9 (now D10) adjusts to remain pointed to the same cell (what was C3) in its new position (C4). The formula changes to =C4
    Rows 6 and 7 are then selected and deleted, which makes no change to row 4 and the current position of the target cell (C4), but does change  the position of D10 to D8. The formula remains pointed at the same cell, still in the same position: =C4.
    If Row 4 is then deleted (or if Row 3 was deleted in stead of Row 2 at the first step) a problem is created. The formula originally in D9 and most recently in D8 is now referencing a cell which is no longer part of the table, and will present an error triangle and the message "invalid reference".
    Formulas with fixed cell references show the same results, indicating the "fix" is to the cell itself, not to the cell's address. Same table, same steps, but this time the formula in what starts out as D9 is =$C$3
    D9 becomes D10, C3 becomes C4. The formula again changes to refer to the same cell: =$C$4
    D10 becomes D8. C4 remains C4. The formula remains pointed to the same cell: =$C$4
    Row 4 is deleted. C4 is removed from the table. D8 becomes D7 and returns the "invalid reference" error message.
    But I suspect this is not what you are looking for. If that's the case, some clarification to the question would help.
    Regards,
    Barry
    PS: Is there a Winnipeg that's not in Canada? Google maps doesn't appear to be aware of one.

  • Deleting row with inputText components throws error:

    How delete a row in table with inputText components in it?
    I tried just deleting it from the model but then I get the following error:
    javax.faces.el.EvaluationException: java.lang.IndexOutOfBoundsException: Index: 3, Size: 2

    oops. I posted to the wrong group. sorry. I've since moved it to jdeveler.

  • Delete Rows with specified data

    hello
    maybe you know what script/formula i can use to do the following:
    i need to remove rows what include in any cell some specified word.
    words for lookup should be specified in another cells.
    this require new script? or somebody know how to do this?

    First, you cannot "delete" a row using a formula. You can make it so a row can be hidden. You can highlight a row (i.e., such as by putting the word "DELETE" in a cell in a particular column) so you can locate and delete the row manually. You could probably write a script to do these deletions for you but I'm not sure it is worth the time unless you need to do an awful lot of them or need to do it often.
    The problem statement is still not completely clear. Will you be searching for the entire phrase "T-Technologies :: CODE3290"? Is that the entirety of what is in a cell or is that only part of the text in the cell? Or will you be searching for a piece of that phrase, such as "Technologies" or "Tech" or "code" or "3290"?
    You can highlight any cell containing a particular word or phrase or group of letter/numbers by using conditional formatting. Use the test "text contains..." and type in the word you are looking for. Set the fill to red so you can see it. Use Copy Style then Paste Style to the rest of the table. Then manually delete any row that has a red cell.
    Message was edited by: Badunit

  • Deleting rows with '

    I want to delete all rows form a table that I have. My criteria for deleting is I want to delete the rows where the value for the username colum includes an apostrophe!
    So something like:
    delete from users where username like '%'%';
    Obviously the above line doesn't work. What will?
    Thanks for the help,
    Wallace

    SQL>insert into temp values(1,'aravind');
    1 row created.
    SQL>insert into temp values(2,'ara''vind');
    1 row created.
    SQL>insert into temp values(3,'aravi''nd');
    1 row created.
    SQL>select * from temp;
            ID NAME
             1 aravind
             2 ara'vind
             3 aravi'nd
    SQL>delete from temp where name like '%''%';
    2 rows deleted.
    SQL>select * from temp;
            ID NAME
             1 aravind
    SQL>

  • ORA-03237 when creating table with BLOB columns on Oracle 9i

    I am playing with my new Oracle 9i database. I am trying to copy
    tables from my 8.1.6 db. Three tables won't create due to this
    new message. The 9i documentation says it's soemthing to do with
    freelist groups but my DBA says he hasn't set up any.
    The tablespace is one of these newfangled locally managed
    tablespaces (predetermined size 8k).
    I can create these tables if I change the BLOB column to datatype
    VARCHAR2(4000).
    I have raised this through the usual channels, but I thought I'd
    try this site as well.
    Cheers, APC

    victor_shostak wrote:
    Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

Maybe you are looking for

  • Date format in msd crm

    Hi, I have a CRM reports rdl format where SQL query has been used. Now I have to replicate these n online CRM where SQL is not supported. I am trying to conver to fetch xml. One report is easy. other 2 reports uses calculations for date and time. Req

  • Video Flicker & Creation of SD DVD (16:9) from a HDV edit...

    Hi Everyone, We have just completed a project on HDV. Shot on HDV using Sony FX1E HDV Edit using FCP HD Video Card is Declink HD Extreme. Problem 1: Flicker while we render video: When we render the timeline, the rendered output some times has a flic

  • Adobe Reader X Display Preferences on Terminal

    We use both Adobe Reader 9 an 10 on several Terminal Servers. We had performance problems until i found this link in Adobe KB: http://kb2.adobe.com/cps/887/cpsid_88761.html The solution works fine with Adobe Reader 9. On  Terminal Servers where Adobe

  • Using Image Metadata On Book Page - Can't Make It Work!

    I've created a book of images. I've added a metadata box on the page template (the metadata desired is the version name of the image), and what I want to happen is to have the Version Name automatically printed -- for the image used on that page -- o

  • Question: Best method for mounting drives at log-in time?

    I would like to know what others consider the best method for mounting drives at log-in time is? I can see a few methods such as start-up items on the client, start-up items on the server to managed users and possibly a start-up script. One wrinkle i