Oracle的官方方案是这样的: 1. Use the Character Set Scanner utility to verify that your database contains only valid character codes -- see "USING THE CHARACTER SET SCANNER" below. 2. If necessary, prepare CLOB columns for the character set change -- see "HANDLING CLOB AND NCLOB COLUMNS" below. Omitting this step can lead to corrupted CLOB/NCLOB values in the database. 3. Make sure the parallel_server parameter in INIT.ORA is set to false or it is not set at all. 4. Execute the following commands in Server Manager svrmgrl): SVRMGR> SHUTDOWN IMMEDIATE; -- or NORMAL <do a full database backup> SVRMGR> STARTUP MOUNT; SVRMGR> ALTER SYSTEM ENABLE RESTRICTED SESSION; SVRMGR> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; SVRMGR> ALTER SYSTEM SET AQ_TM_PROCESSES=0; SVRMGR> ALTER DATABASE OPEN; SVRMGR> ALTER DATABASE CHARACTER SET <new_character_set>; SVRMGR> SHUTDOWN IMMEDIATE; -- OR NORMAL SVRMGR> STARTUP RESTRICT; 5. Restore the parallel_server parameter in INIT.ORA, if necessary. 6. Execute the following commands in Server Manager: SVRMGR> SHUTDOWN IMMEDIATE; -- OR NORMAL SVRMGR> STARTUP; The double restart is necessary because of a SGA initialization bug, fixed in Oracle9i. 7. If necessary, restore CLOB columns -- see "HANDLING CLOB AND NCLOB COLUMNS" below. 但是这里也不合适,因为现在数据库根本就不能够打开。 可以 startup mount; 但是在 alter database open; 时出错: ORA-12701: CREATE DATABASE character set is not known
1. Use the Character Set Scanner utility to verify that your
database contains only valid character codes -- see "USING THE
CHARACTER SET SCANNER" below.
2. If necessary, prepare CLOB columns for the character set
change -- see "HANDLING CLOB AND NCLOB COLUMNS" below.
Omitting this step can lead to corrupted CLOB/NCLOB values
in the database.
3. Make sure the parallel_server parameter in INIT.ORA is set to
false or it is not set at all.
4. Execute the following commands in Server Manager svrmgrl):
SVRMGR> SHUTDOWN IMMEDIATE; -- or NORMAL
<do a full database backup>
SVRMGR> STARTUP MOUNT;
SVRMGR> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SVRMGR> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SVRMGR> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SVRMGR> ALTER DATABASE OPEN;
SVRMGR> ALTER DATABASE CHARACTER SET <new_character_set>;
SVRMGR> SHUTDOWN IMMEDIATE; -- OR NORMAL
SVRMGR> STARTUP RESTRICT;
5. Restore the parallel_server parameter in INIT.ORA, if
necessary.
6. Execute the following commands in Server Manager:
SVRMGR> SHUTDOWN IMMEDIATE; -- OR NORMAL
SVRMGR> STARTUP; The double restart is necessary because of a SGA initialization
bug, fixed in Oracle9i.
7. If necessary, restore CLOB columns -- see "HANDLING CLOB AND
NCLOB COLUMNS" below. 但是这里也不合适,因为现在数据库根本就不能够打开。
可以 startup mount; 但是在 alter database open; 时出错:
ORA-12701: CREATE DATABASE character set is not known
用CREATE DATABASE命令