Accessing different Oracle databases through databaselink

Source: Internet
Author: User
By default, access between different Oracle Server databases is remotely accessed through local operations *. *

By default, access between different Oracle Server databases is remotely accessed through local operations *. *

Homepage → Database Technology

Background:

Read News

Access from different Oracle databases through database link

[Date: 2011-10-18] Source: Linux Author: qingwangyoucao [Font:]

By default, access between different Oracle Server databases is remotely accessed through local operations *. *

1. Create a database link
Example:
Create public database link orcl211 connect to username identified by password using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = *. *) (PORT = 1521 ))
)
(CONNECT_DATA =
(Service_name = ORCL)
)
)';

Parameter description:
Create public database link name

Connect to user name

Identified by password

Using 'Connection description'

The connection description must be in the following format _ or the service name configured in tnsnames. ora. Note that the following format must also be met in tnsnames. ora; otherwise, the connection will fail:

(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = *. *) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL service name)
)
)

2. the syntax for accessing objects in the Linked database is as follows: Access ts_staff_info under the edubur user in orcl211
Example:
Select * from edubur. ts_staff_info @ orcl211;
Parameter description:
Select * from user name. Table Name @ remote database link name

3. view all created database link names

Select owner, db_link from dba_db_links;

Ower db_link
PUBLIC ORCL211.REGRESS. RDBMS. DEV. US. ORACLE. COM


4. Delete the Database Link name
Drop public database link ORCL211.REGRESS. RDBMS. DEV. US. ORACLE. COM

  • 0
  • ArcGIS application of Oracle Spatial Feature Analysis

    Java call Oracle Stored Procedure tutorial

    Oracle tutorials

    Image Information

    View All comments in this article (0)

    Comments

    Latest Information

    Popular this week

    Introduction to Linux community-advertisement service-website map-help Info-contact us
    The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.


    Copyright©2006-2011 Linux community All rights reserved Zhejiang ICP backup No. 06018118

    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.