1 person found this helpful
I guess you created the package with invoker rights.
That's the catch or a security protection in other words ;-)
If you create the procedure with standard definer rights, you can switch between different SGIDs (assuming there are multiple workspaces associated to the same oracle schema), but you get the error you've just experienced when this is attempted from a procedure running with invoker rights.
Or, at least, this is my current understanding of the "problem" that, funnily enough, I encountered yesterday.
Well thank you for taking the time to share, Flavio.
I just had a look and my package is defined with
So no doubt in my checkered past usage of this package, I decided it needed to be so.
I'll look into it and see how things may have changed between versions, or maybe changed as I've been imagining things - in my particular scenario.
It may also be because when I first defined it, I was in a hurry just to find a method of scripting that worked and was efficient on a local environment. Never got a good chance to refine things.