简体   繁体   English

使用管理员选项oracle 11g命令创建用户无效

[英]Create user with admin option oracle 11g command not working

okay , This command is not working 好的,此命令不起作用

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 . 我尝试搜索Oracle文档,他们编写了相同的命令。 what i am doing wrong here ? 我在这里做错了什么?

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;

"ADMIN OPTION" is a part of "GRANT" statement. “ ADMIN OPTION”是“ GRANT”语句的一部分。 You can't use it with "CREATE USER". 您不能将其与“ CREATE USER”一起使用。

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是管理员。您还可以将这两个语句组合为具有Grant特权的“创建用户”:

create user username identified by password grant DBA to username; 创建由密码标识的用户名,将DBA授予用户名;

Note:Correct me if I am wrong.☺ 注意:如果我写错了,请纠正我。☺

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM