Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01917: user or role does not exist 01917. 00000 - "user or role '%s' does not exist"

User_PFOUUNov 9 2022

Hi,

I am trying to create a new user using these lines:

CREATE USER my_ap_db IDENTIFIED BY my_work;
GRANT CONNECT TO my_ap_db;
GRANT CREATE SESSION, GRANT ANY PRIVILEGE TO my_ap_db;
GRANT UNLIMITED TABLESPACE TO my_ap_db;
GRANT CREATE TABLE TO my_ap_db;

But it is giving me this error on running each time:
Error starting at line : 1 in command -
CREATE USER my_ap_db IDENTIFIED BY my_work
Error report -
ORA-65096: invalid common user or role name
65096. 00000 - "invalid common user or role name"
*Cause: An attempt was made to create a common user or role with a name
that was not valid for common users or roles. In addition to the
usual rules for user and role names, common user and role names
must consist only of ASCII characters, and must contain the prefix
specified in common_user_prefix parameter.
*Action: Specify a valid common user or role name.

Error starting at line : 2 in command -
GRANT CONNECT TO my_ap_db
Error report -
ORA-01917: user or role 'MY_AP_DB' does not exist
01917. 00000 - "user or role '%s' does not exist"
*Cause: There is not a user or role by that name.
*Action: Re-specify the name.

Error starting at line : 3 in command -
GRANT CREATE SESSION, GRANT ANY PRIVILEGE TO my_ap_db
Error report -
ORA-01917: user or role 'MY_AP_DB' does not exist
01917. 00000 - "user or role '%s' does not exist"
*Cause: There is not a user or role by that name.
*Action: Re-specify the name.

Error starting at line : 4 in command -
GRANT UNLIMITED TABLESPACE TO my_ap_db
Error report -
ORA-01917: user or role 'MY_AP_DB' does not exist
01917. 00000 - "user or role '%s' does not exist"
*Cause: There is not a user or role by that name.
*Action: Re-specify the name.

Error starting at line : 5 in command -
GRANT CREATE TABLE TO my_ap_db
Error report -
ORA-01917: user or role 'MY_AP_DB' does not exist
01917. 00000 - "user or role '%s' does not exist"
*Cause: There is not a user or role by that name.
*Action: Re-specify the name.

Please help me how I can resolve this.
Screenshot 2022-11-10 021941.png

Comments
Post Details
Added on Nov 9 2022
5 comments
2,293 views