授予/撤销用户 oracle 的执行权限

发布于 2025-01-11 06:10:42 字数 318 浏览 0 评论 0原文

GRANT/REVOKE 权限究竟如何影响数据库。

我有一个解决方案,可以解决我的组件之一(可执行文件)无法识别我的 Oracle 配置包的问题。但是我是否可以通过撤销来进行测试,

revoke execute on package_name to user1;

然后再次授予,

grant execute on package_name to user1;

总之,这是否会对特权产生负面影响。这主要是因为 user1 是一个通用用户,所以这就是我谨慎的原因。

谢谢

How exactly is the GRANT/REVOKE privileges affecting the database.

I have a solution ready for a problem where one of my components(an executable) is not identifying my oracle config packages. But is it possible for me to test by revoking with this,

revoke execute on package_name to user1;

And then again grant,

grant execute on package_name to user1;

In short, can this in anyway affect the privileges negatively. This is mainly because user1 is a generic user so that's why I am being cautious.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城凉梦凉人心 2025-01-18 06:10:42

但是,当然,撤销权限会对用户产生负面影响……它将无法再使用该包。

如果该用户 (user1) 已向其他用户授予权限(因为它被授予带有授予选项的权限),事情可能会更加复杂,因为 - 一旦您从 撤销权限code>user1,Oracle 将自动撤销所有这些用户/角色的权限(这就是我们所说的级联效应)。

因此,要小心。我想测试它的最佳选择是拥有一个单独的测试数据库。在那里你可以做任何你想做的事情,因为它不会影响生产中的任何人。

最后,它是从用户撤销权限,而不是TO(指您发布的第一个声明)。

But of course that revoking a privilege affects that user negatively ... it won't be able to use that package any more.

Things can be even more complicated if that user (user1) has granted privilege to other users (as it was granted privilege with grant option) because - once you revoke privileges from user1, Oracle will automatically revoke privileges from all those users/roles (that's what we'd call a cascading effect).

Therefore, be careful. I guess that your best option to test it is to have a separate - testing - database. There you can do anything you want, as it won't affect nobody in production.

Finally, it is revoke privilege FROM user, not TO (referring to the 1st statement you posted).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文