[Oracle error highlights]: PLSQL cannot directly connect 64-bit Oracle11g database, plsqloracle11g

Source: Internet
Author: User

[Oracle error highlights]: PLSQL cannot directly connect 64-bit Oracle11g database, plsqloracle11g

After the Oracle 11g Database is installed today, plsql cannot be used to connect to the database. The Database drop-down box in the plsql client logon window is empty. See:



The Oracle service and listener have been enabled, and the related configurations have been checked.

After searching online, I found that plsql cannot directly connect to the 64-bit Oracle 11g Database. Since plsql is 32-bit, you need to install a 32-bit Oracle client to connect to a 64-bit database .. I remember this was not the case when I used the Oracle10g Database. I can use plsql to directly connect to the database.

Solution:

1. Download the Oracle client: instantclient-basic-win32-11.2.0.1.0.zip (click to download Oracle32-bit client), extract it to the Oracle Installation Directory of the Product:

D: \ app \ NiuNiu \ product \ instantclient_11_2.

2. copy the file: copy the tnsnames. ora file in the Database Installation Directory D: \ app \ NiuNiu \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN to the client folder.

3. Configure PLSQL Developer:

Set Oracle_Home and OCI Library in Tools-perference-Connection. For example, set the local machine:

Oracle Home: D: \ app \ NiuNiu \ product \ instantclient_11_2
OCI Library: D: \ app \ NiuNiu \ product \ instantclient_11_2 \ oci. dll

4. Set environment variables:

Modify the variable: Add D: \ app \ NiuNiu \ product \ instantclient_11_2 to the Path;
New variable: "TNS_ADMIN", with the value "D: \ app \ NiuNiu \ product \ instantclient_11_2 ;"
New variable: Name "NLS_LANG", value: "SIMPLIFIED CHINESE_CHINA.ZHS16GBK ",

Perform the test after completing the configuration. (You 'd better restart your computer)
Login successful!

Q &

Why do we need to configure the "NLS_LANG" variable?

If you do not add this variable, Chinese characters in the table will become garbled characters when you use the database to add data. This is because our database is 64-bit and the operating software PLSQL_Developer is 32-bit. That is to say, the Chinese text you write with PLSQL_Developer is a 32-bit character set, and the database can only properly store the 64-bit Chinese Character Set, which leads to the absence of a character set for writing and reading, this eventually leads to question marks or garbled characters in Chinese.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.