Gesperrte Tabelle entsperren: Unterschied zwischen den Versionen

Aus PPwiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „==Unlocking an oracle table== 1) Get the object ID of the locked table: SELECT object_id FROM dba_objects WHERE object_name='YOUR TABLE NAME'; 2) Get the SI…“)
 
(kein Unterschied)

Aktuelle Version vom 21. Januar 2022, 15:48 Uhr

Unlocking an oracle table

1) Get the object ID of the locked table:

SELECT object_id FROM dba_objects WHERE object_name='YOUR TABLE NAME';

2) Get the SID values for this ID:

SELECT sid FROM v$lock WHERE id1=OBJECT ID FROM STEP1

3) Get the session values for these SIDs:

SELECT sid, serial# from v$session where sid in (COMMA SEPARATED LIST OF SIDs FROM STEP2.)

4) Kill the sessions causing the lock:

ALTER SYSTEM KILL SESSION (SID,SERIAL#)

pair values from step 3 e.g. ALTER SYSTEM KILL SESSION '231,23454'