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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto commit in db2

Status
Not open for further replies.

val02

Programmer
Jul 29, 2002
5
IN
hi all

how to turn off auto commit in db2? i think auto commit must be on by default as what ever i do in QMF gets committed even if i issue roll back

thanks and regards

vallabh

 
afaik there is no global setting for auto-commit, but when running a script from the command line (like "db2 -vstf scriptname.sql") you can issue "+c" to turn off auto-commit.

hope that helps, and please correct me if someone knows where to turn off autocommit globally.

P2oldi
 
That's a good question in fact i try to do the same things :
turning off the autocommit
you're right by default it's on.
i need to turn off this autocommit but in a program it seems not able to compil thoses lines:
EXEC SQL CONNECT TO XXX USER XXX USING XXX AUTOCOMMIT OFF
neither EXEC SQL AUTOCOMMIT OFF or =NO
where do you want me to specifie db2 +c i have more than 40 sqc programm that use and modify the database i don't use a direct line processor

i hope that this question will positives answers Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top