DBA commit other session's transaction?

Hi, everyone,
A quick question, can a DBA commit {color:#0000ff}other session's transaction{color}?
If so, how?
Thanks!
Alex

Transactions can be as long as what the user logic demands. There is no transactions that is too long or too large. Oracle doesn't break, slowdown, or underperform because of long or big transactions. If you look deep into how oracle handles transactions in the background, you'll see why.
It's interesting you mentioned that. I hope you really looked deep into how oracle handles transactions so you can en-light us how long and large transaction not affecting performance.
perhaps we should start with Oracle Concept shall we?
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/transact.htm#CNCPT117
In a nutshell long and large transaction has potential performance impact at least in these aspects.
A transaction will generate undo information, until the transaction is committed, these undo segment can't be reused. As transaction grows the undo space held hostage grows. Potential performance impact No.1
A transaction usually hold locks on rows you made changes. until your transaction is committed, no other user can update these rows and need to wait for the lock. Potential performance impact No.2
The third one is situation like yours, when a session held long and big transaction dropped, Oracle need to rollback all the changes made to database. Some of these changes already been flushed to disk (especially since it's long and large transaction). In that case, Oracle will need to load all changed data blocks and apply undo information back.
On the other hand, since you are seeking ways for DBA to commit the uncommit change you made recklessly, that means you could have committed the changes. There's certainly no user logic to hold these changes as one single transaction.

Similar Messages

  • Performance issue showing read by other session Event

    Hi All,
    we are having a severe performance issue in my database when we are running batch jobs.
    This was a new database(11.2.0.2) and we are testing the performance by running some batch jobs. These batch jobs included some inserts and updates.
    I am seeing read by other session in top 5 timed events and cache buffers chains in Latch Miss Sources section.
    Please help me to solve this out.
    Inst Num Startup Time    Release     RAC
    1 27-Feb-12 09:03 11.2.0.2.0  NO
    Platform                         CPUs Cores Sockets Memory(GB)
    Linux x86 64-bit                    8     8       8      48.00           
    Snap Id      Snap Time      Sessions Curs/Sess
    Begin Snap:      5605 29-Feb-12 03:00:27        63       4.5
      End Snap:      5614 29-Feb-12 12:00:47        63       4.3
       Elapsed:              540.32 (mins)
       DB Time:            1,774.23 (mins)
    Cache Sizes                       Begin        End
    ~~~~~~~~~~~                  ---------- ----------
                   Buffer Cache:     1,952M     1,952M  Std Block Size:        16K
               Shared Pool Size:     1,024M     1,024M      Log Buffer:    18,868K
    Load Profile              Per Second    Per Transaction   Per Exec   Per Call
    ~~~~~~~~~~~~         ---------------    --------------- ---------- ----------
          DB Time(s):                3.3                0.8       0.02       0.05
           DB CPU(s):                1.1                0.3       0.01       0.02
           Redo size:           55,763.8           13,849.3
       Logical reads:           23,906.6            5,937.4
       Block changes:              325.7               80.9
      Physical reads:              665.6              165.3
    Physical writes:               40.4               10.0
          User calls:               60.7               15.1
              Parses:               10.6                2.6
         Hard parses:                1.1                0.3
    W/A MB processed:                0.6                0.2
              Logons:                0.1                0.0
            Executes:              151.2               37.6
           Rollbacks:                0.0                0.0
        Transactions:                4.0
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:   99.94       Redo NoWait %:  100.00
                Buffer  Hit   %:   97.90    In-memory Sort %:  100.00
                Library Hit   %:   98.06        Soft Parse %:   90.16
             Execute to Parse %:   92.96         Latch Hit %:  100.00
    Parse CPU to Parse Elapsd %:   76.71     % Non-Parse CPU:   98.57
    Shared Pool Statistics        Begin    End
                 Memory Usage %:   89.38   87.96
        % SQL with executions>1:   97.14   95.15
      % Memory for SQL w/exec>1:   96.05   92.46
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    db file sequential read          14,092,706      65,613      5   61.6 User I/O
    DB CPU                                           34,819          32.7
    read by other session               308,534       1,260      4    1.2 User I/O
    direct path read                     97,454         987     10     .9 User I/O
    db file scattered read               71,870         910     13     .9 User I/O
    Host CPU (CPUs:    8 Cores:    8 Sockets:    8)
    ~~~~~~~~         Load Average
                   Begin       End     %User   %System      %WIO     %Idle
                    0.43      0.36      13.7       0.6       9.7      85.7
    Instance CPU
    ~~~~~~~~~~~~
                  % of total CPU for Instance:      13.5
                  % of busy  CPU for Instance:      94.2
      %DB time waiting for CPU - Resource Mgr:       0.0
    Memory Statistics
    ~~~~~~~~~~~~~~~~~                       Begin          End
                      Host Mem (MB):     49,152.0     49,152.0
                       SGA use (MB):      3,072.0      3,072.0
                       PGA use (MB):        506.5        629.1
        % Host Mem used for SGA+PGA:         7.28         7.53
    Time Model Statistics             
    -> Total time in database user-calls (DB Time): 106453.8s
    -> Statistics including the word "background" measure background process
       time, and so do not contribute to the DB time statistic
    -> Ordered by % or DB time desc, Statistic name
    Statistic Name                                       Time (s) % of DB Time
    sql execute elapsed time                            105,531.1         99.1
    DB CPU                                               34,818.8         32.7
    parse time elapsed                                      714.7           .7
    hard parse elapsed time                                 684.8           .6
    PL/SQL execution elapsed time                           161.9           .2
    PL/SQL compilation elapsed time                          44.2           .0
    connection management call elapsed time                  16.9           .0
    hard parse (sharing criteria) elapsed time               10.2           .0
    hard parse (bind mismatch) elapsed time                   9.4           .0
    sequence load elapsed time                                2.9           .0
    repeated bind elapsed time                                0.5           .0
    failed parse elapsed time                                 0.0           .0
    DB time                                             106,453.8
    background elapsed time                               1,753.9
    background cpu time                                      61.7
    Operating System Statistics        
    -> *TIME statistic values are diffed.
       All others display actual values.  End Value is displayed if different
    -> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
    Statistic                                  Value        End Value
    BUSY_TIME                              3,704,415
    IDLE_TIME                             22,203,740
    IOWAIT_TIME                            2,517,864
    NICE_TIME                                      3
    SYS_TIME                                 145,696
    USER_TIME                              3,557,758
    LOAD                                           0                0
    RSRC_MGR_CPU_WAIT_TIME                         0
    VM_IN_BYTES                      358,813,045,760
    VM_OUT_BYTES                      29,514,830,848
    PHYSICAL_MEMORY_BYTES             51,539,607,552
    NUM_CPUS                                       8
    NUM_CPU_CORES                                  8
    NUM_CPU_SOCKETS                                8
    GLOBAL_RECEIVE_SIZE_MAX                4,194,304
    GLOBAL_SEND_SIZE_MAX                   1,048,586
    TCP_RECEIVE_SIZE_DEFAULT                  87,380
    TCP_RECEIVE_SIZE_MAX                   4,194,304
    TCP_RECEIVE_SIZE_MIN                       4,096
    TCP_SEND_SIZE_DEFAULT                     16,384
    TCP_SEND_SIZE_MAX                      4,194,304
    TCP_SEND_SIZE_MIN                          4,096
    Operating System Statistics -
    Snap Time           Load    %busy    %user     %sys    %idle  %iowait
    29-Feb 03:00:27      0.4      N/A      N/A      N/A      N/A      N/A
    29-Feb 04:00:35      1.4     11.9     11.2      0.6     88.1     14.3
    29-Feb 05:00:41      1.7     13.8     13.2      0.6     86.2     15.8
    29-Feb 06:00:48      1.5     14.0     13.5      0.6     86.0     12.3
    29-Feb 07:01:00      1.8     16.3     15.8      0.5     83.7     10.4
    29-Feb 08:00:12      2.6     23.2     22.5      0.6     76.8     12.6
    29-Feb 09:00:26      1.3     16.6     16.0      0.5     83.4      5.7
    29-Feb 10:00:33      1.2     13.8     13.3      0.5     86.2      2.0
    29-Feb 11:00:43      1.3     14.5     14.0      0.5     85.5      3.8
    29-Feb 12:00:47      0.4      4.9      4.2      0.7     95.1     10.6
    Foreground Wait Class              
    -> s  - second, ms - millisecond -    1000th of a second
    -> ordered by wait time desc, waits desc
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
    -> Captured Time accounts for         97.9%  of Total DB time     106,453.79 (s)
    -> Total FG Wait Time:            69,415.64 (s)  DB CPU time:      34,818.79 (s)
                                                                      Avg
                                          %Time       Total Wait     wait
    Wait Class                      Waits -outs         Time (s)     (ms)  %DB time
    User I/O                   14,693,843     0           69,222        5      65.0
    DB CPU                                                34,819               32.7
    Commit                         40,629     0              119        3       0.1
    System I/O                     26,504     0               57        2       0.1
    Network                     1,945,010     0               11        0       0.0
    Other                         125,200    99                4        0       0.0
    Application                     2,673     0                2        1       0.0
    Concurrency                     3,059     0                1        0       0.0
    Configuration                      31    19                0       15       0.0
    Foreground Wait Events            
    -> s  - second, ms - millisecond -    1000th of a second
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by wait time desc, waits desc (idle events last)
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
                                                                 Avg
                                            %Time Total Wait    wait    Waits   % DB
    Event                             Waits -outs   Time (s)    (ms)     /txn   time
    db file sequential read      14,092,706     0     65,613       5    108.0   61.6
    read by other session           308,534     0      1,260       4      2.4    1.2
    direct path read                 97,454     0        987      10      0.7     .9
    db file scattered read           71,870     0        910      13      0.6     .9
    db file parallel read            35,001     0        372      11      0.3     .3
    log file sync                    40,629     0        119       3      0.3     .1
    control file sequential re       26,504     0         57       2      0.2     .1
    direct path read temp            14,499     0         49       3      0.1     .0
    direct path write temp            9,186     0         28       3      0.1     .0
    SQL*Net message to client     1,923,973     0          5       0     14.7     .0
    SQL*Net message from dblin        1,056     0          5       5      0.0     .0
    Disk file operations I/O          8,848     0          2       0      0.1     .0
    ASM file metadata operatio           36     0          2      54      0.0     .0
    SQL*Net break/reset to cli        2,636     0          1       1      0.0     .0
    ADR block file read                 472     0          1       1      0.0     .0
    os thread startup                     8     0          1      74      0.0     .0
    SQL*Net more data to clien       17,656     0          1       0      0.1     .0
    asynch descriptor resize        123,852   100          0       0      0.9     .0
    local write wait                    110     0          0       4      0.0     .0
    utl_file I/O                     55,635     0          0       0      0.4     .0
    log file switch (private s            8     0          0      52      0.0     .0
    cursor: pin S wait on X               2     0          0     142      0.0     .0
    enq: KO - fast object chec           13     0          0      20      0.0     .0
    PX Deq: Slave Session Stat          248     0          0       1      0.0     .0
    enq: RO - fast object reus           18     0          0      11      0.0     .0
    latch: cache buffers chain        2,511     0          0       0      0.0     .0
    latch: shared pool                  195     0          0       1      0.0     .0
    CSS initialization                   12     0          0       8      0.0     .0
    PX qref latch                        54   100          0       2      0.0     .0
    SQL*Net more data from cli          995     0          0       0      0.0     .0
    SQL*Net more data from dbl          300     0          0       0      0.0     .0
    kksfbc child completion               1   100          0      56      0.0     .0
    library cache: mutex X              244     0          0       0      0.0     .0
    PX Deq: Signal ACK RSG              124     0          0       0      0.0     .0
    undo segment extension                6   100          0       7      0.0     .0
    PX Deq: Signal ACK EXT              124     0          0       0      0.0     .0
    library cache load lock               3     0          0       9      0.0     .0
    ADR block file write                 45     0          0       1      0.0     .0
    CSS operation: action                12     0          0       2      0.0     .0
    reliable message                     28     0          0       1      0.0     .0
    CSS operation: query                 72     0          0       0      0.0     .0
    latch: row cache objects             14     0          0       1      0.0     .0
    enq: SQ - contention                 17     0          0       0      0.0     .0
    latch free                           32     0          0       0      0.0     .0
    buffer busy waits                    52     0          0       0      0.0     .0
    enq: PS - contention                 16     0          0       0      0.0     .0
    enq: TX - row lock content            6     0          0       1      0.0     .0
    SQL*Net message to dblink         1,018     0          0       0      0.0     .0
    cursor: pin S                        23     0          0       0      0.0     .0
    latch: cache buffers lru c            8     0          0       0      0.0     .0
    SQL*Net message from clien    1,923,970     0    944,508     491     14.7
    jobq slave wait                  66,732   100     33,334     500      0.5
    Streams AQ: waiting for me        6,481   100     32,412    5001      0.0
    wait for unread message on       32,858    98     32,411     986      0.3
    PX Deq: Execution Msg             1,448     0        190     131      0.0
    PX Deq: Execute Reply             1,196     0         74      62      0.0
    HS message to agent                 228     0          4      19      0.0
    single-task message                  42     0          4      97      0.0
    PX Deq Credit: send blkd            904     0          2       3      0.0
    PX Deq Credit: need buffer          205     0          1       3      0.0
    Foreground Wait Events            
    -> s  - second, ms - millisecond -    1000th of a second
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by wait time desc, waits desc (idle events last)
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
                                                                 Avg
                                            %Time Total Wait    wait    Waits   % DB
    Event                             Waits -outs   Time (s)    (ms)     /txn   time
    PX Deq: Table Q Normal            4,291     0          1       0      0.0
    PX Deq: Join ACK                    124     0          0       1      0.0
    PX Deq: Parse Reply                 124     0          0       0      0.0
    KSV master wait                     256     0          0       0      0.0
    Latch Miss Sources                
    -> only latches with sleeps are shown
    -> ordered by name, sleeps desc
                                                         NoWait              Waiter
    Latch Name               Where                       Misses     Sleeps   Sleeps
    ASM map operation freeli kffmTranslate2                   0          2        0
    DML lock allocation      ktadmc                           0          2        0
    FOB s.o list latch       ksfd_allfob                      0          2        2
    In memory undo latch     ktiFlushMe                       0          5        0
    In memory undo latch     ktichg: child                    0          3        0
    PC and Classifier lists  No latch                         0          6        0
    Real-time plan statistic keswxAddNewPlanEntry             0         20       20
    SQL memory manager worka qesmmIRegisterWorkArea:1         0          1        1
    active service list      kswslogon: session logout        0         23       12
    active service list      kswssetsvc: PX session swi       0          6        1
    active service list      kswsite: service iterator        0          1        0
    archive process latch    kcrrgpll                         0          3        3
    cache buffers chains     kcbgtcr_2                        0      1,746      573
    cache buffers chains     kcbgtcr: fast path (cr pin       0      1,024    2,126
    cache buffers chains     kcbgcur_2                        0         60        8
    cache buffers chains     kcbchg1: kslbegin: bufs no       0         16        3
    cache buffers chains     kcbgtcr: fast path               0         14       20
    cache buffers chains     kcbzibmlt: multi-block rea       0         10        0
    cache buffers chains     kcbrls_2                         0          9       53
    cache buffers chains     kcbgtcr: kslbegin shared         0          8        1
    cache buffers chains     kcbrls_1                         0          7       84
    cache buffers chains     kcbgtcr: kslbegin excl           0          6       14
    cache buffers chains     kcbnew: new latch again          0          6        0
    cache buffers chains     kcbzgb: scan from tail. no       0          6        0
    cache buffers chains     kcbzwb                           0          5        8
    cache buffers chains     kcbgcur: fast path (shr)         0          3        0
    cache buffers chains     kcbget: pin buffer               0          3        0
    cache buffers chains     kcbzhngcbk2_1                    0          1        0
    cache buffers lru chain  kcbzgws                          0         19        0
    cache buffers lru chain  kcbo_link_q                      0          3        0
    call allocation          ksuxds                           0         14       10
    call allocation          ksudlp: top call                 0          2        3
    enqueue hash chains      ksqgtl3                          0          2        1
    enqueue hash chains      ksqrcl                           0          1        2
    enqueues                 ksqgel: create enqueue           0          1        0
    object queue header oper kcbo_unlink_q                    0          5        2
    object queue header oper kcbo_sw_buf                      0          2        0
    object queue header oper kcbo_link_q                      0          1        2
    object queue header oper kcbo_switch_cq                   0          1        2
    object queue header oper kcbo_switch_mq_bg                0          1        4
    parallel query alloc buf kxfpbalo                         0          1        1
    process allocation       ksucrp:1                         0          2        0
    process queue reference  kxfpqrsnd                        0          1        0
    qmn task queue latch     kwqmnmvtsks: delay to read       0          1        0
    redo allocation          kcrfw_redo_gen: redo alloc       0         17        0
    row cache objects        kqreqd: reget                    0          6        0
    row cache objects        kqrpre: find obj                 0          6       13
    row cache objects        kqrso                            0          2        0
    row cache objects        kqreqd                           0          1        2
    row cache objects        kqrpre: init complete            0          1        1
    shared pool              kghalo                           0        199      106
    shared pool              kghupr1                          0         39      109
    shared pool              kghfre                           0         18       19
    shared pool              kghalp                           0          7       29
    space background task la ktsj_grab_task                   0         21       27
    Mutex Sleep Summary                
    -> ordered by number of sleeps desc
                                                                             Wait
    Mutex Type            Location                               Sleeps    Time (ms)
    Library Cache         kglhdgn2 106                              338           12
    Library Cache         kgllkc1   57                              259           10
    Library Cache         kgllkdl1  85                              123           21
    Cursor Pin            kkslce [KKSCHLPIN2]                        70          286
    Library Cache         kglget2   2                                31            1
    Library Cache         kglhdgn1  62                               31            2
    Library Cache         kglpin1   4                                26            1
    Library Cache         kglpnal1  90                               18            0
    Library Cache         kglpndl1  95                               15            2
    Library Cache         kgllldl2 112                                6            0
    Library Cache         kglini1   32                                1            0
              -------------------------------------------------------------Thanks in advance.

    Hi,
    Thanks for reply.
    I provided one hour report.
    Inst Num Startup Time    Release     RAC
    1 27-Feb-12 09:03 11.2.0.2.0  NO
      Platform                         CPUs Cores Sockets Memory(GB)
    Linux x86 64-bit                    8     8       8      48.00
                  Snap Id      Snap Time      Sessions Curs/Sess
    Begin Snap:      5606 29-Feb-12 04:00:35        63       3.7
      End Snap:      5607 29-Feb-12 05:00:41        63       3.6
       Elapsed:               60.11 (mins)
       DB Time:              382.67 (mins)
    Cache Sizes                       Begin        End
    ~~~~~~~~~~~                  ---------- ----------
                   Buffer Cache:     1,952M     1,952M  Std Block Size:        16K
               Shared Pool Size:     1,024M     1,024M      Log Buffer:    18,868K
    Load Profile              Per Second    Per Transaction   Per Exec   Per Call
    ~~~~~~~~~~~~         ---------------    --------------- ---------- ----------
          DB Time(s):                6.4                0.8       0.03       0.03
           DB CPU(s):                1.0                0.1       0.00       0.00
           Redo size:           84,539.3           10,425.6
       Logical reads:           23,345.6            2,879.1
       Block changes:              386.5               47.7
      Physical reads:            1,605.0              197.9
    Physical writes:                7.1                0.9
          User calls:              233.9               28.9
              Parses:                4.0                0.5
         Hard parses:                0.1                0.0
    W/A MB processed:                0.1                0.0
              Logons:                0.1                0.0
            Executes:              210.9               26.0
           Rollbacks:                0.0                0.0
        Transactions:                8.1
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:   99.62       Redo NoWait %:  100.00
                Buffer  Hit   %:   95.57    In-memory Sort %:  100.00
                Library Hit   %:   99.90        Soft Parse %:   98.68
             Execute to Parse %:   98.10         Latch Hit %:   99.99
    Parse CPU to Parse Elapsd %:   32.08     % Non-Parse CPU:   99.90
    Shared Pool Statistics        Begin    End
                 Memory Usage %:   89.25   89.45
        % SQL with executions>1:   96.79   97.52
      % Memory for SQL w/exec>1:   95.67   96.56
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    db file sequential read           3,054,464      17,002      6   74.0 User I/O
    DB CPU                                            3,748          16.3
    read by other session               199,603         796      4    3.5 User I/O
    direct path read                     46,301         439      9    1.9 User I/O
    db file scattered read               21,113         269     13    1.2 User I/O
    Host CPU (CPUs:    8 Cores:    8 Sockets:    8)
    ~~~~~~~~         Load Average
                   Begin       End     %User   %System      %WIO     %Idle
                    1.45      1.67      13.2       0.6      15.8      86.2
    Instance CPU
    ~~~~~~~~~~~~
                  % of total CPU for Instance:      13.0
                  % of busy  CPU for Instance:      94.7
      %DB time waiting for CPU - Resource Mgr:       0.0
    Memory Statistics
    ~~~~~~~~~~~~~~~~~                       Begin          End
                      Host Mem (MB):     49,152.0     49,152.0
                       SGA use (MB):      3,072.0      3,072.0
                       PGA use (MB):        513.5        467.7
        % Host Mem used for SGA+PGA:         7.29         7.20
    Time Model Statistics            
    -> Total time in database user-calls (DB Time): 22960.5s
    -> Statistics including the word "background" measure background process
       time, and so do not contribute to the DB time statistic
    -> Ordered by % or DB time desc, Statistic name
    Statistic Name                                       Time (s) % of DB Time
    sql execute elapsed time                             22,835.9         99.5
    DB CPU                                                3,748.4         16.3
    parse time elapsed                                       15.4           .1
    hard parse elapsed time                                  14.3           .1
    PL/SQL execution elapsed time                             7.5           .0
    PL/SQL compilation elapsed time                           6.0           .0
    connection management call elapsed time                   1.6           .0
    sequence load elapsed time                                0.4           .0
    hard parse (sharing criteria) elapsed time                0.0           .0
    repeated bind elapsed time                                0.0           .0
    failed parse elapsed time                                 0.0           .0
    DB time                                              22,960.5
    background elapsed time                                 238.1
    background cpu time                                       4.9
    Operating System Statistics        
    -> *TIME statistic values are diffed.
       All others display actual values.  End Value is displayed if different
    -> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
    Statistic                                  Value        End Value
    BUSY_TIME                                396,506
    IDLE_TIME                              2,483,725
    IOWAIT_TIME                              455,495
    NICE_TIME                                      0
    SYS_TIME                                  16,163
    USER_TIME                                380,052
    LOAD                                           1                2
    RSRC_MGR_CPU_WAIT_TIME                         0
    VM_IN_BYTES                       95,646,943,232
    VM_OUT_BYTES                       1,686,059,008
    PHYSICAL_MEMORY_BYTES             51,539,607,552
    NUM_CPUS                                       8
    NUM_CPU_CORES                                  8
    NUM_CPU_SOCKETS                                8
    GLOBAL_RECEIVE_SIZE_MAX                4,194,304
    GLOBAL_SEND_SIZE_MAX                   1,048,586
    TCP_RECEIVE_SIZE_DEFAULT                  87,380
    TCP_RECEIVE_SIZE_MAX                   4,194,304
    TCP_RECEIVE_SIZE_MIN                       4,096
    TCP_SEND_SIZE_DEFAULT                     16,384
    TCP_SEND_SIZE_MAX                      4,194,304
    TCP_SEND_SIZE_MIN                          4,096
    Operating System Statistics -
    Snap Time           Load    %busy    %user     %sys    %idle  %iowait
    29-Feb 04:00:35      1.4      N/A      N/A      N/A      N/A      N/A
    29-Feb 05:00:41      1.7     13.8     13.2      0.6     86.2     15.8
    Foreground Wait Class              
    -> s  - second, ms - millisecond -    1000th of a second
    -> ordered by wait time desc, waits desc
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
    -> Captured Time accounts for         97.6%  of Total DB time      22,960.46 (s)
    -> Total FG Wait Time:            18,651.75 (s)  DB CPU time:       3,748.35 (s)
                                                                      Avg
                                          %Time       Total Wait     wait
    Wait Class                      Waits -outs         Time (s)     (ms)  %DB time
    User I/O                    3,327,253     0           18,576        6      80.9
    DB CPU                                                 3,748               16.3
    Commit                         23,882     0               69        3       0.3
    System I/O                      1,035     0                3        3       0.0
    Network                       842,393     0                2        0       0.0
    Other                          10,120    99                0        0       0.0
    Configuration                       3     0                0       58       0.0
    Application                       264     0                0        1       0.0
    Concurrency                     1,482     0                0        0       0.0
    Foreground Wait Events            
    -> s  - second, ms - millisecond -    1000th of a second
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by wait time desc, waits desc (idle events last)
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
                                                                 Avg
                                            %Time Total Wait    wait    Waits   % DB
    Event                             Waits -outs   Time (s)    (ms)     /txn   time
    db file sequential read       3,054,464     0     17,002       6    104.5   74.0
    read by other session           199,603     0        796       4      6.8    3.5
    direct path read                 46,301     0        439       9      1.6    1.9
    db file scattered read           21,113     0        269      13      0.7    1.2
    log file sync                    23,882     0         69       3      0.8     .3
    db file parallel read             4,727     0         68      14      0.2     .3
    control file sequential re        1,035     0          3       3      0.0     .0
    SQL*Net message to client       840,792     0          2       0     28.8     .0
    direct path read temp                95     0          2      18      0.0     .0
    local write wait                     79     0          0       4      0.0     .0
    Disk file operations I/O            870     0          0       0      0.0     .0
    ASM file metadata operatio            4     0          0      50      0.0     .0
    log file switch (private s            3     0          0      58      0.0     .0
    ADR block file read                  36     0          0       3      0.0     .0
    enq: RO - fast object reus            5     0          0      16      0.0     .0
    latch: cache buffers chain        1,465     0          0       0      0.1     .0
    SQL*Net break/reset to cli          256     0          0       0      0.0     .0
    asynch descriptor resize         10,059   100          0       0      0.3     .0
    SQL*Net more data to clien        1,510     0          0       0      0.1     .0
    enq: KO - fast object chec            3     0          0       8      0.0     .0
    SQL*Net more data from cli           91     0          0       0      0.0     .0
    latch: shared pool                   14     0          0       0      0.0     .0
    ADR block file write                  5     0          0       1      0.0     .0
    reliable message                      8     0          0       0      0.0     .0
    direct path write temp                1     0          0       2      0.0     .0
    SQL*Net message from clien      840,794     0     68,885      82     28.8
    jobq slave wait                   7,365   100      3,679     499      0.3
    Streams AQ: waiting for me          721   100      3,605    5000      0.0
    wait for unread message on        3,648    98      3,603     988      0.1
    KSV master wait                      20     0          0       0      0.0
    Background Wait Events            
    -> ordered by wait time desc, waits desc (idle events last)
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
                                                                 Avg
                                            %Time Total Wait    wait    Waits   % bg
    Event                             Waits -outs   Time (s)    (ms)     /txn   time
    log file parallel write          29,353     0         83       3      1.0   34.8
    db file parallel write            5,753     0         17       3      0.2    6.9
    db file sequential read           1,638     0         15       9      0.1    6.1
    control file sequential re        5,142     0         13       2      0.2    5.4
    os thread startup                   140     0          8      58      0.0    3.4
    control file parallel writ        1,440     0          8       6      0.0    3.4
    log file sequential read            304     0          8      26      0.0    3.3
    db file scattered read              214     0          2       9      0.0     .8
    ASM file metadata operatio        1,199     0          1       1      0.0     .3
    direct path write                    35     0          0       6      0.0     .1
    direct path read                     41     0          0       5      0.0     .1
    kfk: async disk IO                    6     0          0       9      0.0     .0
    Disk file operations I/O          1,266     0          0       0      0.0     .0
    ADR block file read                  16     0          0       2      0.0     .0
    read by other session                 3     0          0       8      0.0     .0
    Log archive I/O                       2     0          0      10      0.0     .0
    log file sync                         3     0          0       5      0.0     .0
    asynch descriptor resize            341   100          0       0      0.0     .0
    CSS initialization                    1     0          0       6      0.0     .0
    log file single write                 4     0          0       1      0.0     .0
    latch: redo allocation                3     0          0       1      0.0     .0
    ADR block file write                  5     0          0       1      0.0     .0
    LGWR wait for redo copy              45     0          0       0      0.0     .0
    CSS operation: query                  6     0          0       0      0.0     .0
    CSS operation: action                 1     0          0       1      0.0     .0
    SQL*Net message to client           420     0          0       0      0.0     .0
    rdbms ipc message                47,816    39     61,046    1277      1.6
    DIAG idle wait                    7,200   100      7,200    1000      0.2
    Space Manager: slave idle         1,146    98      5,674    4951      0.0
    class slave wait                    284     0      3,983   14026      0.0
    dispatcher timer                     61   100      3,660   60006      0.0
    Streams AQ: qmn coordinato          258    50      3,613   14003      0.0
    Streams AQ: qmn slave idle          130     0      3,613   27789      0.0
    Streams AQ: waiting for ti            7    71      3,608  515430      0.0
    wait for unread message on        3,605   100      3,606    1000      0.1
    pmon timer                        1,201   100      3,604    3001      0.0
    smon timer                           15    73      3,603  240207      0.0
    ASM background timer                754     0      3,602    4777      0.0
    shared server idle wait             120   100      3,601   30006      0.0
    SQL*Net message from clien          554     0          4       7      0.0
    KSV master wait                     101     0          0       2      0.0
    Wait Event Histogram              
    -> Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
    -> % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
    -> % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
    -> Ordered by Event (idle events last)
                                                        % of Waits
                               Total
    Event                      Waits  <1ms  <2ms  <4ms  <8ms <16ms <32ms  <=1s   >1s
    ADR block file read           52  73.1   1.9   9.6  13.5               1.9
    ADR block file write          10 100.0
    ADR file lock                 12 100.0
    ARCH wait for archivelog l     3 100.0
    ASM file metadata operatio  1203  97.3    .5    .7    .3    .2          .9
    CSS initialization             1                   100.0
    CSS operation: action          1       100.0
    CSS operation: query           6  83.3  16.7
    Disk file operations I/O    2118  95.4   4.5    .1
    LGWR wait for redo copy       45 100.0
    Log archive I/O                2                         100.0
    SQL*Net break/reset to cli   256  99.6    .4
    SQL*Net message to client  839.9 100.0    .0
    SQL*Net more data from cli    91 100.0
    SQL*Net more data to clien  1503 100.0
    asynch descriptor resize   10.4K 100.0
    buffer busy waits              2 100.0
    control file parallel writ  1440   5.7  35.1  24.0  16.3  12.0   5.5   1.5
    control file sequential re  6177  69.4   7.5   5.9   8.1   7.1   1.7    .3
    db file parallel read       4727   1.7   3.2   3.2  10.1  46.6  33.3   1.8
    db file parallel write      5755  42.3  21.3  18.6  11.2   4.6   1.4    .5
    db file scattered read     21.5K   8.4   4.3  11.9  18.9  26.3  25.3   4.9
    db file sequential read    3053.  28.7  15.1  11.1  17.9  21.5   5.4    .3    .0
    direct path read           46.3K   9.9   8.8  18.5  21.7  22.8  15.7   2.7
    direct path read temp         95               9.5   9.5  23.2  49.5   8.4
    direct path write             35  11.4  31.4  17.1  22.9  11.4   2.9   2.9
    direct path write temp         1       100.0
    enq: KO - fast object chec     3                    66.7  33.3
    enq: RO - fast object reus     5  20.0              20.0  20.0  20.0  20.0
    kfk: async disk IO             6  50.0  16.7              16.7        16.7
    latch free                     3 100.0
    latch: cache buffers chain  1465 100.0
    latch: cache buffers lru c     1 100.0
    latch: object queue header     2 100.0
    latch: redo allocation         3  33.3  33.3  33.3
    latch: row cache objects       2 100.0
    latch: shared pool            15  93.3   6.7
    local write wait              79        35.4  34.2  21.5   8.9
    log file parallel write    29.4K  47.8  21.7  11.9   9.9   6.8   1.6    .3
    log file sequential read     304   6.3   3.0   3.6  10.2  23.4  24.3  29.3
    log file single write          4  25.0  75.0
    log file switch (private s     3                                     100.0
    log file sync              23.9K  40.9  28.0  12.9   9.7   6.7   1.5    .3
    os thread startup            140                                     100.0
    read by other session      199.6  37.1  19.9  12.9  13.1  13.8   3.1    .2
    reliable message               8 100.0
    ASM background timer         755   2.9    .4    .1    .1    .3    .1    .3  95.8
    DIAG idle wait              7196                                     100.0
    KSV master wait              121  88.4   2.5   3.3   2.5    .8    .8   1.7
    SQL*Net message from clien 840.1  97.1   1.8    .5    .2    .2    .1    .0    .1
    Space Manager: slave idle   1147    .1                                  .5  99.4
    Streams AQ: qmn coordinato   258  49.6                .4                    50.0
    Streams AQ: qmn slave idle   130    .8                                      99.2
    Streams AQ: waiting for me   721                                           100.0
    Streams AQ: waiting for ti     7  28.6                                42.9  28.6
    class slave wait             283  39.9   2.5   2.5   3.5   4.9   9.2  15.2  22.3
    dispatcher timer              60                                           100.0
    jobq slave wait             7360    .0    .0    .0                    99.9
    pmon timer                  1201                                           100.0
    rdbms ipc message          47.8K   2.7  31.6  17.4   1.1   1.1    .9  20.9  24.3
    Wait Event Histogram               DB/Inst: I2KPROD/I2KPROD  Snaps: 5606-5607
    -> Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
    -> % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
    -> % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
    -> Ordered by Event (idle events last)
                                                        % of Waits
                               Total
    Event                      Waits  <1ms  <2ms  <4ms  <8ms <16ms <32ms  <=1s   >1s
    shared server idle wait      120                                           100.0
    smon timer                    16                                       6.3  93.8
    wait for unread message on  7250                                  .1  99.9
    Latch Miss Sources                
    -> only latches with sleeps are shown
    -> ordered by name, sleeps desc
                                                         NoWait              Waiter
    Latch Name               Where                       Misses     Sleeps   Sleeps
    In memory undo latch     ktichg: child                    0          1        0
    active service list      kswslogon: session logout        0          2        0
    cache buffers chains     kcbgtcr_2                        0      1,123      483
    cache buffers chains     kcbgtcr: fast path (cr pin       0        496    1,131
    cache buffers chains     kcbrls_2                         0          5        6
    cache buffers chains     kcbgcur_2                        0          4        0
    cache buffers chains     kcbgtcr: fast path               0          3        1
    cache buffers chains     kcbzwb                           0          2        4
    cache buffers chains     kcbchg1: kslbegin: bufs no       0          1        0
    cache buffers chains     kcbnew: new latch again          0          1        0
    cache buffers chains     kcbrls_1                         0          1        6
    cache buffers chains     kcbzgb: scan from tail. no       0          1        0
    cache buffers lru chain  kcbzgws                          0          1        0
    object queue header oper kcbo_switch_cq                   0          1        0
    object queue header oper kcbo_switch_mq_bg                0          1        2
    redo allocation          kcrfw_redo_gen: redo alloc       0          3        0
    row cache objects        kqrpre: find obj                 0          1        1
    row cache objects        kqrso                            0          1        0
    shared pool              kghalo                           0         13        3
    shared pool              kghupr1                          0          4       15
    shared pool              kghalp                           0          1        0
    space background task la ktsj_grab_task                   0          2        2
              -------------------------------------------------------------

  • Two phase commit and bean managed transactions

    To all the Transaction GURUS!
              Hi guys (-and gals).
              I've been doing J2EE for quite a while, but today was my first at
              XA-Transactions and Bean Managed Transactions.
              Why am I doing this?
              ====================
              Well I have to be able to controll the transactionalbehaviour of my
              bean
              during runtime, since some bean calls would cause a transactional
              overflow due to the stress they would cause to the system, whereas
              smaller bean calls need to run in one transaction.
              -> Therefore I need Bean Managed Transactions
              Since the bean does a call on two Database Connections it has to use a
              XA-Transaction.
              -> Therefore I need XA-Transactions.
              Abstract
              ========
              - I just can't get a User TransAction into the right Status it stays
              in 'STATUS_NO_TRANSACTION' all the time
              - Therefore the SQL Commands can be comitted 'java.sql.SQLException:
              Does not support SQL execution with no global transaction'
              - Therefore I can't do a rollback 'java.lang.IllegalStateException:
              Transaction does not exist'
              - Therefore I wrote this mail.
              I don't want to be a smart-"ass" writing such a detailed and indepth
              mail. I just would like to show that I tried, and would like to have
              some replies from you guys.
              Below are my configurations, code and logfiles.
              Thanx for taking your time and hope that the other people may learn
              something as well.
              cu
              Stefan
              Scenario
              ========
              used Software
              Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
              Oracle 8.1.6 using the API-Version 8
              I configured the system as follows:
              (ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
              excerpt from:
              config.xml
              <JDBCConnectionPool CapacityIncrement="5"
              DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
              LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
              Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
              <!-- Since this is our Main Datasource I would not like to use a XA
              Transaction due to performance Issues
              and the TxDataSource:
              -->
              <JDBCTxDataSource EnableTwoPhaseCommit="true"
              JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
              PoolName="oraclePool" Targets="fbsserver"/>
              <!-- no comment required -I hope.
              Next comes the "special" Pool
              -->
              <JDBCConnectionPool CapacityIncrement="5"
              DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="Users" SupportsLocalTransaction="true"/>
              <!-- Well since there can only be one none XARessourceManager involved
              in a 2PC
              (keyword: Two Phase Commit) I will have to use a XACapable Driver for
              the other
              Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
              using the jdriver for oci.
              I activated 'SupportsLocalTransaction' hoping it would solve my
              problem - without effect. I just left in there now, since it made
              sense me. Not?
              Again the TxDataSource:
              -->
              <JDBCTxDataSource EnableTwoPhaseCommit="true"
              JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
              Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
              <!-- The System starts right up and can locate the test tables and
              everything. So I think all of this stuff is working here -->
              ejb-jar.xml
              <ejb-jar>
                   <enterprise-beans>
                        <session>
                             <ejb-name>TPCTestBean</ejb-name>
              <home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
              <remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
              <ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
                             <session-type>Stateless</session-type>
                             <transaction-type>Bean</transaction-type>
                        </session>
                   </enterprise-beans>
                   <assembly-descriptor/>
              </ejb-jar>
              <!-- Originally I had the assembly-descriptor full of transaction
              requirements. I thought since
              the bean is handling all of the transaction stuff itself, it might get
              confused by the 'container-transaction'
              properties, and deleted them. Do I need them anyway?-->
              weblogic-ejb-jar.xml
              <weblogic-ejb-jar>
                   <weblogic-enterprise-bean>
                        <ejb-name>TPCTestBean</ejb-name>
                        <stateless-session-descriptor/>
                        <jndi-name>finstral/ejb/test_tpc</jndi-name>
                   </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              <!-- Nothing I have to explain here -->
              BeanCode (from the implementingBeanClass:
              'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
              public void setupTables() throws RemoteException
              UserTransaction tx = getTransaction();
              //getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
              some errorhandling
              log.info("Die Transaktion vor den Connections: "+tx.toString());
              //Sorry bout the German. You should get the Message though.
              log.info("Der Transaktionsstatus vor den Connections:
              "+transactionStatus(tx));
              Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
              //gets a Connection via a DataSourceName from the JNDI tree
              Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
              log.info("Die frische Connection conSecurity: "+conSecurity);
              log.info("Die frische Connection conContent: "+conContent);
              tearDownTable(conSecurity);
              //Does nothing special
              tearDownTable(conContent);
              log.info("Die Transaktion nach dem Teardown: "+tx.toString());
              log.info("Der Transaktionsstatus nach dem Teardown:
              "+transactionStatus(tx));
              Statement stmt = null;
              try
              stmt = conSecurity.createStatement();
              //Well its getting interesting now.....
              log.info("Die Transaktion vor dem createtable: "+tx.toString());
              log.info("Der Transaktionsstatus vor dem createtable:
              "+transactionStatus(tx));
              log.info("Die Connection conSecurity vor dem createtable:
              "+conSecurity);
              log.info("Die Connection conContent vor dem createtable:
              "+conContent);
              stmt.executeUpdate(CREATE_TABLE);
              //above is the row 91 -> throws: 'java.sql.SQLException: Does
              not support SQL execution with no global transaction'
              stmt.close();
              stmt = conContent.createStatement();
              stmt.executeUpdate(CREATE_TABLE);
              stmt.close();
              commitTransaction(tx);
              catch (SQLException sqle)
              log.error("Konnte kein table init machen", sqle);
              rollbackTransaction(tx);
              //The Code for this method is below
              throw new EJBException(sqle);
              finally
              closeConnection(conSecurity);
              closeConnection(conContent);
              protected void rollbackTransaction(UserTransaction tx)
              log.info("Der Transaktionsstatus vor dem Rollback:
              "+transactionStatus(tx));
              log.info("Die Transaktion vor dem Rollback: "+tx.toString());
              try
              tx.rollback();
              //above is row 200 -> throws: 'java.lang.IllegalStateException:
              Transaction does not exist'
              log.info("Der Transaktionsstatus nach dem Rollback:
              "+transactionStatus(tx));
              log.info("Die Transaktion nach dem Rollback: "+tx.toString());
              catch (Exception e)
              log.error("Konnte die Transaktion nicht backrollen.", e);
              throw new EJBException(e);
              Log Excerpt
              ===========
              INFO setupTables() (66) - Die Transaktion vor den Connections:
              [email protected]
              INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
              STATUS_NO_TRANSACTION
              INFO setupTables() (72) - Die frische Connection conSecurity:
              weblogic.jdbc.rmi.SerialConnection@7c6daa
              INFO setupTables() (73) - Die frische Connection conContent:
              weblogic.jdbc.rmi.SerialConnection@3b425
              INFO setupTables() (78) - Die Transaktion nach dem Teardown:
              [email protected]
              INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
              STATUS_NO_TRANSACTION
              INFO setupTables() (86) - Die Transaktion vor dem createtable:
              [email protected]
              INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
              STATUS_NO_TRANSACTION
              INFO setupTables() (88) - Die Connection conSecurity vor dem
              createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
              INFO setupTables() (89) - Die Connection conContent vor dem
              createtable: weblogic.jdbc.rmi.SerialConnection@3b425
              ERROR setupTables() (101) - Konnte kein table init machen
              java.sql.SQLException: Does not support SQL execution with no global
              transaction
                   at
              weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
                   at
              weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
                   at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
                   at
              weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.jav
              a:42)
                   at
              weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
              a:91)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
              Impl.java:130)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
              anEOImpl.java:64)
                   at
              de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
              mmitUnitTest.java:51)
                   at
              org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
              tCase.java:297)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
              tTestCaller.java:148)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
              ler.java:199)
                   at
              org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
              tRedirector.java:149)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                   at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
              java:213)
                   at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
              etContext.java:1265)
                   at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
              java:1631)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
              Rollback: STATUS_NO_TRANSACTION
              INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
              [email protected]
              ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
              backrollen.
              java.lang.IllegalStateException: Transaction does not exist
                   at
              weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
              nManagerImpl.java:228)
                   at
              weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
              nManagerImpl.java:222)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TPC
              Bean.java:200)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
              a:102)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
              Impl.java:130)
                   at
              de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
              anEOImpl.java:64)
                   at
              de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
              mmitUnitTest.java:51)
                   at
              org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
              tCase.java:297)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
              tTestCaller.java:148)
                   at
              org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
              ler.java:199)
                   at
              org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
              tRedirector.java:149)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                   at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
              java:213)
                   at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
              etContext.java:1265)
                   at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
              java:1631)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              CONCLUSION
              ==========
              I'm going nuts.
              I just don't get it.
              The transaction is the same. I don't change the Connection. I start
              the Transaction at the beginning before I do anything!
              Please guys help me out.
              Thx alot.
              Stefan "it's three o'clock in the morning, my girlfriend left me, and
              my only friend is that stupid linux pinguine" Siprell
              Software-Development
              <<<<<<<<<<<<<<<<<<<<<<<<<<<
              <sitewaerts> GmbH
              Hebelstraße 15
              D-76131 Karlsruhe
              Tel: +49 (721) 920 918 22
              Fax: +49 (721) 920 918 29
              http://www.sitewaerts.de
              >>>>>>>>>>>>>>>>>>>>>>>>>>>
              

    Hi Priscilla
              (did you ever see the movie ? :-))
              Well I moved away from the idea of using bean managed transaction. I'll
              be using Container Managed Transactions. To modify the
              transactionalbehaviour I'll write proxymethods which have certain
              different containermanaged transaction properties, but which all call
              the same private methods.
              But it works! Here is my experience:
              - I was doing a DDL statement: I was trying to create new Tables, which
              is a definite "no-go"
              - pay careful attention to:
              http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051405
                        and
              http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051741
              and use these Settings for the Pool, don't ask me why, but it took me
              hours to find it out by myself:
                   <JDBCConnectionPool CapacityIncrement="5"
              DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              Properties="user=xxx; password=xxx; server=xxx.xxx.xxx"
              RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              TestTableName="Users" SupportsLocalTransaction="true"/>
              where as the server (shown as: xxx.xxx.xxx) is the TNS Name of the
              Oracle Driver.
              It works great.
              Another thing you guys might want to do is write a simple StatelessSB
              which does JDBC calls and two different database Connections.
              Then write a UnitTest which calls this bean a couple hundred times (with
              the same transaction). Have one test do clean writes, and another which
              causes some SQL-Exception (too long Data Columns, or likewise).
              Always count the entries and see if everything worked out. We're using
              this SetupConstruction to test new combinations of AS(sorry Priscilla) /
              Database / Db-Drivers to have a "standard test".
              I know my two cents were uncalled for, but it might save you some
              time.....
              thanx for your help
              Stefan
              -----Ursprüngliche Nachricht-----
              Von: Priscilla Fung [mailto:[email protected]]
              Bereitgestellt: Donnerstag, 2. August 2001 21:42
              Bereitgestellt in: transaction
              Unterhaltung: Two phase commit and bean managed transactions
              Betreff: Re: Two phase commit and bean managed transactions
              Hi Stefan,
              Looks like you have not actually begun a transaction by calling
              UserTransaction.begin(),
              so your setupTables method is really executing with no transaction
              context.
              Priscilla
              Stefan Siprell <[email protected]> wrote:
              >To all the Transaction GURUS!
              >
              >Hi guys (-and gals).
              >I've been doing J2EE for quite a while, but today was my first at
              >XA-Transactions and Bean Managed Transactions.
              >
              >Why am I doing this?
              >====================
              >Well I have to be able to controll the transactionalbehaviour of my
              >bean
              >during runtime, since some bean calls would cause a transactional
              >overflow due to the stress they would cause to the system, whereas
              >smaller bean calls need to run in one transaction.
              >-> Therefore I need Bean Managed Transactions
              >Since the bean does a call on two Database Connections it has to use
              >a
              >XA-Transaction.
              >-> Therefore I need XA-Transactions.
              >
              >Abstract
              >========
              >- I just can't get a User TransAction into the right Status it stays
              >in 'STATUS_NO_TRANSACTION' all the time
              >- Therefore the SQL Commands can be comitted 'java.sql.SQLException:
              >Does not support SQL execution with no global transaction'
              >- Therefore I can't do a rollback 'java.lang.IllegalStateException:
              >Transaction does not exist'
              >- Therefore I wrote this mail.
              >
              >I don't want to be a smart-"ass" writing such a detailed and indepth
              >mail. I just would like to show that I tried, and would like to have
              >some replies from you guys.
              >
              >Below are my configurations, code and logfiles.
              >
              >Thanx for taking your time and hope that the other people may learn
              >something as well.
              >
              >cu
              >
              >Stefan
              >
              >
              >Scenario
              >========
              >
              >used Software
              >-------------
              >Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
              >Oracle 8.1.6 using the API-Version 8
              >
              >
              >I configured the system as follows:
              >(ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
              >excerpt from:
              >
              >config.xml
              >----------
              ><JDBCConnectionPool CapacityIncrement="5"
              >DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
              >LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
              >Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
              >RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              >TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
              >
              ><!-- Since this is our Main Datasource I would not like to use a XA
              >Transaction due to performance Issues
              >and the TxDataSource:
              >-->
              >
              ><JDBCTxDataSource EnableTwoPhaseCommit="true"
              >JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
              >PoolName="oraclePool" Targets="fbsserver"/>
              >
              ><!-- no comment required -I hope.
              >Next comes the "special" Pool
              >-->
              >
              ><JDBCConnectionPool CapacityIncrement="5"
              >DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
              >LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
              >Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
              >RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
              >TestTableName="Users" SupportsLocalTransaction="true"/>
              >
              ><!-- Well since there can only be one none XARessourceManager involved
              >in a 2PC
              >(keyword: Two Phase Commit) I will have to use a XACapable Driver for
              >the other
              >Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
              >using the jdriver for oci.
              >I activated 'SupportsLocalTransaction' hoping it would solve my
              >problem - without effect. I just left in there now, since it made
              >sense me. Not?
              >Again the TxDataSource:
              >-->
              >
              ><JDBCTxDataSource EnableTwoPhaseCommit="true"
              >JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
              >Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
              >
              ><!-- The System starts right up and can locate the test tables and
              >everything. So I think all of this stuff is working here -->
              >
              >
              >
              >ejb-jar.xml
              >-----------
              ><ejb-jar>
              >     <enterprise-beans>
              >          <session>
              >               <ejb-name>TPCTestBean</ejb-name>
              >     
              ><home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
              >     
              ><remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
              >     
              ><ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
              >               <session-type>Stateless</session-type>
              >               <transaction-type>Bean</transaction-type>
              >          </session>
              >     </enterprise-beans>
              >     <assembly-descriptor/>
              ></ejb-jar>
              >
              ><!-- Originally I had the assembly-descriptor full of transaction
              >requirements. I thought since
              >the bean is handling all of the transaction stuff itself, it might get
              >confused by the 'container-transaction'
              >properties, and deleted them. Do I need them anyway?-->
              >
              >weblogic-ejb-jar.xml
              >--------------------
              ><weblogic-ejb-jar>
              >     <weblogic-enterprise-bean>
              >          <ejb-name>TPCTestBean</ejb-name>
              >          <stateless-session-descriptor/>
              >          <jndi-name>finstral/ejb/test_tpc</jndi-name>
              >     </weblogic-enterprise-bean>
              ></weblogic-ejb-jar>
              >
              ><!-- Nothing I have to explain here -->
              >
              >BeanCode (from the implementingBeanClass:
              >'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
              >-----------------------------------------------------------------------
              >---------------------
              >
              > public void setupTables() throws RemoteException
              > {
              > UserTransaction tx = getTransaction();
              > //getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
              >some errorhandling
              >
              > log.info("Die Transaktion vor den Connections: "+tx.toString());
              > //Sorry bout the German. You should get the Message though.
              > log.info("Der Transaktionsstatus vor den Connections:
              >"+transactionStatus(tx));
              >
              > Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
              > //gets a Connection via a DataSourceName from the JNDI tree
              > Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
              >
              > log.info("Die frische Connection conSecurity: "+conSecurity);
              > log.info("Die frische Connection conContent: "+conContent);
              >
              > tearDownTable(conSecurity);
              > //Does nothing special
              > tearDownTable(conContent);
              >
              > log.info("Die Transaktion nach dem Teardown: "+tx.toString());
              > log.info("Der Transaktionsstatus nach dem Teardown:
              >"+transactionStatus(tx));
              >
              > Statement stmt = null;
              > try
              > {
              > stmt = conSecurity.createStatement();
              > //Well its getting interesting now.....
              >
              > log.info("Die Transaktion vor dem createtable: "+tx.toString());
              > log.info("Der Transaktionsstatus vor dem createtable:
              >"+transactionStatus(tx));
              > log.info("Die Connection conSecurity vor dem createtable:
              >"+conSecurity);
              > log.info("Die Connection conContent vor dem createtable:
              >"+conContent);
              >
              > stmt.executeUpdate(CREATE_TABLE);
              > //above is the row 91 -> throws: 'java.sql.SQLException: Does
              >not support SQL execution with no global transaction'
              >
              > stmt.close();
              >
              > stmt = conContent.createStatement();
              > stmt.executeUpdate(CREATE_TABLE);
              > stmt.close();
              > commitTransaction(tx);
              > }
              > catch (SQLException sqle)
              > {
              > log.error("Konnte kein table init machen", sqle);
              > rollbackTransaction(tx);
              > //The Code for this method is below
              > throw new EJBException(sqle);
              > }
              > finally
              > {
              > closeConnection(conSecurity);
              > closeConnection(conContent);
              > }
              > }
              >
              > protected void rollbackTransaction(UserTransaction tx)
              > {
              > log.info("Der Transaktionsstatus vor dem Rollback:
              >"+transactionStatus(tx));
              > log.info("Die Transaktion vor dem Rollback: "+tx.toString());
              > try
              > {
              > tx.rollback();
              > //above is row 200 -> throws: 'java.lang.IllegalStateException:
              >Transaction does not exist'
              > log.info("Der Transaktionsstatus nach dem Rollback:
              >"+transactionStatus(tx));
              > log.info("Die Transaktion nach dem Rollback: "+tx.toString());
              > }
              > catch (Exception e)
              > {
              > log.error("Konnte die Transaktion nicht backrollen.", e);
              > throw new EJBException(e);
              > }
              > }
              >
              >Log Excerpt
              >===========
              >INFO setupTables() (66) - Die Transaktion vor den Connections:
              >[email protected]
              >INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (72) - Die frische Connection conSecurity:
              >weblogic.jdbc.rmi.SerialConnection@7c6daa
              >INFO setupTables() (73) - Die frische Connection conContent:
              >weblogic.jdbc.rmi.SerialConnection@3b425
              >INFO setupTables() (78) - Die Transaktion nach dem Teardown:
              >[email protected]
              >INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (86) - Die Transaktion vor dem createtable:
              >[email protected]
              >INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
              >STATUS_NO_TRANSACTION
              >INFO setupTables() (88) - Die Connection conSecurity vor dem
              >createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
              >INFO setupTables() (89) - Die Connection conContent vor dem
              >createtable: weblogic.jdbc.rmi.SerialConnection@3b425
              >ERROR setupTables() (101) - Konnte kein table init machen
              >java.sql.SQLException: Does not support SQL execution with no global
              >transaction
              >     at
              >weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
              >     at
              >weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
              >     at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
              >     at
              >weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.ja
              v
              >a:42)
              >     at
              >weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
              v
              >a:91)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
              n
              >Impl.java:130)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
              e
              >anEOImpl.java:64)
              >     at
              >de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
              o
              >mmitUnitTest.java:51)
              >     at
              >org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
              s
              >tCase.java:297)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
              e
              >tTestCaller.java:148)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
              l
              >ler.java:199)
              >     at
              >org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
              s
              >tRedirector.java:149)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              >     at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
              >java:213)
              >     at
              >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
              l
              >etContext.java:1265)
              >     at
              >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
              >java:1631)
              >     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
              >Rollback: STATUS_NO_TRANSACTION
              >INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
              >[email protected]
              >ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
              >backrollen.
              >java.lang.IllegalStateException: Transaction does not exist
              >     at
              >weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
              o
              >nManagerImpl.java:228)
              >     at
              >weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
              o
              >nManagerImpl.java:222)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TP
              C
              >Bean.java:200)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
              v
              >a:102)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
              n
              >Impl.java:130)
              >     at
              >de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
              e
              >anEOImpl.java:64)
              >     at
              >de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
              o
              >mmitUnitTest.java:51)
              >     at
              >org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
              s
              >tCase.java:297)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
              e
              >tTestCaller.java:148)
              >     at
              >org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
              l
              >ler.java:199)
              >     at
              >org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
              s
              >tRedirector.java:149)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              >     at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
              >java:213)
              >     at
              >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
              l
              >etContext.java:1265)
              >     at
              >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
              >java:1631)
              >     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              >CONCLUSION
              >==========
              >I'm going nuts.
              >I just don't get it.
              >The transaction is the same. I don't change the Connection. I start
              >the Transaction at the beginning before I do anything!
              >Please guys help me out.
              >Thx alot.
              >
              >Stefan "it's three o'clock in the morning, my girlfriend left me, and
              >my only friend is that stupid linux pinguine" Siprell
              >Software-Development
              ><<<<<<<<<<<<<<<<<<<<<<<<<<<
              ><sitewaerts> GmbH
              >Hebelstraße 15
              >D-76131 Karlsruhe
              >
              >Tel: +49 (721) 920 918 22
              >Fax: +49 (721) 920 918 29
              >http://www.sitewaerts.de
              >>>>>>>>>>>>>>>>>>>>>>>>>>>>
              >
              >
              >
              

  • Tables stored in memory but may be accessed from other sessions

    Dear Oracle experts,
    it may be a stupid question but I'm searching for the best possibility to create a kind of temporary table which may be accessed from other sessions.
    Could you provide some hints/ catchwords to speed up my recherches.
    Thank you very much,
    Daniel

    danielwetzler wrote:
    danielwetzler wrote:
    I fear that the caching is not suitable for my case because of the reasons decribed in my other postings...First of all I don't think that you need to worry about the effectiveness of the caching in your particular case. In addition Oracle is very clever at when to actually write the dirty blocks from the buffer cache to the disks, so if your amount of data written to the result table is fairly small and no other activity is going on your system it won't get written to disk immediately anyway but stay in memory until any of the conditions are met that trigger the database writer to flush the blocks to disk.
    But there are options you could consider if you want to avoid as much of the overhead as possible and to write the results of your calculation to the result table as fast as possible.
    You could use direct-path inserts (INSERT /*+ APPEND */) and set the result table to "NOLOGGING". This way no undo and minimum redo is generated.
    Note however that there are certain caveats and restrictions to consider when using such an approach, e.g. your result table won't be recoverable (which you say is OK), only one direct-path insert is allowed simultaneously (it blocks the table exclusively, no other DML possible until you commit/rollback the transaction), and the direct-path insert has some restrictions. If any of these apply that prevent the direct-path operation then it silently falls back to "conventional" insert mode which generates undo and redo. One of the more annoying restrictions is that you can't read from a table that has been written to in direct-path mode within the same transaction, you first have to commit the transaction, otherwise you get "ORA-12838: cannot read/modify an object after modifying it in parallel". This means by simply adding the APPEND hint you might break existing logic.
    Finally the direct-path insert never re-uses free space in blocks below the current high-water mark, which means if you perform a direct-path insert and afterwards delete rows from the table and repeat again a direct-path insert operation your segment will grow and the empty space in the already used blocks won't get re-used. Best way would be to truncate the table rather than deleting rows from it.
    There are workarounds available to overcome some of these direct-path insert limitations (exclusive lock, truncate instead of delete etc.), like using a partitioned table (if you have a suitable edition/license), because direct-path inserts can be restricted to partitions. In this case you can do simultaneous direct-path inserts if you use different partitions, but you need then some kind of logic that determines which partition to use.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to view uncommited data from other session

    Hi
    I want to see data that is incommited from other sql session. How can I see it?
    Generally After commit data is available to other sessions.
    Please answer me ASAP.
    Wating for reply
    Jigar,

    You cannot do 'dirty reads' in Oracle. You can only see committed changes, and you have the choice of seeing committed changes after each individual statement in your transaction (default), or only after a transaction has finished. With the default level, running the same query multiple times within a transaction may yield different results.
    I suspect that you have used this approach with Sybase or SQL Server for performance reasons, but you will not need to do this with Oracle. I recommend you read Tom Kyte's "Expert One-On-One: Oracle" book for an excellent discussion of Oracle's locking and concurrency mechanisms.
    Hi
    I want to see data that is incommited from other sql session. How can I see it?
    Generally After commit data is available to other sessions.
    Please answer me ASAP.
    Wating for reply
    Jigar,

  • Java.sql.SQLException: You cannot commit during a managed transaction!

    Hi all,
    I'm just trying to get the tutorial Car EJP app to work with Jboss 3.2.1
    When creating a new car record by calling the car.edit() method it reaches
    the line
    pm.makePersistent (car);
    and then throws the exception
    com.solarmetric.kodo.runtime.FatalDataStoreException:
    com.solarmetric.kodo.runtime.FatalDataStoreException:
    java.sql.SQLException: You cannot commit during a managed transaction!
    [code=0;state=null]
    When checking the jboss log, it is clear that kodo is trying to commit the
    sequence update :
    at
    org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:477)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.commit(SQLExecutionManagerImpl.java:783)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory.updateSequence(DBSequenceFactory.java:267)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory.getNext(DBSequenceFactory.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.newDataStoreId(JDBCStoreManager.java:598)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistentFilter(PersistenceManagerImpl.java:1418)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:1348)
    at com.titan.kodojdotest.ejb.CarBean.edit(CarBean.java:51)
    How should i get this to work ????
    tx for your help,
    Roger.

    It appears that you are using ConnectionFactoryName. First be sure to
    set a ConnectionFactory2Name which will be a non-transactional (in terms
    of global transaction) DataSource for sequence generation for which you
    are seeing here. There are also some issues with JBoss's connection
    pooling on certain dbs if you are still seeing the problem after this.
    If so, try setting ConnectionURL, ConnectionPassword, etc explicitly
    Roger Laenen wrote:
    Hi all,
    I'm just trying to get the tutorial Car EJP app to work with Jboss 3.2.1
    When creating a new car record by calling the car.edit() method it reaches
    the line
    pm.makePersistent (car);
    and then throws the exception
    com.solarmetric.kodo.runtime.FatalDataStoreException:
    com.solarmetric.kodo.runtime.FatalDataStoreException:
    java.sql.SQLException: You cannot commit during a managed transaction!
    [code=0;state=null]
    When checking the jboss log, it is clear that kodo is trying to commit the
    sequence update :
    at
    org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:477)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.commit(SQLExecutionManagerImpl.java:783)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory.updateSequence(DBSequenceFactory.java:267)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory.getNext(DBSequenceFactory.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.newDataStoreId(JDBCStoreManager.java:598)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistentFilter(PersistenceManagerImpl.java:1418)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:1348)
    at com.titan.kodojdotest.ejb.CarBean.edit(CarBean.java:51)
    How should i get this to work ????
    tx for your help,
    Roger.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Can anybody pls tell me  limitations of BDC Session & Call transaction?

    hi, Guys, this is srinivas.
    How can we deside which method is to(BDC session/ Call transaction)
    use to upload data to SAP database?
    Can we run Call Transaction in Background?
    Which is preferable for bulk data? and Why?
    how can we restart Session if any error occurs?
    Thanku?

    Hi,
    Hope it helps this......
    SAP BDC INTERVIEW QUESTIONS  & ANSWERS
    1.       What is full form of BDC Session?
    Batch Data Communication Session.
    2.       What are the steps in a BDC session?
    The first step in a BDC session is to identify the screens of the transaction that the program will process.  Next step is to write a program to build the BDC table that will be used to submit the data to SAP.  The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.
    3.       How do you find the information on the current screen?
    The information on the current screen can be found by SYSTEM à STATUS command from any menu.
    4.       How do you save data in BDC tables?
    The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.
    5.       What is the last entry in all BDC tables?
    In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.
    6.       What is a multiple line field?
    A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.
    7.       How do you populate data into a multiple line field?
    To populate data into a multiple line field, an index is added to the field name to indicate which line is to be populated by the BDC session (Line index).
    8.       Write the BDC table structure.
    BDC table structure
    FIELD                     TYPE                            DESCRIPTION
    Program                CHAR (8)                      Program name of transaction.
    DynPro                 CHAR (4)                      Screen number of transaction.
    DynBegin              CHAR (1)                      Indicator for new screen.
    Fnam                    CHAR (35)                     Name of database field from screen.
    Fval                      CHAR (80)                     Value to submit to field.
    9.       Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?
    No.  The CALL TRANSACTION method allows only a single transaction to be processed by SAP.
    10.    Does the BDC-INSERT function allow multiple transactions to be processed by SAP?
    Yes.
    11.    What is the syntax for ‘CALL TRANSACTION’?
    CALL TRANSACTION trans .
    Three possible entries are there for MODE.
                      A          -           Show all screens.
                      E          -           Show only screens with errors.
                      N          -           Show no screens.
    Regards,
    V.Balaji
    Reward if usefull

  • Read By Other Session

    Hi
    Please help. The situation is that we found the Read By Other Sessions Event occurs and the sessions hang for a week. No new Sessions ID suffers from ths events and Just keep 10 Sessions ID with this event waiting. Our user didn't suffer any performance problem so far.
    Our Application layer is Web-based, I believe users related to those sessions are disconnected already. So How come those session ID waits so long !!!!
    Thx
    Kit

    Our DBA helped me to get the information from the V$Session. Let Session ID = 123. We found that this session has Read by Other Session" event from 17-May up to now every 10 seconds.
    DBA gives me the following fields to study
    Time
    INSTANCE_NUMBER
    SESSION_ID
    DB User
    EVENT_NAME
    CURRENT_OBJ#
    CURRENT_FILE#
    CURRENT_BLOCK#
    SEQ#
    EVENT_ID P1 P2 P3
    WAIT_TIME TIME_WAITED SQL_ID SQL_TEXT

  • Weird select could cause blocked other session

    Dear Gurus,
    Could you give me some explanation why select query could blocked other update sessions, please find below
    SID_BLOCKER BLOCKER WAITER
    Session ID: 22339    in instance 1 is blocking   Session ID: 296 in instance 1
    Session ID: 22339    in instance 1 is blocking   Session ID: 6673 in instance 1
    Session ID: 22339    in instance 1 is blocking   Session ID: 26091 in instance 1
    Elapsed: 00:00:01.77
    12:21:45 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 22339
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
    22339    40705 18135 26767 XLAPPC      cmwl21     INACTIVE 15-SEP-2013 23:25:35 java@cbtcm cbtcmpap02 18-SEP-2013 12:21:53
    pap02 (TNS
    V1-V3)
    SQL*Net message from client Idle 0            6649 WAITING
    Elapsed: 00:00:00.08
         PIECE SQL_TEXT
             0 SELECT ch_objects.obj_id, ch_objects.obj_type, ch_objects.obj_ex
             1 ternal_id, ch_objects.obj_name, ch_objects.obj_desc, ch_arcs.arc
             2 _relation, TO_CHAR (ch_arcs.arc_valid_from, 'YYYYMMDDHH24MISS'),
    3  TO_CHAR (ch_arcs.arc_valid_to, 'YYYYMMDDHH24MISS'), TO_CHAR (ch
             4 _objects.sys_update_date, 'YYYYMMDDHH24MISS') FROM ch_objects, c
             5 h_arcs WHERE ch_arcs.arc_child_id = :m_startObjID AND ch_arcs.ar
             6 c_relation IN (:relTypes0:relTypesInd0,:relTypes1:relTypesInd1,:
             7 relTypes2:relTypesInd2,:relTypes3:relTypesInd3,:relTypes4:relTyp
             8 esInd4,:relTypes5:relTypesInd5) AND ch_arcs.arc_father_id = ch_o
             9 bjects.obj_id AND TO_DATE (:m_effectiveTime, 'YYYYMMDDHH24MISS')
            10 BETWEEN ch_arcs.arc_valid_from AND ch_arcs.arc_valid_to
    Elapsed: 00:00:00.71
    12:21:54 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 6673
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
      6673    51927 15196 19846 XLAPPC      cmwl61 ACTIVE   16-SEP-2013 18:25:53 java@cbtaa cbtaampap01      18-SEP-2013 12:22:08
    mpap01 (TN
    S V1-V3)
    enq: TX - row lock contention Application 0            2681 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.03
         PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:00.69
    12:22:09 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 6673
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
      6673    51927 15196 19846 XLAPPC      cmwl61 ACTIVE   16-SEP-2013 18:25:53 java@cbtaa cbtaampap01      18-SEP-2013 12:22:21
    mpap01 (TN
    S V1-V3)
    enq: TX - row lock contention Application 0            2695 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.03
         PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:00.63
    12:22:22 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 26091
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
    26091    15759 57714 32378 XLAPPC cmwl11     ACTIVE   17-SEP-2013 14:08:58 java@cbtcm cbtcmpap01       18-SEP-2013 12:22:45
    pap01 (TNS
    V1-V3)
    enq: TX - row lock contention Application 0            2051 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.04
        PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:03.89
    Regards,

    Session 22339 is only currently running a SELECT.  However, it might have, in the past, run an UPDATE or DELETE statement (against the rows that the other sessions want to update) without yet issuing a COMMIT (or ROLLBACK).  So the previous DML by this session makes it the "blocker" session.
    Hemant K Chitale

  • Firefox is not saving open tabs when closing, it says other session of Firefox is running but this is not the case.

    Firefox used to save open tabs when closing the browser. This no longer happens and Firefox says other session running. Task Manager shows that this is not the case.
    Recently installed an flv/mpeg viewer "aLot" which placed a toolbar in Firefox.
    Am running Firefox 3.0.5 on Windows XP with Service Pack 3.

    Your useragent says your are running Firefox 3.6.13 -> is that true.
    If not, do the following and post back your new Firefox version:
    * Type about:config in the URL bar and hit Enter
    * If you see the warning, you can confirm that you want to access that page.
    * Filter = general.useragent.
    * Right-click the preferences that are bold, one line at a time, and select Reset.
    * Then restart Firefox

  • How can I see the NLS_PARAMETERS of other sessions

    Reposting this here, didn't realize this forum existed.
    For debugging purposes, I would like to see the NLS_PARAMETERS of other active sessions. This is on Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit.
    Neither of these are what I am looking for:
    SQL> select * from v$nls_parameters;
    -- Will only show me the settings of my own session.
    SQL> select * from nls_database_parameters;
    -- Lists permanent NLS parameters of the databasePls advise.
    -Johan

    Indeed, this information is not easily available. NLS environment is kept in an UGA variable and other sessions to not have access to it. Skilled Oracle engineers would be able to get this information from an UGA dump but otherwise it is not retrievable.
    I do not even see a way to log ALTER SESSION through a trigger (as it is not a DDL).
    -- Sergiusz

  • How to find out histotry command from other session

    Hi gurus,
    I use RHEL 5.4
    Some user log onto server with root and make change at some files. How can I find out history command from other session with the same user.
    history command is just give me history commands of my own session.
    Thanks
    Ch

    The file which holds the commandline history is .bash_history in the home directory of the user.
    So in the case of root, /root/.bash_history
    Please mind that if you log in as root, or become root your session will add to that file as well.
    Another issue with the history file is that when multiple sessions are logged in, every session writes in its own version of the same file. So the last one "wins", which means that version is the one which is truly stored.
    If files are changed, a find command with the 'mtime' parameter should be helpful.

  • Down payment request for other special GL transactions

    Hi ALL,
    Is it possible to post down payment request for other special GL transactions?
    If not , I Have a scenario that I have to generate down payment request with different alternative reconciliation accounts , but same reconciliation account.
    As we cannot assign different alternative reconciliation accounts for same reconciliation account  in special GL indicator "F- down payment request), how to post down payment request with different alternative reconciliation accounts?
    Even though I have created different special GL indicators for different alternative reconciliations accounts with same reconciliation accounts, I couldn't post down payment request, only down payment is possible. how to solve?
    regs,
    ramesh b

    Please do the following
    1. Activate Reconciliation account ready input setting for your Main reconciliation account in FS00
    2. If you dont find the setting in FS00, then you have to change FSG settings for this account group in OBD4.
    3. Also assign alternative reconciliation accounts to your reconciliation account
    Now system asks you to input the alternative recon account when you do the transactions.
    Rgds
    Murali.N

  • Issue with "read by other session" and a parallel MERGE query

    Hi everyone,
    we have run into an issue with a batch process updating a large table (12 million rows / a few GB, so it's not that large). The process is quite simple - load the 'increment' from a file into a working table (INCREMENT_TABLE) and apply it to the main table using a MERGE. The increment is rather small (usually less than 10k rows), but the MERGE runs for hours (literally) although the execution plan seems quite reasonable (can post it tomorrow, if needed).
    The first thing we've checked is AWR report, and we've noticed this:
    Top 5 Timed Foreground Events
    Event     Waits     Time(s)     Avg wait (ms)     % DB time     Wait Class
    DB CPU           10,086           43.82     
    read by other session     3,968,673     9,179     2     39.88     User I/O
    db file scattered read     1,058,889     2,307     2     10.02     User I/O
    db file sequential read     408,499     600     1     2.61     User I/O
    direct path read     132,430     459     3     1.99     User I/OSo obviously most of the time was consumed by "read by other session" wait event. There were no other queries running at the server, so in this case "other session" actually means "parallel processes" used to execute the same query. The main table (the one that's updated by the batch process) has "PARALLEL DEGREE 4" so Oracle spawns 4 processes.
    I'm not sure how to fix this. I've read a lot of details about "read by other session" but I'm not sure it's the root cause - in the end, when two processes read the same block, it's quite natural that only one does the physical I/O while the other waits. What really seems suspicious is the number of waits - 4 million waits means 4 million blocks, 8kB each. That's about 32GB - the table has about 4GB, and there are less than 10k rows updated. So 32 GB is a bit overkill (OK, there are indexes etc. but still, that's 8x the size of the table).
    So I'm thinking that the buffer cache is too small - one process reads the data into cache, then it's removed and read again. And again ...
    One of the recommendations I've read was to increase the PCTFREE, to eliminate 'hot blocks' - but wouldn't that make the problem even worse (more blocks to read and keep in the cache)? Or am I completely wrong?
    The database is 11gR2, the buffer cache is about 4GB. The storage is a SAN (but I don't think this is the bottleneck - according to the iostat results it performs much better in case of other batch jobs).

    OK, so a bit more details - we've managed to significantly decrease the estimated cost and runtime. All we had to do was a small change in the SQL - instead of
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y' AND S.DIFF_FLAG IN ('U', 'D'))
      ...(which is the query listed above) we have done this
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB AND DIFF_FLAG IN ('U', 'D')) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y')
      ...i.e. we have moved the condition from the MERGE ON clause to the SELECT. And suddenly, the execution plan is this
    OPERATION                           OBJECT_NAME             OPTIONS             COST
    MERGE STATEMENT                                                                 239
      MERGE                             T_NOTUNIFIED_CLIENT
        PX COORDINATOR
          PX SEND                       :TQ10000                QC (RANDOM)         239
            VIEW
              NESTED LOOPS                                      OUTER               239
                PX BLOCK                                        ITERATOR
                  TABLE ACCESS          TMP_SODW_BB             FULL                2
                    Filter Predicates
                      OR
                        DIFF_FLAG='D'
                        DIFF_FLAG='U'
                  TABLE ACCESS          T_NOTUNIFIED_CLIENT       BY INDEX ROWID    3
                    INDEX               AK_UQ_NOTUNIF_T_NOTUNI    RANGE SCAN        2
                      Access Predicates
                        AND
                          D.NCLIENT_KEY(+)=NCLIENT_KEY
                          D.CURRENT_RECORD(+)='Y'
                      Filter Predicates
                        D.CURRENT_RECORD(+)='Y' Yes, I know the queries are not exactly the same - but we can fix that. The point is that the TMP_SODW_BB table contains 1639 rows in total, and 284 of them match the moved 'IN' condition. Even if we remove the condition altogether (i.e. 1639 rows have to be merged), the execution plan does not change (the cost increases to about 1300, which is proportional to the number of rows).
    But with the original IN condition (that turns into an OR combination of predicates) in the MERGE ON clausule, the cost suddenly skyrockets to 990.000 and it's damn slow. It seems like a problem with cost estimation, because once we remove one of the values (so there's only one value in the IN clausule), it works fine again. So I guess it's a planner/estimator issue ...

  • In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account.

    In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account. But if I want to use more than one yahoomail accounts, in private browsing is not working. Please suggest.

    That problem isn't related to Private Browsing specifically, that's how Firefox works with regards to multiple "sessions" with the same server - only one logon is allowed at any time. Try using one of these extensions to be able to run multiple session cookies.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

Maybe you are looking for

  • How do I create multiple columns with bullets in pages

    I'm trying to figure out how to create multiple columns within a document in which I bullet information...

  • After upgrading to Firefox 7.0.1 the logmein plugin doesn't work properly.

    I have the Logmein plugin version 1.0.0.664 dated 6/17/11 which has worked fine for Firefox 5, and 6. After updating to version 7 and now 7.0.1 when I log into logmein and click on the link to remote control a WS, I get a 'connecting' message but it

  • Interaction, View with SUD

    Hello, my plan is to create a view sheet with integrated dialog (as you can see below). What i would like to have is, that when the user klicks on the Button "Goto", a Interaction starts (InteractionOn) so that the user can select a point in the diag

  • Help needed to load XML into DB table

    I need some serious help if someone can spare the time. I am completely new to XML and don't really understand it yet but I need to be able to load an XML file (example) below. I want to load this into a table that would look like the following: CHAP

  • Wireless problems of TC

    i'm living all the problem of TC... just since somedays, i found a stable use of it... i don't know exactly why, but i changed some preferences... i try to connect this new stable way, to the change of the system of the password... i set it to WEP...