PLSQL Developer connects to a remote Oracle database

Source: Internet
Author: User

Problem description:
 
Use pl/SQL developer 9.0.6 on Windows 7 (32-bit) to remotely connect to the Oracle 10.2.0 database in Linux (64-bit. The oracle client used on Windows is a instantclient-basic-win32-10.2.0.3-20061115 and instantclient-sqlplus-win32-10.2.0.3-20061115, which decompress the above two files together and create tnsnames with the same content on the oracle server. ora (IP, port, and database instance are consistent ). I used sqlplus "sys/password @ orcl as sysdba" in CMD to connect normally, but directly entered sqlplus and then entered the user name and password, prompting

If you use plsql developer to connect directly, the following problems will be prompted:

Solution:
 
The root cause of the problem is that the oracle client version is incompatible with the oracle database !!!
 
Basic steps:
 
Server (Linux)
 
1. Configure the IP address
 
Run vim ORACLE_HOME/network/admin/listener.org to check the IP address. Change the IP address from the domain name to the IP address, for example, "localhost. localdomain" à "10.1.10.121"
 
Vim ORACLE_HOME/network/admin/listener.org operate the same as above
 
Su-switch to the root user
 
Vim/etc/hosts
 
Add a line similar to the following (not required if it is already configured during installation ):
 
10.1.10.121 orcl (database instance) orcl
 
Save and close before testing
 
Ping orcl
 
2. Client Configuration
 
Download the minimum driver package required for the remote connection provided by oracle: instantclient-basic-win32-10.2.0.4.zipand instantclient-sqlplus-win32-10.2.0.4.zip (if sqlplus is not required)
 
: Http://www.oracle.com/technetwork/topics/winsoft-085727.html
 
After the download is complete, extract the above two files to the same directory, for example, C: \ instantclient_10_2 (this directory is useful when configuring environment variables)
 
% ORACLE_HOME \ network \ admin \ tnsnames on the server side. ora copies a copy and stores it in C: \ instantclient_10_2 \ network \ admin. (You must create the network \ admin folder by yourself. You can also create this file directly in the client, enter the following content (note IP address and database instance ):
 

 

# Tnsnames. ora Network Configuration File:/oracle/product/10.2.0/db_1/network/admin/tnsnames. ora
 
# Generated by Oracle configuration tools.
 
ORCL (database instance name) =
 
(DESCRIPTION =
 
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.1.50.135) (PORT = 1521 ))
 
(CONNECT_DATA =
 
(SERVER = DEDICATED)
 
(SERVICE_NAME = orcl (database instance name ))
 
)
 
)
 
EXTPROC_CONNECTION_DATA =
 
(DESCRIPTION =
 
(ADDRESS_LIST =
 
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1 ))
 
)
 
(CONNECT_DATA =
 
(SID = PLSExtProc)
 
(PRESENTATION = RO)
 
)
 
)
 

This ensures that the connection configuration used by the client is consistent with that used by the server.
 
Modify environment variables:
 
Create the following environment variables in the windows client (both user and system variables are acceptable)
 
(1) ORACLE_HOME = C: \ instantclient_10_2
 
(2) LD_LIBRARY_PATH = C: \ instantclient_10_2
 
(3) TNS_ADMIN = C: \ instantclient_10_2
 
(4) NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK
 
Modify the path variable and add "; ORACLE_HOME" at the end"
 
Save and close. Now the client configuration is complete.
 
Sqlplus connection:
 
Terminal input: sqlplus "sys/password @ orcl as sysdba" or sqlplus "scott/password" can be tested
 
Plsql developer Connection
 
Based on the preceding configuration, you can configure plsql develpoer to manage oracle databases in a graphical manner.
 
Download and install plsql developer. Then, cancel the installation and go to the plsql develper page. Select tool> preference> Oracle connection (this option is enabled by default) in, the oracle main directory name is set to: C: \ instantclient_10_2 and the OCI library is: C: \ instantclient_10_2 \ oci. dll
 
After the configuration is complete, save and close, and then open the plsql developer interface to connect to the database, enter the user name, such as sys; password, database instance name, such as orcl, and select the connection identity (sys uses sysdba) then the connection will be able to operate the database normally !!!

After Oracle 10g is installed, restart the system. If PLSQL is used for connection, no listening is reported.

ORA-03114 PLSQL process compilation disconnection Error

Simple configuration of PLSQL connection to Oracle

Detailed description on Performance Improvement of PLSQL batch Forall operations

Use Oracle SQLDeveloper to connect to the database and create a user

Oracle PL/SQL Developer import and export data

Install the Oracle 11g and Oracle SQL Developer clients in 64-bit Windows 7

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.