Skip to Main Content
  • Questions
  • Create database with a custom charset

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: June 13, 2023 - 9:20 am UTC

Last updated: June 19, 2023 - 4:51 am UTC

Version: 19.3.0

Viewed 1000+ times

You Asked

Hi,

I need to create a character and create a new database with it.

I create a new charset, with LBUIDER, derivates from WE8ISO8859P1. I compile the “.nlt” to obtain the “nlb”. I put this “nlb” with lx0boot.nlb and lx1boot.nlb on /home/oracle/app/oracle/product/19.3.0/dbhome_1/nls/data.
After a stop/start of instance, I see the new character set on v$nls_valid_values:
select * from v$nls_valid_values where   isdeprecated = 'FALSE' AND PARAMETER = 'CHARACTERSET' AND  value LIKE '%8859P1%' order by 2;


PARAMETER VALUE ISDEPRECATED CON_ID
CHARACTERSET WE8ISO8859P1MTWEXT1 FALSE 0

I can use the charset for a client (SQLPLUS on LINUX):

export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1MTWEXT1


SELECT distinct SID, CLIENT_DRIVER, CLIENT_CHARSET FROM v$session_connect_info where CLIENT_DRIVER like 'SQL%'


SID CLIENT_DRIVER CLIENT_CHARSET
---------- ------------------------------ ----------------------------------------
247 SQL*PLUS WE8ISO8859P1MTWEXT1


But when I try to use it to create a new database via dbca:
- tab “character set”
- option “choose from the list of character sets)
- unchecked “show recommended character set only”

I don’t view the new charset

If I try to use dbca in silent mode I have the error : [FATAL] [DBT-11151] Character set specified (WE8ISO8859P1MTWEXT1) is invalid.


Do you know if it possible to create a new database with a custom charset?

Thank you

and Connor said...

To be honest I don't know...but there is only one characterset I would for *any* new database, and that is AL32UTF8.

In particular, building your own characterset is putting you on a very niche path - there's probably 0.0001% of customers who have ever done this, meaning that its going to be *you* that find any issues, bugs, anomalies rather than anyone that has gone before you.

As the saying goes: "In the old west, everyone wanted to be pioneer. A few them struck gold, but most of them died" :-)


Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database