请教如何更改数据库的字符集?

[复制链接]
查看11 | 回复8 | 2010-5-13 10:04:27 | 显示全部楼层 |阅读模式
想从A机exp B机的数据,但是由于字符集的原因导出失败(CLOB方面的),我想请问一下,如何调整A机的字符集与B机一致呢?
A机是redhat7+oracle817
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
哦,分别都是什么字符集?
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
想从US7ASCII变为ZHS16GBK
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
哦,这个简单,你可以执行以下步骤:
startup nomount;
alter database mount exclusive;
alter system enable restricted session;
alter system set job_queue_processes=0;
alter database open;
alter database character set zhs16gbk;
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
谢谢coolyl,不过我按照你的方法将A机字符集改为跟B机一样,问题还是解决不了。
看来得将问题详细描述
B机有一表BBS_MESSAGE
MESSAGE_ID
NOT NULL
NUMBER
PARENT_MESSAGE_ID
NUMBER
FORUM_ID
NUMBER
TOPIC_ID
NUMBER
SUBJECT
VARCHAR2(1000)
CONTENT
CLOB
LEVEL_CODE
VARCHAR2(500)
READ_COUNT
NUMBER
AUDIT_PASSED
CHAR(1)
USER_ID
NUMBER
ATTACHMENT_ID
NUMBER
IP
VARCHAR2(50)
CREATE_TIME
NUMBER(38)
MODIFY_TIME
NUMBER(38)
在A机执行exp出现下面错误:
. . exporting table
T_UNIT
3 rows exported
. . exporting table
BBS_MESSAGE
EXP-00056: ORACLE error 3120 encountered
ORA-03120: two-task conversion routine: integer overflow
. . exporting table
B20_CXGLB
0 rows exported
在A机sqlplus到B机select此表也会出现3120错误
但在B机sqlplus就不会出现错误,因此我最初怀疑是字符集问题。
请问如何解决问题呢?我一定要在A机exp B机的数据库,因为B机没有磁盘空间了。
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
各位大哥请帮忙
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
During the Export or Import a buffer overflowed.This error most likelyoccured when using Export/Import remotely and connecting to the source/targetdatabase via SQLNet v2 or Net 8, but this error can happend when Export/Importused locally (i.e., not using SQLNet v2 or Net 8 to connect).
The amount of data buffered by Export/Import needs to be reduced to prevent theoverflow from happening.
For example:If BUFFER is set to 10485760 (10 MB), this will cause Export to buffer 10MB ofdata before writing it to the export dump file.This would cause Import tobuffer 10MB of data before actually sending it to the database (write todatafiles).This becomes a problem when doing Export/Import remotely.10MB ofdata will try to be sent across the network at one time.On the average anetwork packet (buffer) size is 1500 bytes.So trying to send 10MB at one timevia 1500 byte packets is causing the overflow to occur.
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
我把buffer指定为4096还是不行啊。
本地导出是无问题,远程导出就出现3120
回复

使用道具 举报

千问 | 2010-5-13 10:04:27 | 显示全部楼层
up一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行