• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

db2 locks with db visualizer

 
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)?
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • 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!
     
    Dinner will be steamed monkey heads with a side of tiny ads.
    the value of filler advertising in 2020
    https://coderanch.com/t/730886/filler-advertising
      Bookmark Topic Watch Topic
    • New Topic