Clear the db locks automatically using script.

In my database server getting db locks and table locks, So manually execute the script and kill the blocking sessions.. this issue has been coming often..

 

Is there nay way to put the script in crontab, then it will run every Minuit and kill sessions automatically.

 

if you have any script share me.. It would help me lot.

 

thanks

Default Asked on October 18, 2018 in ORACLE.
Add Comment
1 Answer(s)

Dear Rao,

We can achieve this. However this is a not a recommended way to handle db locks.

Best way is write a script that will report blocking sessions. And when any alert comes , log in to database and analyze the blocking sessions and take actions.

 

There might be cases, where application would be causing blocking, and if you kill then it might impact the application. So in that case, follow up with application team to find root cause.

 

 

Regards

Admin

Newbie Answered on October 21, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.