Oracle Ora -01045-由角色不起作用而授予的特权

发布于 2025-02-05 04:17:40 字数 277 浏览 2 评论 0原文

我正在使用Oracle DB V21C之后,尝试使用Privs的“创建会话”创建角色学生,创建表,创建视图“ A a授予用户”'user3',但是当试图与该用户连接时,我得到了ORA-01045。我检查了授予该角色的私人,一切似乎正常,我试图使用Admin选项授予特权的角色,而什么也没有发生。我从dba_sys_privs中使用了select *,其中grantee ='pertays',一切似乎都不错。该角色是使用系统创建的,因此用户是因为我最初试图通过Scott创建角色,但是获得了一个错误的特权,但是Scott具有创建角色的特权。

im using oracle db v21c , after trying to create a role student with privs 'create session , create table , create view ' a granted that role to a user 'user3' but when trying to connect with that user i got ora-01045. i checked that privs granted to that role and everything seems normal , i have tried using granting the role the privileges with admin option and nothing happens . I used select * from dba_sys_privs where grantee='student' and all seems good . The role is created with system and so the user because at first i was trying to create the role with scott , but get an error insufficient privileges, but scott have the privilege to create role.

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

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

发布评论

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

评论(1

指尖上得阳光 2025-02-12 04:17:40

默认情况下,角色不活跃。您必须更改用户以设置默认角色(然后再次登录),或更改用户的当前会话以设置当前角色:

alter user user3 default role all;

set role student;

Roles are not active by default. You must either alter the user to set a default role (and then login again), or alter the user's current session to set a current role:

alter user user3 default role all;

or

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