on 2010 Apr 09 9:52 PM
I know that it's possible to grant public permission to UNLOAD via the -gl database option. I don't really want to do that.
Is it possible to create a procedure that puts a wrapper around my specific UNLOAD statement and then grant a specific user permission to execute that procedure?
(I'm trying, but its not working, and I'm not getting any meaninful error messages).
Thanks!
I'm using 9.0.2.3850
Request clarification before answering.
You can do this by creating a procedure owned by DBA and then grant execute permissions to the user that you want to be able to run this procedure.
Example:
CREATE PROCEDURE DBA.unload_some_data()
BEGIN
unload
select *
from mytable
to 'myfile.txt';
END;
GRANT EXECUTE ON DBA.unload_some_data TO "otheruser";
This gives the user otheruser
the ability to call the procedure unload_some_data
and when the procedure is called, the procedure will run as user DBA
and therefore will be able to unload the data (as long as you did not start the server with -gl none)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.