Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't disable trigger

Status
Not open for further replies.

haste

Programmer
Feb 27, 2005
96
GH
Hi,
am trying to edit a table with trigger that validates input. I have locked the table in share row exclusive mode but when I try to disable the trigger it hangs like its locked. am running all the commands from the same sql peompt. Is there a way to find out who is locking the trigger or table?
 
Yes, Haste, try my "Locks.sql" script:
Code:
ttitle "Lock Listing"
set linesize 150
set echo off
col oruser format a16 heading "Oracle Username"
col osuser format a13 heading "O/S Username"
col obj format a20 heading "Locked Object"
col ss heading "SID/Ser#" format a12
col time heading "Logon Date/Time" format a19
col rs heading "RBS|Name" format a4
col unix heading "Unix|Process" format a9
col computer heading "Machine name|of Locker" format a20
set linesize 120
select     owner||'.'||object_name obj
   ,oracle_username||' ('||s.status||')' oruser
   ,os_user_name osuser
   ,machine computer
   ,l.process unix
   ,''''||s.sid||','||s.serial#||'''' ss
   ,r.name rs
   ,to_char(s.logon_time,'yyyy/mm/dd hh24:mi:ss') time
from       v$locked_object l
   ,dba_objects o
   ,v$session s
   ,v$transaction t
   ,v$rollname r
where l.object_id = o.object_id
  and s.sid=l.session_id
  and s.taddr=t.addr
  and t.xidusn=r.usn
order by osuser, ss, obj
/
ttitle off
set linesize 132

Thu May 05                                                                                                     page    1
                                                      Lock Listing

                                                    Machine name         Unix                   RBS
Locked Object        Oracle Username  O/S Username  of Locker            Process   SID/Ser#     Name Logon Date/Time
-------------------- ---------------- ------------- -------------------- --------- ------------ ---- -------------------
TEST.AUDITOR         TEST (INACTIVE)  TENFOLD\dhunt TENFOLD\TFMOBILE2709 2664:2660 '8,18'       RBS2 2005/05/05 11:54:04
TEST.S_EMP           TEST (INACTIVE)  TENFOLD\dhunt TENFOLD\TFMOBILE2709 2664:2660 '8,18'       RBS2 2005/05/05 11:54:04
************************************************************************************************************************
Let us know if this helps you resolve your need.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Thanks for the script. Works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top