This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to check if an oracle table has a lock on it from a java application

 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have an application on which oracle procedure would run every day to replicate data. I will be locking these tables during procedure is being executed.

During my procedure is being executed, user may try to update/delete records in locked table

How can i intimate a user that the table he is trying to update/delete through java application is locked.

kindly help
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rewa,
You can set some sort of flag in your application when the procedure starts/stops. There isn't a way to tell that the table is locked from Java.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look for some statistic view of your database. hope you would find one giving you the desired info.

And ofcourse, you can always do it by implementing some logic of your own.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic