码迷,mamicode.com
首页 > 数据库 > 详细

sqlldr 采集中文数据乱码问题

时间:2016-03-31 12:55:31      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:

测试机上装入数据 发现中文字段全部变成???????,初步判断为字符集问题

   更改
     UPDATE sys.props$
     SET VALUE$=‘WE8ISO8859P1‘
     where name like ‘NLS%‘
     and value$=‘ZHS16GBK‘;
commit;
后发现sqlldr采集数据时,报错
SQL*Loader-704: Internal error: ulmtsyn: OCIStmtExecute(tabhp) [6552]
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-553: character set name is not recognized
 
查资料后发现原来更改字符集还需要在设置字符集时把数据库设置成RESTRICTED模式等诸多操作,进行以下操作后,sqlldr采集正常
>STARTUP MOUNT;
 ORACLE instance started. 
 Total System Global Area 76619308 bytes
 Fixed Size 454188 bytes 
 Variable Size 58720256 bytes
 Database Buffers 16777216 bytes 
 Redo Buffers 667648 bytes 
Database mounted. 
SQL> ALTER SESSION SET SQL_TRACE=TRUE;
 Session altered. 
 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> set linesize 120 
SQL> ALTER DATABASE CHARACTER SET ZHS16GBK;
ORA-12712: new character set must be a superset of old character set
RROR at line 1:

>ALTER DATABASE character set INTERNAL_USE zhs16gbk;

>ALTER SESSION SET SQL_TRACE=FALSE;

sqlldr 采集中文数据乱码问题

标签:

原文地址:http://www.cnblogs.com/bigbean/p/5340532.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!