Resolves a method that Plsql cannot connect to Oracle on a 64-bit Win7 system (Plsql does not recognize Oracle_home configuration)

Source: Internet
Author: User
Tags win32

A new 64-bit Win7 system has recently been installed that requires an Oracle database for work, and a database that is managed and maintained by the company's it dba.

We only need to connect to use it, so I installed the Oracle client x64 and PL/SQL program on my machine, Oracle client also set the environment variables and other configurations, but when opening plsql, the database can not be displayed, the effect is as follows:

So, I went to the internet to check a bit, online saying a lot, as explained below.

1. Questions

Plsql so far only 32-bit programs, and most of the desktop system is basically the use of 64-bit Windows operating system, on 64-bit Windows, most of the time is also installed 64-bit Oracle client program, this combination, Causes Plsql to not recognize the Oracle_home directory and cannot read the connection string in the Tnsnames.ora file

2. Solution 2.1 Use instantclient-basic-win32-10.2.0.5

Go to the official website to download, unzip the instantclient-basic-win32-10.2.0.5.zip files, compress the files, copy to the designated under the under, such as C:\oracle\instantclient_10_2\, The final instantclient directory is C:\oracle\product\instantclient_10_2

2.2 Configuring Environment variables on Windows

Right click on "My Computer" click on the "Properties" menu, go to the "System Properties" dialog box, select the "Advanced" tab, click "Environment Variables", in the User variable box area, create a new variable name named ' Oracle_home, according to their own ORACLE actual installation directory to fill their values, for example, The Oracle_home value of the author's environment is "C:\oracle\product\instantclient_10_2"

Reference Source: http://www.2cto.com/database/201503/386267.html

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

64-bit Oracle 11g is installed, and the Oracle database cannot be read after you have configured it with Plsql developer.

Phenomena such as:

Combined with their own analysis and other information, summed up the solution.

1 because plsql Developer is 32-bit, all the clients that need to download oracle32 bits,

Address: http://www.oracle.com/technetwork/topics/winsoft-085727.html.

Instantclient-basic-nt-11.2.0.4.0.zip. Free installation version of the download down to unzip the Local on the line.


2 Assume: Oracle's installation home path is D:\oracle\product\11.2.0;

The client's decompression address is D:\oracle\instantclient_11_2.


3 Configuring Environment variables: This step differs slightly from the other methods, where you can not copy the Tnsnames.ora file to the client directory .

(I believe this is not to mention how to configure the environment variables):

tns_admin =D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN

Nls_lang = simplified Chinese_china. Zhs16gbk

Description:tns_admin, refers to the directory name where the Tnsnames.ora file resides.

If you specify to the client directory, you must copy the Tnsnames.ora file.

Nls_lang Environment variables, to be set to the same as the database side, you can query the character set in Sqlplus

Sql> Select Userenv (' language ') Nls_lang from dual;
Nls_lang
----------------------------------------------------
Simplified Chinese_china. Zhs16gbk

4 The use of the client is here:

Set Oracle Home for Oracle installation directory Home

Set the full path name of the Oci.dll file for the OCI library to the Oracle client.

Apply & Ok.

5 Turn off the Plsql and reboot. Look, now there's a


This is mainly two points, the environment variable tns_admin configured to tnsnames.ora file directory name;

The OCI Library in Plsql is set to the Oci.dll of the Oracle client.

Reference Source: http://blog.csdn.net/netdevgirl/article/details/27818709

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

In addition, you can also write a bat file settings under environment variables;
Open the installation directory for Plsql Developer C:\Program files\plsql Developer
Write a A.bat file with the following contents:
@echo off
Set Path=d:\program files\instantclient_11_2
Set Oracle_home=d:\program files\instantclient_11_2
Set Tns_admin=d:\program files\instantclient_11_2
Set Nls_lang=simplified Chinese_china. Zhs16gbk
Start Plsqldev.exe


Note: Set Nls_lang=american_america. Al32utf8 (for English)
Set Nls_lang=simplified Chinese_china. ZHS16GBK (in Chinese)
I have a oracle11g here. The database is Chinese so I used 16GBK, save txt text and modify the suffix named Bat, and then double-click the bat file as Plsql developer to replace Plsql developer Traditional boot mode

5, close Plsql Developer re-open the connection successfully, all of my here are running as Administrator;

6, note: After the Oracle's listening every time there are changes to double-click A.bat Re-point! Otherwise it will be reported ora-12154 tns:could not resolve the connect identifier specified error

Source: http://blog.csdn.net/tang745163962/article/details/47419501

Resolves a method that Plsql cannot connect to Oracle on a 64-bit Win7 system (Plsql does not recognize Oracle_home configuration)

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.