Solution to garbled Oracle Database in Linux

Source: Internet
Author: User

1. modify the configuration of remote linux machines

The configuration in the vim/etc/sysconfig/i18n file is as follows:
LANG = "zh_CN.GBK"

SUPPORTED = "zh_CN.UTF-8: zh_CN: zh: zh_CN.GBK"
SYSFONT = "latarcyrheb-sun16"

2. Modify the Oracle environment variable: Use the oracle user to enter the system. Add the following content at the end of the. bash_profile file:
NLS_LANG = "SIMPLIFIED Chinese" _ CHINA. ZHS16GBK

Export NLS_LANG


3. Restart the database server, start database listening, and start the database.
4. log on to the database as a sys user and run the following statement:
Update props $ set value $ = 'zhs16gbk' where name = 'nls _ CHARACTERSET'
Restart the Database Listener.
At this point, the database data can be properly displayed, but the previous data is still garbled and needs to be re-imported. The database has another problem with ora-06552.

5. The following is a solution for ora-06552:
Shutdown immediate;

Startup mount;
Alter system enable restricted session;
Alter system set JOB_QUEUE_PROCESSES = 0;
Alter system set AQ_TM_PROCESSES = 0;
Alter database open;
 
 
Col value NEW_VALUE CHARSET
Select value from NLS_DATABASE_PARAMETERS where parameter = 'nls _ CHARACTERSET ';
Col value NEW_VALUE NCHARSET
Select value from NLS_DATABASE_PARAMETERS where parameter = 'nls _ NCHAR_CHARACTERSET ';
 
-- INTERNAL_USE is a parameter that is not written in the document and is used to force character set consistency.
Alter database character set INTERNAL_USE & CHARSET;
Alter database national character set INTERNAL_USE & NCHARSET;
 
 
Shutdown immediate;
STARTUP;
-- Start the database again
Shutdown immediate;
STARTUP;
Follow the steps above, step by step, step by step, after completion, OK

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.