In Toad do these steps ;
View -> Toad Options -> Editor -> Behavior choose Code Templates and add new code templates.
For example add finding lock objects by sessions ;
SELECT c.owner,
c.object_name,
c.object_type,
b.sid,
b.serial#,
b.status,
b.osuser,
b.machine
FROM v$locked_object a, v$session b, dba_objects c
WHERE b.sid = a.session_id AND a.object_id = c.object_id;
After complete adding your custom template , in toad editor you can just type your shortcut name and press
ctrl + space.You can add more sqls like autogenerate kill session sql commands ... etc. in order to your scenario.
1 yorum:
thanks for the post :))..
Yorum Gönder