Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:22:31+00:00 2026-05-26T23:22:31+00:00

Is there an convenient way to log access to stored procedures from withing Oracle?

  • 0

Is there an convenient way to log access to stored procedures from withing Oracle? I am a web developer and presently we are required to pass a variety of user info to many stored procedures so that those procedures can in turn call another procedure that logs access to the original stored procedure in a table.

For example if I want to call a procedure called get_movie(id) that will return a row from the movie table based on id, I would have to do something like this get_movie(username, domain, ip, id) so that the procedure can log the user/domain/ip of the web user who initiated the call to the procedure.

It seems like there must be a better way but my knowledge of Oracle is limited.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:22:32+00:00Added an answer on May 26, 2026 at 11:22 pm

    I would set the common parameters using a procedure and sys_context every time you get your connection

    e.g:

    CREATE OR REPLACE PROCEDURE set_context
    (
        v_userid IN VARCHAR2,
        v_domain IN VARCHAR2,
        v_ip IN VARCHAR2,
        v_id IN VARCHAR2
    )
    AS
    BEGIN 
        DBMS_SESSION.SET_CONTEXT('SESSIONCONTEXT', 'username', v_userid); 
        DBMS_SESSION.SET_CONTEXT('SESSIONCONTEXT', 'domain', v_domain); 
        DBMS_SESSION.SET_CONTEXT('SESSIONCONTEXT', 'ip', v_ip); 
        DBMS_SESSION.SET_CONTEXT('SESSIONCONTEXT', 'id', v_id); 
    END;
    

    and to query the values:

    SELECT SYS_CONTEXT('SESSIONCONTEXT', 'username') FROM dual; 
    

    see: http://download.oracle.com/docs/cd/E14072_01/server.112/e10592/functions182.htm
    and

    Is there a way to communicate application context to a DB connection in non-Sybase DB servers (similar to set_appcontext in Sybase)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any convenient way to read and parse data from incoming request. E.g
Is there a convenient way to add an event handler to a web control
Is there a convenient way to generate code from any new view controllers I've
Is there a convenient way to calculate percentiles for a sequence or single-dimensional numpy
Is there a convenient way to do this for my extension? I know I
Is there any convenient way to type in braces in Math in Latex? Especially
Is there any convenient way to take an array/set of objects and create a
Is there a convenient way to get mouse deltas (e.g. mickeys) under X/linux? I
Is there a convenient way of setting the worksheet's font size and row height
Is there a convenient way to rearrange how multiple displays are positioned via C#?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.