Connecting a remote Oracle database using a PL/SQL client

Source: Internet
Author: User
Tags sql client

Always use SQL Develope connection database, as long as the write on IP, user name, password, sid and so on can connect, and later found that using PL/SQL connection to the remote Oracle database How to connect ah?

Here's how to modify the Oracle configuration file:

Configuration file path is D:\app\huyueyang\product\11.1.0\db_1\NETWORK\ADMIN

Modify the following tnsnames.ora, this is the configuration file you configure the connection, the installation time will typically have a default ORCL instance

Such as:

      1. Orcl=
      2. (DESCRIPTION =
      3. (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
      4. (Connect_data =
      5. (SERVER = dedicated)
      6. (service_name = ORCL)
      7. )
      8. )

We are connecting to a remote Oracle server today: We add the following configuration under the default configuration

    1. oracleback=  
    2.    ( description =  
    3.      (address =  (PROTOCOL  = TCP) (host = 10.2.4.121) (Port = 1521 ))   
    4.      (connect_data =  
    5.        (server = dedicated)   
    6.         (SERVICE_NAME = ORCL)   
    7.      )   
    8.   )
    9. Host,port, Service_Name is the basic information for connecting to a database Service_Name is the SID of your remote database service, and the oracleback here is your own random. The
    10. is finally connected using PL/SQL
    11. Here we use the new configuration Oracleback This configuration, the user name and password can be connected.
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.