Populating the MODULE column of V$SESSION
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?
Your assumption is correct. 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 your LOGON TRIGGER won't capture this information. But I'd be willing to be that you are using a BEFORE LOGON trigger. Try using the AFTER LOGON trigger and see if that makes a difference.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.