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

本站中文解释

Oracle视图是以DBA_RAT_CAPTURE_SCHEMA_INFO为例,它是用于捕获和提取有关捕获过程中使用的模式的信息的视图。

具体而言,该视图提供有关捕获过程中使用的模式的信息,例如模式名称、包含表的列表、模式下的索引类型等。

通过使用DBA_RAT_CAPTURE_SCHEMA_INFO视图可以执行以下操作:

1)查看模式列表和模式下的表:

可以使用如下SQL查询模式列表和模式下的表:

SELECT DISTINCT OWNER, TABLES FROM DBA_RAT_CAPTURE_SCHEMA_INFO;

2)查看索引类型列表:

可以使用如下SQL查询模式下的索引类型:

SELECT OWNER, INDEX_TYPE FROM DBA_RAT_CAPTURE_SCHEMA_INFO;

官方英文解释

DBA_RAT_CAPTURE_SCHEMA_INFO displays the login schema and current schema that were in effect when SQL statements were recorded in a workload capture.

This view is useful when you perform a workload replay in extended PL/SQL mode. This type of replay may include SQL statements that perform table operations such as SELECT, UPDATE, and DELETE. If the current schema was different from the login schema at the time of the workload capture, then those table operations may have been performed with the privileges of the current user, not the login user. During workload replay, all operations are performed with the privileges of the login user. Therefore, errors can occur during replay if the login user does not have the necessary privileges to perform the table operations.

To resolve this issue, you can use this view in conjunction with the DBA_WORKLOAD_CAPTURE_SQLTEXT view. Join the CAPTURE_ID column in this view with the CAPTURE_ID column in DBA_WORKLOAD_CAPTURE_SQLTEXT to determine the login schema and current schema that were in effect when each SQL statement in DBA_WORKLOAD_CAPTURE_SQLTEXT was captured. Examine the SQL_TEXT column in DBA_WORKLOAD_CAPTURE_SQLTEXT to determine whether the SQL statement involved any table operations, and whether those table operations were performed with the privileges of the current user or the login user. You can then grant to the login user the necessary privileges for performing those table operations before performing a workload replay.

Column Datatype NULL Description

CAPTURE_ID

NUMBER(38)

Internal key for the workload capture

SQL_ID

VARCHAR2(13)

SQL identifier for the parent cursor in the library cache

LOGIN_SCHEMA

VARCHAR2(128)

The schema of the user who logged on to the session in which the SQL statement was recorded in the workload capture. This value does not change during a session.

CURRENT_SCHEMA

VARCHAR2(128)

The currently active default schema for the session when the SQL statement was recorded in the workload capture. This value may change during a session through use of an ALTER SESSION SET CURRENT_SCHEMA statement. It may also change during a session to reflect the owner of any active definer’s rights object.

See Also:

“DBA_WORKLOAD_CAPTURE_SQLTEXT”


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