Skip to Main Content

SQL & PL/SQL

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!

Shared Session Data

692005Mar 20 2009 — edited Jul 27 2009
Hello Everyone,
I have a problem that I could not seem to find a solution or best methods and practices for.

I have session level data abstracted by a package API and accessed query-inline via a table function. All this works fine; however, there is one caveat that does not. The query SQL is passed to a jobs table and executed by a scheduled job. So the job session can not see the user session data.

Is there a way to:
1) Share Session data?
2) define a table as containing Session temporary data, but public scope?
3) Group Sessions or grant session privileges (to share scope)?
4) Run a process/job under a different Session ID, or with specific Session privileges?
5) Call a procedure or function from one session, but have it Execute under a different session?

As it stands, I can either copy the data out to a permanent table (and manually implement Session ID, and Session level cleanup), change the current API and underlying global temporary table to a permanent table (and again manually implement Session ID, and Session level cleanup), or before job scheduling parse the SQL, and expand the function table data into the SQL statically.

None of these are solutions I like. I am looking for something more elegant. Any suggestions would be appreciated.

*EDIT: sorry, I forgot to add; I'm using Oracle 10g.

Thank you for your time.

Edited by: user10921261 on Mar 20, 2009 11:57 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2009
Added on Mar 20 2009
5 comments
1,444 views