Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "db2 locks with db visualizer" Watch "db2 locks with db visualizer" New topic
Author

db2 locks with db visualizer

Rayssa Moon
Greenhorn

Joined: Dec 02, 2006
Posts: 11
Hi,

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: 1081

  • 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,
    Shailesh


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

    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!
     
    wood burning stoves
     
    subject: db2 locks with db visualizer
     
    Similar Threads
    Creating Database Connection profile using connection url
    The open transaction does not read the updated value from external transaction
    newbie to MySql how to visualize?
    DB Visualizer Execution Plan
    DB2 needed on Application Server?????