简体   繁体   中英

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

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 ?

You need to first create the user;

CREATE USER username IDENTIFIED BY password;

then separately grant privileges with ADMIN OPTION;

GRANT dba TO username WITH ADMIN OPTION;

"ADMIN OPTION" is a part of "GRANT" statement. You can't use it with "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:

create user username identified by password grant DBA to username;

Note:Correct me if I am wrong.☺

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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