Modify server Character Set

Source: Internet
Author: User

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:

 

    1. $ Sqlplus/nolog
    2. 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:

 

  1. SQL>Startup Mount;
  2. SQL>Alter system enable restricted session;
  3. SQL>Alter system setJob_queue_processes=0;
  4. SQL>Alter system setAq_tm_processes=0;
  5. SQL>Alter database open;
  6. SQL>Alter database character set zhs16gbk;
  7. SQL>Alter database National Character Set zhs16gbk;
  8. SQL>Shutdown immediate;
  9. 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,

 

  1. SQL>Shutdown immediate;
  2. SQL>Startup Mount exclusive;
  3. SQL>Alter system enable restricted session;
  4. SQL>Alter system setJob_queue_processes=0;
  5. SQL>Alter system setAq_tm_processes=0;
  6. SQL>Alter database open;
  7. SQL>Alter database National Character Set internal_use utf8;
  8. SQL>Shutdown immediate;
  9. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.