Convert Oracle database encoding into UTF-8

Source: Internet
Author: User

1, change the client character set: run regedit through Windows Run menu, modify registry

Start-> Run-> rededit <-|

Under Registry Editor-> HKEY_LOCAL_MACHINE-> SOFTWARE->oracle->key_xe->right WINDOW DOUBLE CLICK Nls_la NG-> Change VALUE to "American_america. UTF8 "->ok->close REGISTRY

How to set the Oracle client character set correctly:

Oracle client character set settings need to be consistent with the server side, otherwise there will be garbled problems.

First connect to the server, query server-side settings:

SELECT * from V$nls_parameters;

Found it:

Nls_language

nls_territory

Nls_characterset

The environment variable Nls_lang is composed of these three parts

Nls_lang = Language_territory.charset

Like what:

Nls_lang = American_japan.ja16sjis

2, change the server-side character set , through the Oracle SQL Plus Command window to change

In Sql*plus, log on as a DBA

Conn User name as Sysdba

then execute the following command

>shutdown immediate; (Stop the database)

>startup Mount; (Re-open the database to change situations)

>alter system enable restricted session;

>alter system set job_queue_processes=0;

>alter system set aq_tm_processes=0;

>alter database open;

>alter database character set UTF8;

OR

>alter database Character Set Internal_use UTF8 (This command is a cast encoding format that may result in the Chinese being garbled in the databases)

>shutdown immediate;

>startup; (re-opened normal Oracle)

Oracle database Character set modification completed.

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.