View and modify the encoding in oracle

Source: Internet
Author: User

Oracle view encoding and modify encoding first view the oracle database encoding SQL> select * from nls_database_parameters where parameter = 'nls _ CHARACTERSET '; PARAMETER--------------------VALUE--------------------NLS_CHARACTERSETAL32UTF8 which comes from props $, which is the character set of the database. Oracle client encoding SQL> select * from nls_instance_parameters where parameter = 'nls _ LANGUAGE '; PARAMETER--------------------VALUE--------------------NLS_LANGUAGESIMPLIFIED CHINESE it comes from v $ parameter, indicating the character set setting of the client, which may be a parameter file, select * from nls_session_parameters, which is from v $ nls_parameters, indicates the session settings, which may be the session environment variable or alter session, if the session has no special settings, it will be consistent with nls_instance_parameters. Let's talk about how to modify the oracle Character Set: currently, the character set in my database environment is AL32UTF8, so change it to ZHS16GBK 1. first, log on to conn/as sysdba 2. shut down the database shutdown immediate; 3. call the database with mount, and startup mount 4. SET session SQL> alter system enable restricted session; SQL> alter system set JOB_QUEUE_PROCESSES = 0; SQL> ALTER SYSTEM SET AQ_TM_PROCESSES = 0; 5. start the database alter database open; 6. modify the character set alter database character set ZHS16GBK; this may report an error, prompting us that the new character set must be a superset of the old one. You can skip the superset check and make changes: alter database character set INTERNAL_USE ZHS16GBK; this statement is enough. the help provided by TERNAL_USE will cause oracle to bypass the verification of the subset and superset, this statement is exactly the same as the internal operation of the preceding statement. 7. close, restart SQL> shutdown immediate; SQL> startup character set should not be modified easily, because it will have a direct impact on the database data, if it is a production environment, this may cause incalculable losses.

Related Article

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.