oracle修改“NLS_NCHAR_CHARACTERSET”字符集
来源:互联网 发布:飞机航班软件 编辑:程序博客网 时间:2024/06/02 12:46
测试数据库的NLS_NCHAR_CHARACTERSET和正式环境不一致,需要由UTF8修改为AL16UTF16。
1、停数据库
SQL> alter system checkpoint;
System altered.
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 838860800 bytes
Fixed Size 2024536 bytes
Variable Size 192940968 bytes
Database Buffers 637534208 bytes
Redo Buffers 6361088 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.
注意:
1)这样修改会影响数据库中定义了Nclob、NVARCHAR2等大字段的表,会出现乱码。需要重新导入表,当然在修改前要备份相关表。
2)如果没有大对象,在使用过程中进行语言转换没有什么影响,(切记设定的字符集必须是ORACLE支持,不然不能start)
若直接运行
ALTER DATABASE NATIONAL CHARACTER SET AL16UTF16;
也可以,但是可能会出现‘ORA-12717: Cannot ALTER DATABASE NATIONAL CHARACTER SET when
NCLOB data exists’ 这样的提示信息
报错信息如下:
Wed May 30 16:25:58 2012
alter database national character set AL16UTF16
Wed May 30 16:25:58 2012
XDB.XDB$NMSPC_ID (NMSPCURI) - NVARCHAR2 populated
ORA-12717 signalled during: alter database national character set AL16UTF16...
3、在停数据库时hang住了,没有办法只有直接abort了再startup。
SQL> shutdown immediate;
ORA-03113: end-of-file on communication channel
SQL> exit
SQL> connect /as sysdba
Connected to an idle instance.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
- oracle修改“NLS_NCHAR_CHARACTERSET”字符集
- oracle修改“NLS_NCHAR_CHARACTERSET”字符集
- NLS_CHARACTERSET NLS_NCHAR_CHARACTERSET 字符集
- Oracle NLS_CHARACTERSET NLS_NCHAR_CHARACTERSET 的区别
- ORACLE 字符集乱码 修改字符集
- Oracle字符集修改问题
- oracle 修改字符集
- Oracle修改字符集
- 修改oracle的字符集
- 修改oracle默认字符集
- oracle 修改字符集
- 修改oracle数据库字符集
- 修改oracle字符集
- Oracle字符集修改
- 修改ORACLE字符集
- 修改oracle字符集
- 修改oracle字符集
- 修改Oracle数据库字符集
- 为什么又是404?让人情何以堪
- erlang, 支付宝, 以及其他
- CALL TRANSACTION - bdc_options
- Windows 消息大全
- undefined reference to 'pthread_create'问题解决
- oracle修改“NLS_NCHAR_CHARACTERSET”字符集
- 关于NSAutoReleasePool的理解
- 查看SQL语句执行效率
- oracle10g创建数据库的方法
- 怎样彻底解决"undefined reference to `pthread_create'"问题
- 发布Android应用程序过程
- 刚上线的个人主页,欢迎测试~
- android中最原始的运用 对Button添加事件响应
- 纯新手DSP编程--5.31--硬件中断管理