My production database always getting table locks

Hi Sir,

One of our production db server always getting table locks, i used to clear using below query. Kindly tell me, how can i make automatic bash script using below query in crontab.
or else, if u have nay automatic script, kindly share, it would help to save my time..
select ‘ALTER SYSTEM KILL SESSION ”’||SID||’,’||SERIAL#|| ”’IMMEDIATE;’ FROM v$session where sid in (SELECT DISTINCT HOLDING_SESSION FROM DBA_WAITERS);

 

Default Asked on September 4, 2019 in ORACLE.
Add Comment
0 Answer(s)

Your Answer

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