PL/SQL Developer's experience in connecting to Oaracle11g64-bit System in 64-bit Windows 7, download from Windows 7
PL/SQL Developer's experience in connecting to Oaracle11g64-bit System in 64-bit Windows 7
I. Problem phenomena and Solutions
Symptom:
1. PL/SQL cannot log on to the 64-bit Database
2. Enter Chinese in PL/SQL developer. After saving, the Chinese character becomes '?? 'Such garbled characters
3. After importing data with Chinese characters, the Chinese data becomes '?? 'Such garbled characters
Environment:
1. Windows 7 64-bit System
2. oracle11g 64-bit System
3. PL/SQL developer 9.0
Solution:
1. Download the Windows 32-bit instantclient package and put it in a directory. Suppose D: \ instantclient
2. Copy D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN to D: \ instantclient.
(Assume that the installation directory of oracle11g is D: \ App \ Administrator \ Product \ 11.2.0 \ dbhome_1 \)
3. Put the tnsnames. ora file in the D: \ instantclient \ Network \ Admin directory.
4. Add D: \ instantclient to the top of the Path of the operating system.
5. added the value of the system environment variable TNS_ADMIN to D: \ instantclient.
6. Oracle main directory name for PL/SQL Developer tool preferences is D: \ instantclient, and OCI library is D: \ instantclient \ OCI. DLL
7. Check whether the character set of Oracle11g is consistent with that of the operating system to avoid garbled characters. Assume that the character set must be consistent with that of ZHS16GBK.
8. If the Oracle11g character set is not ZHS16GBK, change the oracle11g character set to ZHS16GBK.
9. Increase the value of the operating system environment variable NLS_LANG to SIMPLIFIED CHINESE_CHINA.ZHS16GBK or AMERICAN. ZHS16GBK.
Ii. Lessons learned
Most of these problems are solved on the network. I tried it many times according to the method on the network and reinstalled Oracle several times. After a long time, I finally solved the garbled problem.
The reason for a long time is that there was a mistake in the verification method. Before the problem was solved, I always felt that I had to change the previously entered Chinese '???? 'To make it into Chinese again to solve the problem,
In fact, if you enter Chinese again, it will not be changed '??? 'Is to solve the garbled problem, so the details are very important. Sometimes, when the common methods are the same, this method should be effective. As for the problem that has not been solved after repeated operations, you should calmly think about the operation process, think about the details. The problem may be the operation details and the verification method.
Iii. Related Knowledge
1. How to view the character set currently used in windows
Chcp
Displays the number of active console code pages or changes the active console code pages. If no parameter is available, the chcp displays the number of code pages in the active console.
Syntax
Chcp [nnn]
Parameters
Specifies the code page. The following table lists all supported code pages and their countries or languages:
Country or language of the Code Page
437 USA
708 Arabic (ASMO 708)
720 Arabic (DOS)
850 multilingual (lati)
852 Central Europe (DOS)-Slavic (Latin II)
855 Spanish (Russian)
857 Turkish
860 Portuguese
861 iceisland
862 Hebrew (DOS)
863 Canada-French
865 man
866 Russian-Spanish (DOS)
869 modern Greek
874 Thai (Windows)
932 Japanese (Shift-JIS)
936 Simplified Chinese (GB2312)
Korean 949
950 traditional Chinese (Big5)
1200 Unicode
1201 Unicode (Big-Endian)
1250 Central Europe (Windows)
1251 Spanish (Windows)
1252 Western Europe (Windows)
1253 Greek (Windows)
1254 Turkish (Windows)
1255 Hebrew (Windows)
1256 Arabic (Windows)
1257 Baltic text (Windows)
1258 Vietnamese (Windows)
20866 silivin (KOI8-R)
21866 silivin (KOI8-U)
28592 Central Europe (ISO)
28593 Latin 3 (ISO)
28594 Baltic Ocean (ISO)
28595 Spanish (ISO)
28596 Arabic (ISO)
28597 Greek (ISO)
28598 Hebrew (ISO-Visual)
38598 Hebrew (ISO-Logical)
50000 User-Defined
50001 automatic selection
50220 Japanese (JIS)
50221 Japanese (JIS-one-byte katakana allowed)
50222 Japanese (JIS-allows one byte katakana-SO/SI)
50225 Korean (ISO)
50932 Japanese (automatically selected)
50949 Korean (automatically selected)
51932 Japanese (EUC)
51949 Korean (EUC)
52936 Simplified Chinese (HZ)
65000 Unicode (UTF-7)
65001 Unicode (UTF-8)
On Windows, enter the following command in the command line to display the character set currently used by the windows operating system:
Chcp
The most important parameter that affects the character set of Oracle databases is the NLS_LANG parameter.
The format is as follows: NLS_LANG = language_territory.charset
It has three components (language, region, and Character Set), each of which controls the NLS subset features.
Where:
Language: Specifies the Language of the server message, which affects whether the prompt information is in Chinese or English.
Territory: Specifies the date and number format of the server,
Charset: Specifies the character set.
For example: AMERICAN _ AMERICA. ZHS16GBK
From the composition of NLS_LANG, we can see that the real impact on the database character set is actually the third part.
Therefore, if the character set between the two databases is the same as that in the third part, data can be imported and exported to each other. The preceding information is only prompted in Chinese or English.
How to view the database version
Select * from v $ version contains version information, core version information, and number of digits (32-bit or 64-bit ).
2. view the database Character Set
Database Server Character Set select * from nls_database_parameters, which is derived from props $ and represents the character set of the database.
Client Character Set environment select * from nls_instance_parameters, which is from v $ parameter, indicating the character set setting of the client, which may be a parameter file, environment variable or registry
Select * from nls_session_parameters in the session Character Set environment, which is derived from v $ nls_parameters, indicating the session's own settings, which may be the session environment variable or the session is completed by alter session. If the session has no special settings, it will be consistent with nls_instance_parameters.
Query character sets on oracle server
There are many ways to find the character set of the oracle server. The intuitive query method is as follows:
SQL> select userenv ('language') from dual;
USERENV ('language ')
----------------------------------------------------
SIMPLIFIED CHINESE_CHINA.ZHS16GBK