Oracle 视图 DBA_DB_LINK_SOURCES 官方解释,作用,如何使用详细说明

本站中文解释

(视图)

Oracle视图是一种虚拟的表, 可以从一个或多个数据库表中选择数据. 它提供了一种替代的视图, 为我们提供了更多的灵活性, 使我们可以以不同的方式来访问和查看数据库表中的信息.

DBA_DB_LINK_SOURCES视图是Oracle数据库中的一种视图,它用于显示数据库链接的源数据库地址.该视图中的列包括源数据库类型、实例名称、主机名称、端口号和服务名.它通常用于跟踪或验证数据库中数据库链接的源信息以及用于检查或重新定位数据库链接的源数据库.

要使用DBA_DB_LINK_SOURCES视图, 首先需要定位查询的数据库链接的名称.然后, 使用以下语句执行查询:

SELECT * FROM DBA_DB_LINK_SOURCES WHERE NAME = ‘Link_Name’;

其中,Link_Name是要查询的数据库链接名称。查询结果就是指定数据库链接的源数据库地址信息。

官方英文解释

DBA_DB_LINK_SOURCES identifies all unique source databases that opened database links to the local database.

By default, only a DBA has access to this view. However, a DBA can grant access to this view to others.

This view is based on a persistent table that resides in the same system tablespace that is used by Database Auditing.

In a multitenant container database (CDB) environment, for every DBA_ view, there is a corresponding CDB_ view that contains data for all the pluggable databases (PDBs) in the CDB. A query on the CDB_DB_LINK_SOURCES view done in the CDB$ROOT container will show sources of all the database links recorded in all PDBs. A query on the corresponding DBA_DB_LINK_SOURCES view done in a PDB show information corresponding to that PDB only (that is, where that specific PDB was the target of an inbound database link).

Note that the CDB_ views would only show data from PDBs that are open at the time the query is issued. Therefore, when you are diagnosing sources of database links, Oracle recommends that you keep open any or all PDBs that might contain useful information for the diagnosis.

Column Datatype NULL Description

SOURCE_ID

NUMBER

NOT NULL

Unique ID that identifies an incoming database link

DB_NAME

VARCHAR2(256)

NOT NULL

Global name of the source database

DBID

NUMBER

NOT NULL

Database identifier of the source database. Maps to the DBID of the source database in V$DATABASE.

DB_UNIQUE_NAME

VARCHAR2(256)

Unique database name of the source database. Maps to the DB_UNIQUE_NAME of the source database in V$DATABASE. Null for source databases that do not provide this information.

HOST_NAME

VARCHAR2(256)

Resolved host name. Null if not available.

IP_ADDRESS

VARCHAR2(128)

IP address of source machine. Null if not available.

PROTOCOL

VARCHAR2(64)

One of supported protocols such as ipc, sdp, tcp, or tcps. Null if not available.

USERNAME

VARCHAR2(128)

NOT NULL

Oracle username of the user who logged into the local database. Maps to the USERNAME column in V$SESSION.

USER#

NUMBER

NOT NULL

Oracle user id of the user who logged into the local database. Maps to the USER# column in V$SESSION.

FIRST_LOGON_TIME

TIMESTAMP(6)

NOT NULL

The timestamp of the first connection on this database link in UTC

LAST_LOGON_TIME

TIMESTAMP(6)

The timestamp of the last connection on this database link in UTC

LOGON_COUNT

NUMBER

Number of times connection has been established through this database link

See Also:

  • “V$DATABASE”

  • “V$SESSION”

  • “DBA_EXTERNAL_SCN_ACTIVITY”

  • “DBA_DB_LINKS”


数据运维技术 » Oracle 视图 DBA_DB_LINK_SOURCES 官方解释,作用,如何使用详细说明