If anyone can give me some guidance on this one I'd really appreciate it.
I am attempting to get a user under Oracle 12c R2 configured with default collation binary_ci.
CREATE USER <some user> IDENTIFIED BY <some password> DEFAULT COLLATION BINARY_CI;
The output I get from the above is as follows:
CREATE USER <some user>IDENTIFIED BY <some password>DEFAULT COLLATION BINARY_CI
*
ERROR at line 1:
ORA-43929: Collation cannot be specified if parameter MAX_STRING_SIZE=STANDARD is set.
Now, I am doing this under a Vagrant installation from https://github.com/totalamateurhour/oracle-12.2-vagrant. This essentially sets up a basic Oracle database in PDB/CDB mode. (last time I touched Oracle was 9… something so bear with me).
My DBAs have given some guidance on this but they said they were not able to get this to work in PDB mode.
Under SQL*plus execute:
CONN / AS SYSDBA
ALTER SYSTEM SET max_string_size=extended SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP UPGRADE;
ALTER PLUGGABLE DATABASE ALL OPEN UPGRADE;
EXIT;
At the command prompt:
$ cd $ORACLE_HOME/rdbms/admin/
$ $ORACLE_HOME/perl/bin/perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b /tmp/utl32k_output utl32k.sql
Then back in SQL*plus execute:
CONN / AS SYSDBA
SHUTDOWN IMMEDIATE;
STARTUP;
After executing the above and attempting to create the user as I stated earlier I still get the same error.
If I query the configuration I see the following:
SQL> show parameter max_string_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_string_size string EXTENDED
SQL> alter session set container=ORCLPDB1;
Session altered.
SQL> show parameter max_string_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_string_size string EXTENDED
SQL>
As I said, any help would be GREATLY appreciated.
Best Answer
Works here.
However, the behaviour is unchanged in the root container:
The below makes it possible to overcome this, but I do not recommend it, as it is neither documented nor supported (it even allows creating a common user without the common prefix):