Modify the character set of Oracle 10 GB
Modify the database character set to zhs16gbk.
View server character sets
SQL> select * from V $ nls_parameters;
Modify:
$ Sqlplus/nolog
SQL> Conn/As sysdba
If the database server has been started, run shutdown immediate
To shut down the database server, and then execute the following command:
SQL> shutdown immediate
SQL> startup Mount
SQL> alter system enable restricted session;
SQL> alter system set job_queue_processes = 0;
SQL> alter system set aq_tm_processes = 0;
SQL> alter database open;
SQL> alter database character set zhs16gbk
If the statement above the superset cannot be modified, use internal_use to skip the superset check:
SQL> alter database character set internal_use zhs16gbk;
Error at line 1:
ORA-12721: operation cannot execute when other sessions are active
If the preceding error is reported, select Sid, serial #, username, machine from V $ session;
Alter system kill session 'sid' serial # 'immediate; then
Alter system kill session '2017, 7' immediate; as shown in the following figure:
SQL> alter database character set internal_use zhs16gbk;
SQL> shutdown immediate
SQL> startup