安全应用程序角色和 SQL*Loader
我正在使用安全应用程序角色来授予用户访问权限。在其最愚蠢的形式中,它看起来像这样:
create or replace package body main_user.PACK_SAR is
procedure grant_role is
begin
dbms_session.set_role('TEST_ROLE');
end;
end PACK_SAR;
该包位于 authid current_user
中,正如它应该的那样。 角色和用户配置如下:
create role test_role identified using pack_sar;
grant select on task to test_role;
create user test_user identified by a;
grant create session to test_user;
grant execute on pack_sar to test_user;
然后我使用我的 test_user
登录,调用过程,一切都很好:
execute main_user.pack_sar.grant_role;
select * from main_user.task;
[... data from the task table ...]
但现在我想将我的测试用户与 SQL*Loader 一起使用,所以我想我'我要在登录后
触发器中执行过程调用:
create or replace trigger test_user.after_logon
after logon on test_user.schema
begin
main_user.pack_sar.grant_role;
end;
但这似乎没有做任何事情,我在登录后没有获得角色...有没有办法做类似的事情这?或者在 SQL*Loader 中使用安全应用程序角色是不可能的吗?
预先感谢您的任何想法。
I'm working with secure application roles to grant access to users. In its dumbest form, it looks like that:
create or replace package body main_user.PACK_SAR is
procedure grant_role is
begin
dbms_session.set_role('TEST_ROLE');
end;
end PACK_SAR;
The package is in authid current_user
, as it should be.
The role and user are configured as follow:
create role test_role identified using pack_sar;
grant select on task to test_role;
create user test_user identified by a;
grant create session to test_user;
grant execute on pack_sar to test_user;
Then I login with my test_user
, call the procedure and everything is fine:
execute main_user.pack_sar.grant_role;
select * from main_user.task;
[... data from the task table ...]
But now I would like to use my test user with SQL*Loader, so I thought I'm going to do the procedure call in an after logon
trigger:
create or replace trigger test_user.after_logon
after logon on test_user.schema
begin
main_user.pack_sar.grant_role;
end;
But this does not seem to do anything, I don't get the role after login... Is there any way to do something like this? Or is using secure application roles within SQL*Loader impossible?
Thanks in advance for any idea.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看
此线程
位于底部。
Check
this thread
at the bottom.