| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

07-08-04, 05:00
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 205
|
|
|
set autocommit equivalent ?
|
|
Hi,
What is the DB2 equivalent for "set autocommit on" of Oracle ?
Thanks,
Sam
|
|

07-08-04, 05:07
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,196
|
|
What interface are you using. For the CLI, autocommit is the default.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|

07-08-04, 05:12
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 205
|
|
|
|
Yes, CLI interface. What should I do to mae it 'off'. Please give the SQL Plus command for the same
Thanks,
Sam
|
|

07-08-04, 05:27
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,196
|
|
For the command:
db2 +c -tvf file-name
the "+c" will turn off autocommit. This is documented in the Command Reference in the discussion about CLI options.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|

07-08-04, 06:02
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
|
|
Profile Registry
If you want to turn it off permanently
set the variable db2options to +c (counterintuitive!)
using:
db2set db2options=+c
Look into the db2set -? for syntax.
BOW
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
|
|

07-08-04, 08:42
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 205
|
|
Hi,
Thanks for your reply.
But, again how to trun it on, with the same statement ?
Thanks,
Sam
|
|

07-08-04, 08:46
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
|
|
|
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
|
Last edited by Tank; 07-08-04 at 08:46.
Reason: syntax error
|

07-08-04, 09:03
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 205
|
|
Hi,
Once again thanks for your reply.
1) Can this command be executed through DB2 JDBC driver or only it could be executed from DB2 client SQL prompt ?
2) What are these commands called as ? Are they called as "SQL Plus commands"
Please advice.
Thanks,
Sam
|
|

07-08-04, 09:14
|
|
Registered User
|
|
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
|
|
Maybe
Hi I'm not sure if these commands can be
processed through JDBC.
As far as I know, all commands beginnig with db2* are called
db2 commands and can be invoked directly from any command prompt,
as opposed to SQL statements who can only be invoked through the CLI
But I might be wrong.
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
|
|

07-08-04, 10:39
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
|
|
Quote:
|
Originally Posted by SamCute
Hi,
Once again thanks for your reply.
1) Can this command be executed through DB2 JDBC driver or only it could be executed from DB2 client SQL prompt ?
2) What are these commands called as ? Are they called as "SQL Plus commands"
Please advice.
Thanks,
Sam
|
In JDBC just do con.setAutoCommit(false)
__________________
--
Jonathan Petruk
DB2 Database Consultant
|
|

02-05-12, 01:13
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 4
|
|
Quote:
Originally Posted by Tank
If you want to turn it off permanently
set the variable db2options to +c (counterintuitive!)
using:
db2set db2options=+c
Look into the db2set -? for syntax.
BOW
|
Hi ,
I am new bie to db2, I connect to db2 as client on particular ip with the credentials that are common among team but for me there will be separate session but any how wat about if i want to set the auto commit made for my session to false that is to switch off....?? Shall I execute the same statement as other statement i do fire on tables ...!! please guide..!! 
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|