oralce modify the character set

oracle11g modify the character set to ZHS16GBK

 

ps -ef|grep ora_dbw0_$ORACLE_SID

  356  kill -9 2921

  357  su - oracle

3. Enter sqlplus /nolog

4. Start the database in RESTRICTED mode to change the character set: 

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 

 

Prompt our character set: the new character set must be a superset of the old character set, then we can skip the superset check and make changes: 

SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; 

Database altered. 

SQL> select * from v$nls_parameters; 

slightly 

19 rows selected. 

Reboot to check if the changes are complete: 

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; 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326079542&siteId=291194637