Do not install Oracle locally, connect to the database remotely using Plsql

Source: Internet
Author: User

(a) The Oracle,plsql remote connection database is not installed locally

1. First download instant Client to Oracle website:

Http://www.oracle.com/us/solutions/index-097480.html

The folder after decompression is called: Instantclient_11_2. Can be placed in any directory on the local disk. For example: d:/instantclient_11_2

2, in the D:/instantclient_11_2 directory under the new directory network, in the network directory to build the admin directory, in the Admin directory under the new file Tnsnames.ora, open to write the following:

ORCL =

(DESCRIPTION =

(Address_list =

(ADDRESS = (PROTOCOL = TCP) (HOST = 10.6.8.10) (PORT = 1521))

)

(Connect_data =

(service_name = ORCL)

)

)

Where ORCL is the local host name of the remote database, 10.6.8.10 is the IP address of the remote server, ORCL is the name of the remote database.

3. Add an environment variable named Tns_admin and the value is the path where the Tnsnames.ora file is located.

Add environment variables by (My Computer-attribute-advanced-environment variable-new).

4. 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

After the configuration is complete, turn off PL/SQL and restart.

The host name appears in the list of PL/SQL developer, and you can log in to the remote Oracle database by entering the user name password.

When we successfully connected, sometimes the query data will be garbled, this is because the local encoding and server-side coding inconsistent, we can pass the SQL statement:

Select Userenv (' language ') from dual;

Query the server-side encoding, as my own query results are

USERENV (' LANGUAGE ')

American_america. Zhs16gbk

We need to add an environment variable Nls_lang with a value of: American_america. ZHS16GBK then restart PL/SQL and there will be no more garbled problems.


This article is from the "My World I am the Master" blog, please be sure to keep this source http://xinyi168.blog.51cto.com/6660639/1913494

Do not install Oracle locally, connect to the database remotely using Plsql

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.