This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes db2 locks with db visualizer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "db2 locks with db visualizer" Watch "db2 locks with db visualizer" New topic

db2 locks with db visualizer

Rayssa Moon

Joined: Dec 02, 2006
Posts: 11

In the J2EE project I work now we are using DB2 databases and we interact with them through DB Visualizer 4.1, with auto-commit set to true. Third parties in the project said that we are causing tables locking problems due to the fact that we are using DB Visualizer. They say we should use the command line (db2 console prompt) or command editor, provided by IBM with the installation of DB2 client. But I think these are too rudimentary. Also, they said that a team member in our team has definitively locked a table with a simple select and that their database admin has to manually type some commands in an administration tool to release the lock!! I do not think that DB Visualizer is that dummy and that it does not make locking management by itself!

That is why I think that the real problem is that the database is not well configured, but before checking that with them, I would like to know if possible, if anyone experienced locking issues in a team due to use of DB Visualizer (in particular DB Visualizer 4.1)?

If you want to do something, if you really, really want to do it, it's 98% done; the rest is only hard work...
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

  • Make sure all your query in DB visualizer ends with FOR FETCH ONLY. Also I would recommend that your all select query in the code follow the same pattern
  • When you execute query from java code, do set the resultSetConcurrency as CONCUR_READ_ONLY

  • Thanks,

    Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
    Rayssa Moon

    Joined: Dec 02, 2006
    Posts: 11
    Thank you, it helps! Since we use FOR FETCH ONLY or FOR READ ONLY we did not heard of locking problems anymore. Thanks again!
    I agree. Here's the link:
    subject: db2 locks with db visualizer
    It's not a secret anymore!