Note
This view is available starting with V4.1.0.
Purpose
This view displays the DBLinks created by the current user.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| DB_LINK | VARCHAR2(128) | NO | The name of the DBLink. |
| USERNAME | VARCHAR2(128) | NO | The username used to connect to the remote database. |
| PASSWORD | VARCHAR2(30) | NO | This column is reserved for compatibility. |
| CREDENTIAL_NAME | VARCHAR2(128) | NO | The name of the credentials used to connect to the remote database. This column is reserved for compatibility. |
| CREDENTIAL_OWNER | VARCHAR2(128) | NO | The owner of the credentials used to connect to the remote database. This column is reserved 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 | This column is reserved for compatibility. |
| SHARD_INTERNAL | VARCHAR2(3) | NO | This column is reserved for compatibility. |
| VALID | VARCHAR2(3) | NO | This column is reserved for compatibility. The default value is YES. |
| INTRA_CDB | VARCHAR2(3) | NO | This column is reserved 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 by using the 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 by using the reverse DBLink. |
| REVERSE_HOST | VARCHAR2(46) | YES | The host name (IP address) used to connect to the local database by using the reverse DBLink. |
| REVERSE_PORT | NUMBER(38) | YES | The port number used to connect to the local database by using the reverse DBLink. |
| REVERSE_USERNAME | VARCHAR2(128) | YES | The username used to connect to the local database by using the reverse DBLink. |
Sample query
Query the DBLinks created by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_DB_LINKS;
The query result is as follows:
+-----------+----------+----------+-----------------+------------------+---------------------+-----------+--------+----------------+-------+-----------+-------------+---------------------+--------------+----------------------+--------------+--------------+------------------+
| 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 |
+-----------+----------+----------+-----------------+------------------+---------------------+-----------+--------+----------------+-------+-----------+-------------+---------------------+--------------+----------------------+--------------+--------------+------------------+
| 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