Forum Stats

  • 3,853,615 Users
  • 2,264,246 Discussions
  • 7,905,417 Comments

Discussions

How to capture MODULE column of V$SESSION on Database Logon trigger

Wason Naveen
Wason Naveen Member Posts: 36
edited Feb 17, 2010 2:16AM in General Database Discussions
When accessing V$SESSION within a logon trigger, it appears that the MODULE column (where I would hope to see SQL*Plus) is not populated until after the actual login is accomplished. Is that true? If so, can this data be found elsewhere before the logon is finalized?

The MODULE column of V$SESSION only gets populated with the DBMS_APPICATION_INFO package. SQL*Plus automatically uses this package and registers the application with the database. This is why you can see it in the MODULE column of V$SESSION. Unfortunately, this won't happen until near the end of the SQL*Plus initialization.
So my LOGON TRIGGER won't capture this information. I used BEFORE LOGON trigger and AFTER LOGON trigger also. but i m not able to capture module name.
Tagged:

Answers

  • Satish Kandi
    Satish Kandi Member Posts: 9,627 Gold Trophy
    I used BEFORE LOGON trigger and AFTER LOGON trigger also. but i m not able to capture module name.
    How did you create a BEFORE LOGON trigger? Could you please share with us?

    Try using DBMS_APPLICATION_INFO.READ_MODULE and see if that helps you capture the sqlplus in MODULE.
This discussion has been closed.