All Products
Search
Document Center

Reference database links

Last Updated: Jun 18, 2021

When you issue an SQL statement that contains a database link, you need to use the complete database link name as stored in the data dictionary. For more information about database link names, see Create database links.

When ApsaraDB for OceanBase connects to a remote database, ApsaraDB for OceanBase uses a database connection string to access the remote database. If the connection succeeds by using the database string, username, and password, ApsaraDB for OceanBase follows the rules in Reference schema objects to access the specified object in the remote database. However, take note of the following limits:

  1. You can only execute read-only statements.

  2. You can only access table objects but not other objects such as views and sequences.

  3. When you access a table object, you must explicitly specify the database name, for example, test.t1@my_link.

  4. The following plans and operators are not supported:

    • You cannot perform the RESCAN operation on the remote database.

    • You cannot execute the operators such as NESTED LOOP JOIN, SEMI JOIN, ANTI JOIN, and SUBPLAN FILTER on the remote database.

    • If the preceding problems occur, you can attempt to run the EXPLAIN PLAN statement to view the original plan and the SQL statements sent to the remote cluster for execution, and adjust the plan by using a hint.