Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

autocommit in stored procedure

Status
Not open for further replies.

msng

Programmer
Oct 14, 2003
27
US
How do I set autocommit off in my stored procedure.

itried using the command

set autocommit off

but this gives me an error

please help. thanks.
 
How do you set it on, that's a question :)

Regards, Dima
 
"Set autocommit on" is a SQL*Plus command, not a SQL or a PL/SQL command. When you log into SQL*Plus, the default setting for AUTOCOMMIT is OFF:

SQL> show autocommit
autocommit OFF

If you explicitly turn it on in SQL*Plus, then run a PL/SQL block from within that PL/SQL session, autocommit is in effect, and it works.

But "SET AUTOCOMMIT ON" and "SET AUTOCOMMIT OFF" need to occur from the SQL*Plus prompt BEFORE the PL/SQL block begins execution.

Dave
Sandy, Utah, USA @ 18:27 GMT, 11:27 Mountain Time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top