*****************************************************************
* 更改字符集步骤方法(WE8ISO8859P1 --> ZHS16GBK) *
*****************************************************************
SQL>
将数据库启动到RESTRICTED模式下做字符集更改:
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
orACLE instance shut down.
SQL> startup mount
orACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 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 CHARACTER SET ZHS16GBK;
Alter DATABASE CHARACTER SET ZHS16GBK
*
ERROR at line 1:
orA-12712: new character set must be a superset of old character set
提示我们的字符集:新字符集必须为旧字符集的超集,这时我们可以跳过超集的检查做更改:
SQL> Alter DATABASE character set INTERNAL_USE ZHS16GBK;
Database altered.
SQL> select * from v$nls_parameters;
略
19 rows selected.
重启检查是否更改完成:
SQL> shutdown immediate;
Database closed.
Database dismounted.
orACLE instance shut down.
SQL> startup
orACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> select * from v$nls_parameters;
略
19 rows selected.
修改oracle 数据库字符集
最新推荐文章于 2025-11-28 08:52:23 发布
本文介绍如何将Oracle数据库的字符集从WE8ISO8859P1更改为ZHS16GBK,包括启动数据库到受限模式、禁用作业队列等步骤,并解决了新字符集必须为旧字符集超集的问题。
921

被折叠的 条评论
为什么被折叠?



