DBLink of Oracle

Source: Internet
Author: User

Sometimes, DBLink is one of the most convenient and convenient ways to manually synchronize data between two Oracle databases. The DBLink creation method is generally as follows:

SQL code
Create public database link <DBLink Name> connect to <username of the connected database> identified by <password of the connected database> using '<The service name of the connected database established by the Oracle client Tool> ';

Create public database link <DBLink Name> connect to <username of the connected database> identified by <password of the connected database> using '<The service name of the connected database established by the Oracle client Tool> ';

For example:

SQL code
Create public database link XMDS_KF connect to XMDS identified by XMDS using 'xmds _ KF ';

Create public database link XMDS_KF connect to XMDS identified by XMDS using 'xmds _ KF ';

 

However, this method has the disadvantage that a service name of the connected database must be created on the server. If it is not created, an error is returned:

ORA-12154: TNS: unable to process service name

But if you directly use the address to create the DBLink, you can save the trouble of configuring the service name:

 

SQL code
Create public database link XMDS_KF connect to XMDS identified by XNDS using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 145.24.16.182) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = XMDS)
)
)';

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.