Home  >  Article  >  Database  >  Solve the problem of oracle garbled characters

Solve the problem of oracle garbled characters

hzc
hzcOriginal
2020-06-08 15:40:193305browse

Solve the problem of oracle garbled charactersSolutionSolution to the problem of Oracle garbled codes:

Do you often see all kinds of garbled codes, and your head gets big when you see them? Don’t be afraid, all problems will be solved There is one or even more than one solution,

There is a famous saying: There is no solution without its trace. Most of the Internet confuses the garbled code of tools with the garbled code of code operations. I looked at a lot of solutions and they were all pasted one after another without any innovation, so I published this blog today.

The following scheme server-side character set encoding is: SIMPLIFIED CHINESE_CHINA.US7ASCII The test is ok. For other encodings, please refer to

1. Tool garbled code:

Use PLSQL Developer to query or edit When ?? appears:

Cause: The character sets on the client and server are inconsistent

Solution:

First query the character set encoding of the server, and then The client can always make modifications;

1. Query the character set of the service:

2. Check the client’s character set encoding through the tool:

Open the tool: help-support info

Solve the problem of oracle garbled characters

Solve the problem of oracle garbled characters

3. Set environment variables (system environment variables):

NLS_LANG=SIMPLIFIED CHINESE_CHINA.US7ASCII(设置的编码必须和服务端保持一致)

If it does not take effect, it is recommended to restart the computer !

2. Query garbled characters:

Set two:

1. Modify environment variables:

NLS_LANG=SIMPLIFIED CHINESE_CHINA.US7ASCII(设置的编码必须和服务端保持一致)

2. Modify the registry: (For insurance reasons , look for all NLS_LANG in the registry to avoid multiple)

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb11g_home1

Solve the problem of oracle garbled characters

If it does not take effect, it is recommended to restart the computer!

3. Insert garbled characters:

Solving...

4. Import or export garbled characters:

None yet

5 .Modify the encoding on the server side: (Use this solution with caution)

cmd
sqlplus/nolog
conn/as sysdba;
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 ZHS16GBK;
alter database character set internal_use ZHS16GBK;
alter database national character set internal ZHS16GBK;(如果报错,可以不用理会)
shutdown immediate;
startup;

Recommended tutorial: "Oracle Tutorial"

The above is the detailed content of Solve the problem of oracle garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn