Oracle ORA-01031:创建用户时权限不足 [英] Oracle ORA-01031: insufficient privileges while creating user

查看:947
本文介绍了Oracle ORA-01031:创建用户时权限不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个用户,让我们在 sysdba 中称他为 C##USER.现在,我正在尝试从 C##USER 创建另一个用户.问题是我不断收到以下错误:

I have created a user, let's call him C##USER from sysdba. Now, I'm trying to create another user from C##USER. Problem is I keep getting the following error:

ORA-01031:权限不足

ORA-01031: insufficient privileges

我已授予 C##USER 所有权限并将默认角色设置为 ALL.还没有任何效果...

I have granted C##USER all privileges and have set the default role to ALL. Nothing works yet...

有什么想法吗?提前致谢.

Any ideas? Thanks in advance.

推荐答案

你只需要一个 CREATE USER 系统权限但不要忘记使用 CONTAINER 子句,它应该设置为ALL,如果省略此子句,则被授权者将在当前容器上拥有CREATE USER 系统权限.

You just need a CREATE USER system privilege BUT don't forget to use CONTAINERclause which should be set to ALL, if you omit this clause then the grantee will have CREATE USER system privilege on the current container.

指定 CONTAINER = ALL 以向普通用户或普通角色授予系统权限、对普通对象或角色的对象权限

Specify CONTAINER = ALL to commonly grant a system privilege, object privilege on a common object, or role, to a common user or common role

GRANT

创建普通用户帐户时,会在所有打开的可插拔数据库中创建该帐户.因此,创建此新用户的用户必须对所有容器具有 CREATE USER 系统权限.

When a common user account is created, the account is created in all of the open pluggable databases. So the user who is creating this new user must have CREATE USER system privilege on all containers.

SQL> grant create user to c##user container=all;

Grant succeeded.

SQL> conn c##user
Enter password: 
Connected.
SQL> create user c##user2 identified by user2;

User created.

这篇关于Oracle ORA-01031:创建用户时权限不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆