Connecting Tech Pros Worldwide Forums | Help | Site Map

usage of AFTER LOGON DATABASE trigger

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 21 '09
plse help me how to use

AFTER LOGON DATABASE trigger


for chnging NLs settings in the java application
best answer - posted 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.  



debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,508
#2: Oct 21 '09

re: usage of AFTER LOGON DATABASE trigger


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.  
Reply

Tags
nls_settings_logontrigger