Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help:Pending transactions

Re: Help:Pending transactions

From: Mark Powell <Mark.Powell_at_eds.com>
Date: 17 Nov 1998 13:59:21 GMT
Message-ID: <01be1232$c91342a0$a12c6394@J00679271.ddc.eds.com>


Well,

  1. why not just include a parameter that lets the caller tell the procedure if it should issue the commit or not?
  2. or just leave it up to the caller
  3. I believe that there may be a well to tell if your session has done updates that have not been committed by:

select the sid from using the userenv function join this sid to the audit sid, audsid, in the v$session to get the v$session sid
using the v$session sid retrieve all matching rows in v$lock if any,   no rows would mean no locks
You might need to limit your lock search by type and mode depending on what it is you want to allow and disallow to be pending.

This will only work if the session executing the procedure is the same session that issued the prior SQL statements.

Bjørn Dybdal <bd_at_datani.dk> wrote in article <72paff$ggf$1_at_miri.tele.dk>...
> I'am about to write a stored procedure that will make some database
updates.
> The procedure will as well include a commit.
>
> When my procedure is called I want to check if there are any uncommited
> database changes and if so
> I don't want to execute a commit inside my procedure.
>
> How do I check if there are any uncommited database changes.
>
>
> Bjørn Dybdal
> bd_at_datani.dk
>
>
>
>
>
Received on Tue Nov 17 1998 - 07:59:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US