Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

db2 locks with db visualizer

 
Rayssa Moon
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • 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
     
    Rayssa Moon
    Greenhorn
    Posts: 11
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you, it helps! Since we use FOR FETCH ONLY or FOR READ ONLY we did not heard of locking problems anymore. Thanks again!
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic