Connect to Oracle 11g remote database using instantclient_11_2 and PL/SQL Developer Toolkit (RPM)

Source: Internet
Author: User
Tags odbc

1, first download instant Client to Oracle website:

Http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/index.html

Choose a different instant client version based on your operating system

Download back is a compressed file, extracted after the folder called: D:/instantclient_11_2. Put it in the directory you like. For example: d:/instantclient_11_2

2. Create a new directory network under the D:/instantclient_11_2 directory, create a new admin directory under the network directory, create a new file Tnsnames.ora in the Admin directory, and use a text editor to open and write the following:

mwdb=
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521))
)
(Connect_data =
(service_name = mwdb)
)
)

First Yellow block: Indicates the local hostname that defines the remote server

Second yellow block: Remote DB instance Name

3. Add an environment variable named Tns_admin and the value is the path where the Tnsnames.ora file is located. For example, my machine is: d:/instantclient_11_2/network/admin

4. Set the Oracle language, add the environment variable Nls_lang, and the value is simplified Chinese_china. Zhs16gbk

If you do not know the Oracle language of the remote database, you can ssh or telnet to the remote machine, enter it at the command interface, and connect to the database using the command line.

SELECT * from Nls_instance_parameters;

View the value of Nls_language

Nls_language

Nls_territory

5. Download and install the PL.SQL.Developer configuration app
Configure Tools->preferences->connection

Oracle Home
D:/instantclient_11_2

OCI Library

D:/instantclient_11_2/oci.dll

The PL/SQL developer in Chinese is

Tools--Preferences--Connect

Oracle Home Directory

D:/instantclient_11_2

OCI Library

D:/instantclient_11_2/oci.dll

6, close PL/SQL Developer, restart Developer.

The hostname will appear in the PL/SQL developer list, enter the user name password, and you will be able to log in to the remote Oracle 11g database.

Supplemental Instant Client Instructions

Oracle Instant Client is an easy-to-support Oracle provider that supports multiple platforms. Available for download from the Oracle Web site for
Http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/index.html

Include the following:

Instant client Package-basic runs OCI, OCCI, and jdbc-oci all files required by the application.

Instant client Package-basic Lite: contains only English error messages and supports Unicode, ASCII, and Western European character sets only.

The Instant client package-jdbc Supplement adds Xa, internationalization, and rowset to JDBC.

Instant Client package-sql *plus contains sqlplus and required library files

Instant client PACKAGE-SDK The header files and examples needed to develop an Oracle application using Instant client Makefile

Instant client Package-odbc The libraries that are needed when using ODBC, not all platforms. Linux platform contains.

Basic and Basic lite must be selected in two, and other packages are optional. I downloaded Basic, JDBC Supplement, SQL *plus, SDK, ODBC. After decompression placed in a folder, in this folder to establish the file Tnsnames.ora, set the environment variables Ld_library_path and tns_admin point to the extracted directory, you can use Sqlplus.

I downloaded the instant client version for 10.2.0.2.0 and tested the connection to Oracle 9.2.0.4 and Oracle 10.2.0.1.

Instant client does not include tnsping, Exp/imp, Rman, NETCA and other tools. If you need these tools, you will need to install Oracle client

If you find this operation cumbersome, use Navicat Lite for Oracle to connect to Oracle database

See this article for more details. Http://www.linuxidc.com/Linux/2011-05/35598.htm

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.