Modify the server character set (not recommended)
Before Oracle 8, you can directly modify the data dictionary table props $ to change the Oracle Character Set of the database. However, after oracle8, at least three system tables record the information of the database character set. modifying only the props $ table is incomplete and may cause serious consequences. The correct modification method is as follows:
- $ Sqlplus/nolog
- SQL>Conn/As sysdba;
If the database server has been started, run the shutdown immediate command to shut down the database server, and then run the following command:
-
- SQL>Startup Mount;
-
- SQL>Alter system enable restricted session;
- SQL>Alter system setJob_queue_processes=0;
-
- SQL>Alter system setAq_tm_processes=0;
-
- SQL>Alter database open;
-
- SQL>Alter database character set zhs16gbk;
-
- SQL>Alter database National Character Set zhs16gbk;
- SQL>Shutdown immediate;
-
- SQL>Startup
NOTE: If there are no large objects, there is no impact on language conversion during use (remember that the Oracle character set must be supported by Oracle, or you cannot start it, however, a message like 'ora-12717: cannot alter database national character set when nclob data exists' may appear.
There are two ways to solve this problem
One is to use the internal_use keyword to modify the region settings,
Another method is to use re-create, but re-create is a little complicated, so use internal_use,
-
- SQL>Shutdown immediate;
-
- SQL>Startup Mount exclusive;
- SQL>Alter system enable restricted session;
-
- SQL>Alter system setJob_queue_processes=0;
-
- SQL>Alter system setAq_tm_processes=0;
-
- SQL>Alter database open;
-
- SQL>Alter database National Character Set internal_use utf8;
- SQL>Shutdown immediate;
-
- SQL>Startup;
If you follow the above steps, there will be no problem with the region settings of the National charset. The above content is the description of modifying the Oracle character set. I hope it will help you in this regard.