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);