Link to home
Start Free TrialLog in
Avatar of rwdaigle
rwdaigle

asked on

Find object owner when more than one have same name

(Oracle 9)

Within a trigger, I want to know what schema the trigger lives in.  The thing is I have the same trigger living in several different schemas, all with the same name.  So doing a select off of dba_objects won't get me anywhere b/c the "object_name" column isn't a unique identifier.  I.e.:

SCHEMA1.USR_TRG
SCHEMA2.USR_TRG

-- USR_TRG --
...
schemaName := ?
-- do something with the schema name now

Any ideas on how to uniquely identify the trigger and its owner?
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwdaigle
rwdaigle

ASKER

Yes, of course I can.  That's what I was looking for.  Specifically: SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA').

Thanks!