Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Recognizing a connection via a database link, in a logon trigger

mtefftMay 15 2011 — edited May 18 2011
Can anyone suggest a means for a logon trigger to (1) recognize that the connection is via a database link and (2) determine the name of the database link?

I want to use this information to ALTER SESSION SET CURRENT_SCHEMA.

Rationale: I have some database links that are defined with credentials for users that have excessive privileges. I want to replace the users on the links with users that have less privileges. However, changing the user would also affect the name resolution. To reduce the risks of this change, I would like to use a logon trigger to detect that the connection is over a database link, determine the name of the link used, and (via an algorithm I hope to delegate to someone unsuspecting) determine how to set the CURRENT_SCHEMA to more closely mimic the current behavior.

I appreciate any suggestions on this.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2011
Added on May 15 2011
7 comments
1,088 views