ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 042-095

042-095

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-15 04:15:23 0 删除 编辑
95. Your database is functional with peak load for one hour. You want to preserve the performance statistics collected during this period so that they can be used for comparison while analyzing the performance of the database in the future. What action would you take to achieve this task?
A) Set the STATISTICS_LEVEL initialization parameter to ALL.
B) Create a baseline on a pair of snapshots that have the statistics of the peak-load period in the database.
C) Decrease the snapshot interval in the AWR to collect more number of snapshots during the peak-load period.
D) Set the snapshot retention period in the Automatic Workload Repository (AWR) to zero to avoid the automatic purging of the snapshots.
答案:B
AWR快照集:快照集是一种机制,使用这种机制可标记重要时段的快照数据集。快照集是根据一对
快照定义的,这对快照用快照序列号 (snap_id) 来标识。每个快照集对应于一对且唯一一对快照。
快照集可用用户提供的名称标识,也可用系统生成的标识符标识。通过执行
DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE 过程并指定一个名称和一对快照标识符,便可创建一个快照集。会为新建的快照集指定一个快照集标识符。在数据库生命周期内,快照集标识符是唯一的。快照集用于保留快照数据。因此,属于某个快照集的快照会一直保留,直到删除该快照集。通常,会为过去某些有代表性的时段创建快照集,用于与当前系统行为进行比较。另外,
可在 Database Control 中通过使用快照集来设置基于阈值的预警。
可直接从 DBA_HIST_SNAPSHOT 或 Enterprise Manager Database Control 获取 snap_id。
Editor’s notes:what is the baseline?
Abaseline contains performance data from a specific time period that is preserved for comparison with other similar workload periods when performance problems occur. The snapshots contained in a baseline are excluded from the automatic AWR purging process and are retained indefinitely.
awr baseline在我看来就是保留下一段时间的snapshot不被删除,比如说每天peak time,然后在将来run awrrpt.sql来分析这段snapshots。(把这些快照保留下来,作为基准参考)
How to create and drop baseline?
Create baseline:
BEGIN
DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE (start_snap_id => 270,
end_snap_id => 280, baseline_name => 'peak baseline',
dbid => 3310949047, expiration => 30);
END;
/
Drop baseline:
BEGIN
DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE (baseline_name => 'peak baseline',
cascade => FALSE, dbid => 3310949047);
END;
/
After you create baseline,you can see the information by querying the view “dba_hist_baseline”.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718581/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 042-094
下一篇: 042-096
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    204201