471,337 Members | 1,161 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

usage of AFTER LOGON DATABASE trigger

plse help me how to use

AFTER LOGON DATABASE trigger


for chnging NLs settings in the java application
Oct 21 '09 #1

✓ answered by debasisdas

try this sample code
Expand|Select|Wrap|Line Numbers
  1. create or replace trigger mytrig1
  2. after logon on scott.schema
  3. declare
  4. a char(3);
  5. begin
  6. select to_char(sysdate,'dy') into a from dual;
  7. if a in('sun','sat') then
  8. Raise_application_error(-20004,'Cannot LOGIN today');
  9. end if;
  10. end;
  11.  

1 3376
debasisdas
8,127 Expert 4TB
try this sample code
Expand|Select|Wrap|Line Numbers
  1. create or replace trigger mytrig1
  2. after logon on scott.schema
  3. declare
  4. a char(3);
  5. begin
  6. select to_char(sysdate,'dy') into a from dual;
  7. if a in('sun','sat') then
  8. Raise_application_error(-20004,'Cannot LOGIN today');
  9. end if;
  10. end;
  11.  
Oct 21 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Roman Troshkov | last post: by
2 posts views Thread by mghale | last post: by
3 posts views Thread by Wojto | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.