HELP : v$session.module [message #181239] |
Fri, 07 July 2006 10:57 |
henryhrcr
Messages: 6 Registered: July 2006
|
Junior Member |
|
|
I need to identify my application, so i use dbms_application_info.set_module in the POST-LOGON of the principal form of my application, i use :
dbms_application_info.set_module('MY-APPLICATION',NULL);
this sentence let me identify my application, so if i query the v$session.module in sql, i can see 'MY-APPLICATION' in v$session. This work good !!!
But the problem is, i need to do some restrictions in the POST-LOGON trigger in DATABASE, but this trigger in database start before the post-logon trigger in the form. So when i going to verify in the post-logon in database, the v$session.module is not set yet. This is in blanks or null.
This is the code example :
IN THE FORM
IN POST-LOGON TRIGGER
Dbms_Application_Info.Set_Module('MY-APPLICATION',Null);
IN DATABASE LEVEL
CREATE OR REPLACE TRIGGER Check_Restrictions
After Logon ON DATABASE
declare
vc_module varchar2(200);
begin
select S.module
into vc_Module
from v$session S
where audsid = USERENV('sessionid');
if vc_Module <> 'MY-APPLICATION' then
-- Fire the restrictions
end if;
end;
The problem is, when my application starts, the after logon trigger in database starts before POST-LOGON trigger in the forms, so the v$session.module is not set yet, so i can not do the restrictions.
I Apreciate your help.
Thanks !!!
|
|
|
Re: HELP : v$session.module [message #186257 is a reply to message #181239] |
Mon, 07 August 2006 03:31 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I'm sorry but I missed your posting.
Have you solved your problem?
I suggest doing the restriction testing in the When-New-Form-Instance trigger. By that time all the logon activities will be finished.
David
|
|
|