Search code examples
oracle-databaseamazon-web-servicesutf-8character-encodingamazon-rds

How to change both charset (NLS_CHARACTERSET) and National Charset (NLS_NCHAR_CHARACTERSET) to UTF8 on a RDS Oracle database?


Our application is designed to work with an Oracle 11g database with Charset (NLS_CHARACTERSET) and National Charset (NLS_NCHAR_CHARACTERSET) both set to UTF8.

While lauching an Oracle database instance on Amazon Relational Database Service (RDS), I'm prompted to chose a Charset that I set to UTF8.

However, I was unable to find a way to set the National Charset, and this parameter is set to AL16UTF16 during database creation.

I tried the following :

  • Created a new Parameter Group to set the NLS_NCHAR_CHARACTERSET, but the parameter isn't listed. I also tried unsuccessfully to force the creation of a new Parameter Group with this parameter using the AWS CLI.
  • Tried to ALTER the database but the SYSDBA role is not available on Amazon managed database instances.
  • Created different Oracle RDS databases with different Charset parameter to check if the National Charset is affected, but it is still set to AL16UTF16.

Is there any way to do it ?


Solution

  • The parameter can be set by specifying --character-set-name during instance creation using AWS CLI. So far I have not found anyway to change that for an existing instance.

    In my testing, I set it using --character-set-name KO16MSWIN949, which will support Korean based on AWS doc:

    http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html