How to Create DBLink in Oracle

Source: Internet
Author: User
Tags sql using
1. To create a global DBLink, you must first confirm that you have the permission to create a dblink: select * fromuser_sys_privswhereprivilegelikeu

1. To create a global DBLink, you must first confirm that you have the permission to create a dblink: select * from user_sys_privs where privilege like u

1. To create a global DBLink, you must first confirm that you have the permission to create a dblink:

  • If not, you must use the sysdba role to grant permissions to users:

  • 2. log on to PL/SQL using the following command:

  • -- Method 1: Database Server A is required to have database B ing in tnsnames. ora
  • The graphic configuration interface is as follows:

    3. query data:

  • -- Data Query, deletion, and insertion are the same as operations on the local database, except that the table name must be written as "table name @ dblink server.
  • Select xxx FROM table name @ Database Link name;
  • 4. Delete DBLink

  • 5. Create and delete Synonyms

    6. Create and delete views

  • Drop view name;
  • 7. Note:

    It is very easy to create a DBLink, but there is a lock in the background in use. You can view the lock in the console or query the database. Each time you use dblink for query, a connection will be created with a remote database. dblink will not automatically release this connection. If you use a large number of dblink queries, the number of connections of web projects will be insufficient, as a result, the system cannot run normally and the system does not run properly.

    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.