troubleshooting Question

How to use 'alter session' in a package

Avatar of harfang
harfangFlag for Switzerland asked on
Oracle Database
21 Comments4 Solutions6947 ViewsLast Modified:
Hi Experts,

I need to use 'alter session' for two dozen functions stored in a package. Is there a way to alter the session for the entire package, or do I need to repeat these lines in every function?

This raises also the entire question of 'alter session' scope. If a function uses 'alter session', and if I use that function in a query, how would that affect things? The name suggests that this is a global setting, but perhaps there is a way to alter some settings locally (only for a package in my case). I would prefer that my functions do not have side effects.

I couldn't find any good explanation in the documentation, perhaps I just missed the right paragraph...

Thanks
Markus -- (°v°)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 4 Answers and 21 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 21 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros