Trying to create a user named APPADMIN using the following SQL
CREATE USER APPADMIN IDENTIFIED BY AdminPassword;
and getting this error -
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.
Are there any rules for user names in Oracle and if so how can I override those rules?Run the following query to check V$PARAMETER table if any value is set for the common_user_prefix parameter
select * from V$PARAMETER where name like 'common_%';
There is a restriction that names of common users, roles, and profiles start with the string assigned to this parameter.
Also, note that if you are creating the user in CDB root then the user name should be prefixed by C##.
You can override the rule to prefix usernames in CDB with C## by running the following sql
alter session set "_ORACLE_SCRIPT"=true;