Modify the database character set to: ZHS16GBK
Viewing the server-side character set
SQL > select * from V$nls_parameters
Modify:
$sqlplus/nolog
Sql>conn/as sysdba~
If the database server is now started, execute SHUTDOWN IMMEDIATE first
To close 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~
*
ERROR at line 1:
Ora-12721:operation cannot execute when other sessions is active
If the above error occurs, use the following method to modify, using Internal_use can skip the check of the superset:
Sql>alter DATABASE CHARACTER SET internal_use zhs16gbk~
Sql>shutdown immediate~
Sql>startup
Oracle gb2312 Character Set turn Utf-8
Recently because of some special needs, considering the future development of the system,
Changed the character set of the existing Oracle database gb2312 to UTF-8
Steps:
1. In Sql*plus, log in as DBA
Conn User name as Sysdba
2. Execute the conversion statement:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET job_queue_processes=0;
ALTER SYSTEM SET aq_tm_processes=0;
ALTER DATABASE OPEN;
ALTER DATABASE National CHARACTER SET UTF8;
SHUTDOWN immediate;
Startup
Note: If there are no large objects, there is no effect on language conversions during use (remember that the set must be supported by Oracle, otherwise it cannot start)
You can do it as above, but there may be ' Ora-12717:cannot ALTER DATABASE national CHARACTER SET when
NCLOB data exists ' such a message
There are two ways to solve this problem
One is to use the Internal_use keyword to modify the regional settings,
There is also the use of re-create, but re-create a bit complicated, so please use Internal_use,
SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET job_queue_processes=0;
ALTER SYSTEM SET aq_tm_processes=0;
ALTER DATABASE OPEN;
ALTER DATABASE National CHARACTER SET internal_use UTF8;
SHUTDOWN immediate;
Startup
If you do this, the national charset locale is fine.
Linux modifies the character set of Oracle 10g