DBA Data[Home] [Help]

TRIGGER: SYSTEM.EBS_LOGON

Source

Description
EBS_LOGON after logon on database
Type
AFTER EVENT
Event
LOGON 
Column
When
Referencing
REFERENCING NEW AS NEW OLD AS OLD
Body
declare
  l_service  varchar2(64) := sys_context('userenv', 'service_name');
  l_edition  varchar2(30);
begin
  -- If connected to patch_service
  if (l_service = 'ebs_patch') then
    begin
      -- get patch edition name
      select edition_name into l_edition
      from   dba_editions
      where  parent_edition_name =
          ( select property_value
            from   database_properties
            where  property_name = 'DEFAULT_EDITION' );

      -- set current edition to patch edition
      dbms_session.set_edition_deferred(l_edition);

      -- alter session so that pathing actions will wait for locks if needed
      execute immediate 'alter session set DDL_LOCK_TIMEOUT = 600';
    exception
      when no_data_found then
        RAISE_APPLICATION_ERROR(-20099,
            'E-Business Suite Patch Edition does not exist.');
    end;
  end if;
end EBS_LOGON;