Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help:Pending transactions
Well,
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