ORACLE数据库设置编码

时间:2024-03-06 17:35:47
下面为您介绍的是ORACLE数据库设置编码,如果您在ORACLE数据库设置方面遇到过类似的问题,不妨一看。
ORACLE数据库设置编码:
$ sqlplus / as sysdba   

SQL> SHUTDOWN IMMEDIATE;   

Database closed.   
Database dismounted.   
ORACLE instance shut down.   

SQL> STARTUP nomount;   

ORACLE instance started.   
SQL> ALTER DATABASE mount exclusive;   
Database 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>   ALTER DATABASE CHARACTER SET UTF8;   

ERROR at line 1:   
ORA-12712: new character set must be a superset of old character set  
提示字符集:新字符集必须为旧字符集的超集, 
这时我们可以跳过超集的检查做更改(UTF8可以根据需要更改,如ZHS16GBK):

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE UTF8;   

Database altered.