I have created a docker container, containing an Oracle 18 XE instance with a container database and a pluggable database. The application I want to test with this pluggable database requires the database to have national character set UTF8. I can not change this, it is just a requirement.
The (empty) database is created and up and running. The character set however is AL16UTF16. I tried several options to change the national character set of both the container database and the pluggable database, all without success.
The procedure I followed, is described here. The docker images I downloaded from github, and the installer for Oracle 18c Express Edition from Oracle.
I tried to add the parameter to the docker run command:
-e ORACLE_NLS_NCHAR_CHARACTERSET=UTF8
, without success.
Before creating the docker image, I tried adding the setting NLS_NCHAR_CHARACTERSET=UTF8
to the configuration file oracle-xe-18c.conf
, without success.
I tried the instructions from this site, without success. While the database is empty, trying to change the national character set results in the message ORA-12717: Cannot issue ALTER DATABASE NATIONAL CHARACTER SET when NCLOB, NCHAR or NVARCHAR2 data exists
. I checked columns affected by the change of national character set with select owner, table_name, column_name from dba_tab_columns where (data_type = 'NCHAR' or data_type = 'NVARCHAR2' or data_type = 'NCLOB') and owner != 'SYS' and owner != 'SYSTEM';
, and then a select *
on all columns found. They all contained no data.
How can I create an Oracle database in docker, using the national character set UTF8?