在 Oracle 11g XE 上更改 NLS 字符集参数

2021-12-30 00:00:00 sql oracle11g oracle oracle-apex oracle-xe

我使用的是 Oracle 11g 快捷版.目前,当我使用 SELECT * FROM nls_database_parameters; 检查 NLS 字符集参数时,它给出了默认值:

I am using Oracle 11g Express Edition. Currently when I check NLS character set parameter using SELECT * FROM nls_database_parameters; it gives the default values:

NLS_CHARACTERSET: AL32UTF8
NLS_NCHAR_CHARACTERSET: AL16UTF16

我想将这两个参数都设置为 UTF8.我该怎么做?我刚刚安装了Oracle 11g XE,所以除了Oracle本身需要的数据外没有数据.

I want to set both these parameters to UTF8. How can I do so? I have just installed Oracle 11g XE, so there is not data except those required by Oracle itself.

推荐答案

这对我有用,其中应用程序正在检查 UTF8 而不是 AL32UTF8 .

This worked for me where an application was checking for UTF8 rather than AL32UTF8 .

SQL> shutdown immediate;

SQL> startup restrict

SQL> select name from v$database;

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE UTF8 ;

SQL> select value from NLS_DATABASE_PARAMETERS 
     where parameter=’NLS_CHARACTERSET’;

SQL> shutdown immediate;

SQL> startup

相关文章