Note
This view is available starting with V4.1.0.
Purpose
This view displays all DBLinks created in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | NO | The username of the user who created the DBLink. |
| DB_LINK | VARCHAR2(128) | NO | The name of the DBLink. |
| USERNAME | VARCHAR2(128) | NO | The username used to connect to the remote database. |
| CREDENTIAL_NAME | VARCHAR2(128) | NO | The name of the credentials used to connect to the remote database. This parameter is retained for compatibility. |
| CREDENTIAL_OWNER | VARCHAR2(128) | NO | The owner of the credentials used to connect to the remote database. This parameter is retained for compatibility. |
| HOST | VARCHAR2(2000) | NO | The host name (IP address) used to connect to the remote database. |
| CREATED | DATE | NO | The time when the DBLink was created. |
| HIDDEN | VARCHAR2(3) | NO | A reserved parameter for internal use. This parameter is retained for compatibility. |
| SHARD_INTERNAL | VARCHAR2(3) | NO | A reserved parameter for internal use. This parameter is retained for compatibility. This parameter is used to indicate whether the DBLink supports shared connections, thereby reducing the number of connections between the local and remote databases. |
| VALID | VARCHAR2(3) | NO | A reserved parameter for internal use. This parameter is retained for compatibility. The default value is YES. |
| INTRA_CDB | VARCHAR2(3) | NO | A reserved parameter for internal use. This parameter is retained for compatibility. |
| TENANT_NAME | VARCHAR2(128) | NO | The name of the tenant used to connect to the remote database. |
| REVERSE_TENANT_NAME | VARCHAR2(128) | YES | The name of the tenant used to connect to the local database for a reverse DBLink. |
| CLUSTER_NAME | VARCHAR2(128) | YES | The name of the cluster used to connect to the remote database. |
| REVERSE_CLUSTER_NAME | VARCHAR2(128) | YES | The name of the cluster used to connect to the local database for a reverse DBLink. |
| REVERSE_HOST | VARCHAR2(46) | YES | The host name (IP address) used to connect to the local database for a reverse DBLink. |
| REVERSE_PORT | NUMBER(38) | YES | The port number used to connect to the local database for a reverse DBLink. |
| REVERSE_USERNAME | VARCHAR2(128) | YES | The username used to connect to the local database for a reverse DBLink. |
Sample query
Query the DBLinks created in the current tenant.
obclient [SYS]> SELECT * FROM SYS.DBA_DB_LINKS;
The query result is as follows:
+----------+-----------+----------+----------+-----------------+------------------+---------------------+-----------+--------+----------------+-------+-----------+-------------+---------------------+--------------+----------------------+--------------+--------------+------------------+
| OWNER | DB_LINK | USERNAME | PASSWORD | CREDENTIAL_NAME | CREDENTIAL_OWNER | HOST | CREATED | HIDDEN | SHARD_INTERNAL | VALID | INTRA_CDB | TENANT_NAME | REVERSE_TENANT_NAME | CLUSTER_NAME | REVERSE_CLUSTER_NAME | REVERSE_HOST | REVERSE_PORT | REVERSE_USERNAME |
+----------+-----------+----------+----------+-----------------+------------------+---------------------+-----------+--------+----------------+-------+-----------+-------------+---------------------+--------------+----------------------+--------------+--------------+------------------+
| SYS | OB_DBLINK | SYS | NULL | NULL | NULL | xx.xx.xx.xx:2881 | 22-MAY-23 | NULL | NULL | YES | NULL | oracle001 | NULL | NULL | NULL | 0.0.0.0 | 0 | NULL |
+----------+-----------+----------+----------+-----------------+------------------+---------------------+-----------+--------+----------------+-------+-----------+-------------+---------------------+--------------+----------------------+--------------+--------------+------------------+
1 row in set