QUESTION 24- DBMS_SQL_MONITOR.REPORT_SQL_MONITOR

QUESTION 24
A new report process containing a complex query is written, with high impact on the database. You want to collect basic statistics about query, such as the level of parallelism, total database time, and the number of I/O requests. For the database instance STATISTICS_LEVEL, the initialization parameter is set to TYPICAL and the
CONTROL_MANAGEMENT_PACK_ACCESS parameter is set to DIAGNOSTIC+TUNING. What should you do to accomplish this task?
A. Execute the query and view Active Session History (ASH) for information about the query.
B. Enable SQL trace for the query.
C. Create a database operation, execute the query, and use the DBMS_SQL_MONITOR.REPORT_SQL_MONITOR function to view the report.
D. Use the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure to monitor query execution and view the information from the V$SESSION_LONGOPS view.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Explanation:
The REPORT_SQL_MONITOR function is used to return a SQL monitoring report for a specific SQL
statement.
Incorrect Answers:
A: Not interested in session statistics, only in statistics for the particular SQL query.
B: We are interested in statistics, not tracing.
D: SET_SESSION_LONGOPS Procedure This procedure sets a row in the V$SESSION_LONGOPS view.
This is a view that is used to indicate the on-going progress of a long running operation. Some Oracle functions, such as parallel execution and Server Managed Recovery, use rows in this view to indicate the status of, for example, a database backup. Applications may use the SET_SESSION_LONGOPS procedure to advertise information on the progress of application specific long running tasks so that the progress can be monitored by way of the V$SESSION_LONGOPS view.

问题24

编写了一个包含复杂查询的新报表进程,对数据库的影响很大。您希望收集有关查询的基本统计信息,例如并行级别、数据库总时间和I/O请求数量。对于数据库实例STATISTICS_LEVEL,初始化参数设置为TYPICAL, CONTROL_MANAGEMENT_PACK_ACCESS参数设置为DIAGNOSTIC+TUNING。为了完成这项任务,你应该做些什么?

A.执行查询并查看Active Session History (ASH)查询信息。

启用SQL跟踪查询。

创建一个数据库操作,执行查询,并使用

D.BMS_SQL_MONITOR。命令功能REPORT_SQL_MONITOR查看报表。

D.使用DBMS_APPLICATION_INFO。在V$SESSION_LONGOPS视图中监控查询执行和查看信息。

正确答案:C

部分:(一)

解释

解释/参考:

解释:

REPORT_SQL_MONITOR函数用于返回特定SQL的SQL监视报告

声明。

不正确的答案:

答:对会话统计不感兴趣,只对特定SQL查询的统计感兴趣。

B:我们对统计感兴趣,不是追踪。

D: SET_SESSION_LONGOPS过程在V$SESSION_LONGOPS视图中设置一行。这是一个视图,用于指示一个长期运行的操作的正在进行的进度。一些 Oracle函数,如并行执行和服务器管理恢复,使用这个视图中的行来指示状态,例如,数据库备份。应用程序可以使用SET_SESSION_LONGOPS过程来发布特定于应用程序的长时间运行任务的进度信息,以便通过V$SESSION_LONGOPS视图来监控进度。_LONGOPS视图来监控进度。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值