Modify character encoding in Oracle

Source: Internet
Author: User
When operating the database, you need to modify the database encoding according to the actual situation. The following describes how to modify the database encoding process. View the current database code: selectuserenv (language) fromdual; in the windows Command window, Enter cmd to open the dos window. Input: sqlplusnolog to open the data connection; Input

When operating the database, you need to modify the database encoding according to the actual situation. The following describes how to modify the database encoding process. View the current database code: select userenv ('language ') from dual; in the windows Command window, Enter cmd to open the do s window. Input: sqlplus/nolo g to open the data connection; Input

When operating the database, you need to modify the database encoding according to the actual situation. The following describes how to modify the database encoding process.

View the current database code: select userenv ('language') from dual;

In the windows Command window, Enter cmd to open the dos window.

Input: sqlplus/nolog to open the data connection; enter the connect user name/password as sysdba

Then, in the open dos window, enter:


Shutdown immediate;

Startup mount;

Alter session set SQL _trace = true;

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 internal_use utf8;

Alter session set SQL _trace = false;

Shutdown immediate;

Startup;


Attached:

Tablespace export:

Exp username/password file = path + file name. dmp

Exp username/password tables = (table 1 ,...... Table n) file = path + file name. dmp

Tablespace import:

Imp username/password file = path + file name. dmp

Imp username/password tables = (table 1 ,...... Table n) file = path + file name. dmp

======================================

Change the default format of the system date display:

Alter system set nls_date_format = 'yyyy-mm-dd hh24: mi: ss' scope = spfile;

Restart the computer to take effect.


Modify the oracle code registered on the local machine:

Go far-enter regedit after dos is opened in cmd

Search:
--> HKEY_LOCAL_MACHINE \SOFTWARE \ORACLE \ KEY_OraDb11g_home1Value of the variable NLS_LANG
SIMPLIFIEDCHINESE_CHINA.ZHS16GBK
Change to the following values:
SIMPLIFIED CHINESE_CHINA.AL32UTF8 (server-side encoding --- ORACLE encoding)

Then restart plsql.

Select userenv ('language') fromdual; -- query the ORACLE encoding method.



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.