SQL 使用管理选项创建用户 oracle 11g 命令不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9455838/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 14:33:09  来源:igfitidea点击:

Create user with admin option oracle 11g command not working

sqloracleoracle11g

提问by kushalvm

okay , This command is not working

好的,这个命令不起作用

create user username identified by password with admin option ;

create user username identified by password with admin option ;

It throws an error which says missing or invalid option

它抛出一个错误,上面写着 missing or invalid option

And i am logged in as system . I have tried searching Oracle docs and they have written the same command . what i am doing wrong here ?

我以 system 身份登录。我曾尝试搜索 Oracle 文档,他们编写了相同的命令。我在这里做错了什么?

回答by Joachim Isaksson

You need to first create the user;

您需要先创建用户;

CREATE USER username IDENTIFIED BY password;

then separately grant privileges with ADMIN OPTION;

然后分别使用 ADMIN OPTION 授予权限;

GRANT dba TO username WITH ADMIN OPTION;

回答by Kamil

"ADMIN OPTION" is a part of "GRANT" statement. You can't use it with "CREATE USER".

“ADMIN OPTION”是“GRANT”语句的一部分。您不能将它与“创建用户”一起使用。

回答by Tushar Gopale

you don't need to give admin option if you are giving user DBA privilege ,DBA is the administrator Also you can combine both statements Creation of user with Grant privilege:

如果您授予用户 DBA 权限,则不需要提供 admin 选项,DBA 是管理员您也可以结合使用两个语句创建用户和授予权限:

create user username identified by password grant DBA to username;

创建由密码授予 DBA 给用户名标识的用户用户名;

Note:Correct me if I am wrong.?

注意:如果我错了,请纠正我。?