did you know you can paste the screenshots directly into your message?
Thanks! Fixed it
are you logged in as the user that owns the trigger?
we make this call to get the ddl - if you run it in a worksheet, what do you see?
WITH src AS (
FROM sys.dba_source -- when you are logged in as DBA, check the View > Log > Statements panel to see what runs when you do not have access to dba views
WHERE type = :type
AND owner = :owner
AND name = :name
SELECT MAX(origin_con_id) max_orig
WHERE origin_con_id = max_orig
ORDER BY line
> are you logged in as the user that owns the trigger?
No. User has only SELECT granted on the table.
> we make this call to get the ddl - if you run it in a worksheet, what do you see?
For DBA user shows all lines returned.
For non-DBA user, I replaced DBA_SOURCE with ALL_SOURCE - No rows returned
> When user don't have access to DBA views, this code is shown in log pane
select text prefix, null trigger_body from all_source
and USER = :OWNER
and TYPE = :TYPE
union all --disjoint
select 'trigger '||description, trigger_body from all_triggers
where /*vacuous bind to match*/:TYPE='TRIGGER' and owner = :OWNER and trigger_name = :NAME
and USER != :OWNER
Mystery solved : Its missing when_clause column