This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 34837
369
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