This content has been marked as final. Show 6 replies
What do you mean by "run as another user'?1 person found this helpful
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..
If the procedure is owned by user A, for example, and you are user B,1 person found this helpful
then just prefix the schema name:
This assumes user B has been granted EXECUTE access to that procedure.
begin A.proc_name; end;
Just connect as that 'another user' and run the procedure?1 person found this helpful
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
JUST USE THIS1 person found this helpful
jeenesh edited lol
begin other_schema.proc_name; end; where proc_name is a Procedure in your other_schema
1 person found this helpful
Rahul India wrote:current_schema..?
JUST USE THIS
begin current_schema.proc_name; end;
Another good explanation: