本文介绍了在 Oracle 中使用非 DBA 用户创建用户需要什么权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oracle 用户应具有哪些权限才能创建用户?我正在尝试从 Java 程序执行以下命令并多次遇到以下异常:

What should be the privileges existing on an Oracle User to create a user?I'm trying to execute the following command from a Java program and hit the following exception multiple times:

Oralce 12.1 命令:

CREATE USER USERTABLE IDENTIFIED BY USERPASSWORD
DEFAULT TABLESPACE MYTABLESPACE
QUOTA UNLIMITED ON MYTABLESPACE

堆栈跟踪:

错误:java.sql.SQLSyntaxErrorException:ORA-01031:权限不足

处理请求时出错.来自数据库服务器或驱动程序的错误.java.sql.SQLSyntaxErrorException:ORA-01031:权限不足

Error occurred while processing the request. Error from database server or driver.java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges

为用户分配了以下权限:

The following privileges are assigned to the user:

GRANT ALTER ANY INDEX TO dummyuser;
GRANT CREATE ANY TABLE TO dummyuser;
GRANT CREATE SESSION TO dummyuser;
GRANT CREATE TABLE TO dummyuser;
GRANT DROP ANY TABLE TO dummyuser;
GRANT GLOBAL QUERY REWRITE TO dummyuser;
GRANT SELECT ANY TABLE TO dummyuser;
GRANT UNDER ANY TABLE TO dummyuser;
GRANT UNLIMITED TABLESPACE TO dummyuser WITH ADMIN OPTION;

如果有任何其他权限需要分配给此用户,有人可以告诉我吗?

Can someone please let me know if there are any other privileges that needs to be assigned to this user?

推荐答案

对于我遇到的所有即将出现的问题,在@Marmite Bomber 的回答之后 - 我已将以下更改应用于我的 JUnit 用户!

For all the forthcoming issues that I had got, after @Marmite Bomber's answer - I had applied the following change to the user for my JUnits!

GRANT CONNECT, RESOURCE, DBA TO cordysdemo;
commit;

希望这对某人有所帮助!

Hope this helps someone!

这篇关于在 Oracle 中使用非 DBA 用户创建用户需要什么权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:16