Create DATABASE link

Source: Internet
Author: User

If the database connection is not established in the local Tnsnames.ora, then 1 is used, otherwise 2

1:create Database Link Geelyin96
Connect to Geelyin identified by Geelyinpassword
Using ' (DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.86.1.96) (PORT = 1521))
)
(Connect_data =
(service_name = appdb)
)
)‘;

Description: Geelyin96 is the name of database link, Geelyin is the user name of the remote, Geelyinpassword is the password for the remote database

Host is the port number of the remote database Ip,port the remote database, Service_Name is the name of the SSID


2:create Database Link Geelyin96

Connect to Geelyin identified by Geelyinpassword

Using ' 10.86.1.96 ';
Description: Geelyin96 is the name of database link, Geelyin is the user name of the remote, Geelyinpassword is the password for the remote database.

' 10.86.1.96 ' is the link name for the remote connection database in Tnsnames.ora

Query Statement Sql->select * from [email protected]

SELECT * from dba_objects where object_type= ' database link ' queries all database link

Create DATABASE link

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.