SQL Error: 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 start with C## or c## and consist only of ASCII characters. *Action: Specify a valid common user or role name.
So either you modify all your scripts to be env specific i.e. 10g, 11g or 12c which in many cases would be big task - change, test, maintain - if your project is too big. Another option is dont make any changes to your scripts but make 12c behave like 11g. Mine is later case i.e. just because client wants their product to be "latest Oracle release compliant" I've to ensure it does work with 12c although product itself is not cloud ready.
So in order to create users like 11g i.e. without creating container databases, for 12c trick is to set an undocumented parameter _ORACLE_SCRIPT to true. To avoid system level change, just set this for a session before executing CREATE USER statement.
$ sqlplus as sysdba SQL> alter session set "_ORACLE_SCRIPT"=true; SQL> create user foo identified by bar; SQL> exit
Warning: _ORACLE_SCRIPT is undocumented parameter and is available at least with Oracle 22.214.171.124.0. Use with caution, you never know when it might behave differently, not at all or just get dropped in future release. So use it at your own risk, convenience and wisely.