ORACLE NVARCHAR2 中文乱码

VARCHAR2 需要字符集UTF8

NVARCHAR2需要字符集AL16UTF16

select * from sys.nls_database_parameters;

SQL> alter system checkpoint;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

 

2、启动数据库
SQL> STARTUP MOUNT EXCLUSIVE;
ORACLE instance started.

Total System Global Area 2471931904 bytes
Fixed Size                  2291376 bytes
Variable Size             671091024 bytes
Database Buffers         1778384896 bytes
Redo Buffers               20164608 bytes
Database mounted.
SQL> alter system enable restricted session;

System altered.

SQL> alter system set job_queue_processes=0;

System altered.

SQL> alter system set aq_tm_processes=0;

System altered.

SQL> alter database open;

Database altered.

SQL> ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE AL16UTF16;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP

ORACLE instance started.

Total System Global Area 2471931904 bytes
Fixed Size                  2291376 bytes
Variable Size             671091024 bytes
Database Buffers         1778384896 bytes
Redo Buffers               20164608 bytes
Database mounted.
Database opened.

你可能感兴趣的:(db)