SELECT
DECODE((COUNT(trigger_name)),0,'LOGON trigger missing',
'Number of logon triggers: ' || COUNT(trigger_name) ) "INFO"
FROM sys.dba_triggers
WHERE
TRIGGERING_EVENT LIKE 'LOGON%'
AND status='ENABLED'
AND owner='SYS'
UNION
SELECT
DECODE((COUNT(trigger_name)),0,'LOGOFF trigger missing','',
'Number of logoff triggers:' || COUNT(trigger_name)) "INFO"
FROM sys.dba_triggers
WHERE
TRIGGERING_EVENT LIKE 'LOGOFF%'
AND status='ENABLED'
AND owner='SYS'
DECODE((COUNT(trigger_name)),0,'LOGON trigger missing',
'Number of logon triggers: ' || COUNT(trigger_name) ) "INFO"
FROM sys.dba_triggers
WHERE
TRIGGERING_EVENT LIKE 'LOGON%'
AND status='ENABLED'
AND owner='SYS'
UNION
SELECT
DECODE((COUNT(trigger_name)),0,'LOGOFF trigger missing','',
'Number of logoff triggers:' || COUNT(trigger_name)) "INFO"
FROM sys.dba_triggers
WHERE
TRIGGERING_EVENT LIKE 'LOGOFF%'
AND status='ENABLED'
AND owner='SYS'
Etiketler :
Oracle