问题描述
我想将oracle数据库的字符集从'WE8MSWIN1252'更改为'AL32UTF8'
我尝试从链接(http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch10.htm#1009580)执行以下步骤:
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET AL32UTF8;
但是当我执行以上语句时,出现以下错误
SQL错误:ORA-12712:新字符集必须是旧字符集的超集
任何人都可以帮助我解决此问题.
要成功执行ALTER DATABASE CHARACTER SET
语句,必须满足两个条件:
- 新字符集中可以使用当前字符集中的每个字符.
- 当前字符集中的每个字符在新字符集中具有相同的代码点值. (即:旧字符集必须是新字符集的子集)
因为WE8MSWIN1252
不是AL32UTF8
的严格子集,所以该语句将失败(例如:WE8MSWIN1252
中的十六进制的井号是A3
,而在AL32UTF8
中的井号是C2 A3
). /p>
您将需要使用CSALTER
进行此迁移.
参考:字符集迁移.
I want to change character set of oracle database from 'WE8MSWIN1252' to 'AL32UTF8'
I tried to execute following steps from the link (http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch10.htm#1009580):
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET AL32UTF8;
But when i execute the above statement, I am getting the following error
SQL Error: ORA-12712: new character set must be a superset of old character set
Can anyone please help me in resolving this issue.
For an ALTER DATABASE CHARACTER SET
statement to execute successfully, two conditions must be fulfilled:
- Each and every character in the current character set is available in the new character set.
- Each and every character in the current character set has the same code point value in the new character set. (ie: the old charset must be a subset of the new one)
Because WE8MSWIN1252
is not a strict subset of AL32UTF8
this statement will fail (example: the pound sign is A3
in hex in WE8MSWIN1252
, but in AL32UTF8
it is C2 A3
).
You'll need to use CSALTER
to do this migration.
Refer to: Character Set Migration.
这篇关于SQL错误:ORA-12712:新字符集必须是旧字符集的超集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!