473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

using setAutoCommit(false) in DB2 and MSSQL

9
I need to use commit and rollback feature in DB2. With executeBatch() feature.

I am facing the problems

a) journalling features are contradicting with it
what does that mean? And how to get rid of that.

b) I am not sure what is the databse version. How to see the version of database and the compatibility as far as executeBatch() support is concerned

c) Do we need it mandatorily to use autoCommit= false for using executeBatch()

Again I also need to use executeBatch() in MSSQL. but to do so when I am trying to use setAutoCommit(false) I am getting error related to cursor lock.

Hve someone through such problems? Any help is appreciated.
Sep 29 '08 #1
2 3636
sakumar9
127 Expert 100+
It would be helpful if you can provide some additional information like what is the problem that you are facing.

1. Use 'db2level' command to get the database version.
2. You can also refer to some of the samples that are shipped with DB2. You can find them at SQLLIB/samples directory.

(I am sure I didn't answered ur question......... :( )
Regards
-- Sanjay
Oct 1 '08 #2
giffy
9
Thanks Sanjay. And sorry for delayed addendum

for DB2 case when I am doing

Expand|Select|Wrap|Line Numbers
  1. setAutoCommit(false);
nothing changes. And things seem to be working the same way as with the default setting of autoCommit mode on transaction level.

When i tried to find the reason it was suggested that to get that working. You need to put the journaling on on DB2 file on which you want this feature to work.

And setting on and off the journals is a cumbersome process for this file with more than 60K records.

==============

Again related to autoCommit change in MSSQL. Once I do that I am not able to open another resultSet even for select once I do
setAutoCommit(false);

. When trying to do so I am getting an error related to cursor. I dun have the exact message. But it was suggested to use

Expand|Select|Wrap|Line Numbers
  1. selectMethod=cursor instead of default "Direct" 
So I added the parameter ;SelectMethod=Cursor to JDBC URL

but to no avail.

=======
hope I have provided more information.
Oct 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Vikram Jain | last post by:
Hey friends, I want create a database on a usb pendrive and acess it my server is MSSQL 7.0 when ever i plugin the pend drive. Please let me know the the procedure .. this is a chellenging job.....
1
by: Manuel | last post by:
Hello, I try to export a mssql database into a csv-file. I tried this with asp, but it doesn't work. <% Dim objConn Dim csv_path
3
by: Maciek Zywno | last post by:
Hi, I managed to do this by using a query and !! syntax, but it does not work with SPs. So I created a procedure with "@" to define a paraemter, but how can I pass a value to this procedure from...
1
by: PeerGrid | last post by:
We have a membership web site that is heavily database driven using MSSQL 2000. We are looking at converting to MSSQL 2005. What is the level of pain in doing this? Will all database calls have to be...
1
by: darwin gonzaga | last post by:
kindly tech me how to use crystal report using mssql server
4
by: jith87 | last post by:
con = DriverManager.getConnection("jdbc:mysql:///jk","rjk", "sivaji"); con.setAutoCommit(false); java.sql.Statement stmt = con.createStatement(); stmt.executeUpdate("INSERT INTO jk1(fname, lname)...
4
by: chromis | last post by:
Hi, I know this question has been asked before, but I seem to be getting different results from everyone else. I want to return times from my db table in this format: hh:mm:ss.mmm using mssql....
3
by: tiptap | last post by:
Hey, I have a really confusing problem here. I'm using MSSQL & PHP. I have created a querry in MSSQL that basically shows a list of events and shows them in date order. I have written a bit of...
5
ddtpmyra
by: ddtpmyra | last post by:
I cannot select the distinct records but Im pretty sure im connected to the database. Please tell me what's wrong with this? and why I cannot see the query result? thanks! echo "Status:"; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.