There is an oracle dd in which nls_lang is installed as russian_russia. It is necessary to change the encoding to american.

as I check the encoding: select * from nls_database_parameters .

I tried to change the registry and set the encoding that I need. Tried to set nls_lang = american_america , but nothing works. I do not want to reinstall.

Maybe there are working algorithms for changing the encoding?

    1 answer 1

    If you want to set the environment, then - set NLS_LANG=american_america . So you change the environment only for client programs.

    I understand you need to change at the level of DB. Then you need to set NLS_LANGUAGE and NLS_TERRITORY separately in the init.ora file.

    NLS_LANG is not used in init.ora.

    UPD The above said concerns the language and territory. The encoding is set to NLS_CHARACTERSET, i.e. v 3rd component NLS_LANG (languge_territory.characterset).
    The encoding can only be changed if the new encoding is a strict superset of the old encoding, i.e. WE8ISO8859P5 cannot be changed to AL32UTF8, and US7ASCII is always possible.

    If lucky, then alter database character set AL32UTF8; .
    If not, data migration and, in the worst case, programs that do not quite understand the new encoding. Read more here or in general in Russian here .

    • And if I have already installed a DB with an encoding and I want to change it? I tried in init.ora to change NLS_LANGUAGE, NLS_TERRITORY, as well as to correct the registry entry, but nothing has changed. - voipp
    • In this case, all the sadder. In the general case - import and export to a new database. There is a special script. You can read here: docs.oracle.com/cd/B28359_01/server.111/b28298/… - hinotf
    • Thanks @hinotf, I was at work, I could not unsubscribe - 0xdb
    • @voipp So you need NLS_CHARACTERSET, those 3rd component of NLS_LANG. What is now and what is desired? - 0xdb