Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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: 34378
346
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