Executing additional SQL statements after creating new sessions

blogin

Member²
Hello.

Our company was forced to execute additional SQL statements after each Oracle session has been created. It is needed to get more privileges than our accouts have by default and achived by executing "SET ROLE ... identified by ..." statement. Without this feature we will not be able to debug PL/SQL code inside PL/SQL Developer.

Since PL/SQL Developer lacks this feature I looked into Plugin Interfeace Documentation and foud that there is not possible to create event function executed after each session was opened, which could get Oracle session's id, and then execute SQL statement inside this Oracle session.

Am I right or maybe I missed something ? Maybe someone had simmilar problem and found some solution.

Kind regards,
Bertrand
 
there is a file in the root of your PLSD install called afterconnect.sql. if you enter commands in here, they will execute when a new session is created.

there is also a login.sql, you can try that one, but i think afterconnect is the one you want.
 
Back
Top