Re: procedure submitted to dbms_job - implicit commit?
Date: Tue, 22 Jul 2008 14:26:22 +0000 (UTC)
Message-ID: <g64qme$aj5$1@reader1.panix.com>
steph <stephan0h_at_yahoo.de> wrote:
> Hi group,
> I'm just wondering - and I tried to look it up in the documentation:
> When I submit a dbms_job calling a pl/sql-procedure and this procedure
> does some data-changes - is it for sure that this changes are
> commited? (There is no commit in the procedure.)
> I've tried with a little test-case and the job's changes seem to be
> commited - but I'm not sure if this is standard behaviour. Is it
> possible to submit a job that does no implicit commit?
From Chapter 6 of the PL/SQL User's Guide and Reference:
"You should explicitly commit or roll back every transaction. Whether you issue the commit or rollback in your PL/SQL program or from a client program depends on the application logic. If you do not commit or roll back a transaction explicitly, the client environment determines its final state."
Clearly DBMS_JOB commits automatically (although I imagine it issues a rollback if the job throws an error). This is really the required behavior - if it didn't, how would you commit the changes? Bear in mind that the job will run in its own session.
-- _______________________________________________________________________ Dan Blum tool_at_panix.com "I wouldn't have believed it myself if I hadn't just made it up."Received on Tue Jul 22 2008 - 09:26:22 CDT