oracle 18c xe ORA-65096 code example

Example 1: ora-65069

alter session set "_ORACLE_SCRIPT"=true;

Example 2: ORA-65096: invalid common user or role name

create user c##username identified by password;

Example 3: oracle 18c xe ORA-65096

sqlplus / as sysdba
ALTER SESSION SET "_ORACLE_SCRIPT"=true; 	-- Warning !
-- c## prefixe
CREATE USER c##username IDENTIFIED BY "my_password";
GRANT CONNECT TO MY_USER;           -- To connect to DB
GRANT RESOURCE TO MY_USER;          -- Access / modify
GRANT MY_ROLE TO MY_USER;           -- Grants a role (to be defined)
GRANT CREATE SESSION TO MY_USER;

Tags:

Sql Example