This content has been marked as final. Show 6 replies
What do you mean by "run as another user'?
You can simply log in as another user and run, right? (schema_name.procedure_name(....); )
Or are you talking about AUTHID DEFINER clause? If you define the procedure as "AUTHID DEFINER", it will always run with the rights of the creator of the procedure..
Just connect as that 'another user' and run the procedure?
If that isn't what you're looking for then explain in more details (database version, etc) please.
In addition to the other mentioned options:
You might want to check out CURRENT_SCHEMA.
"The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement.
This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name."
Edited by: Hoek on Mar 4, 2013 1:44 PM