32.Your database instance is running with full workload after database creation. You have decided to

32.Your database instance is running with full workload after database creation. You have decided to use
a fixed-size undo tablespace. You want to use the Undo Advisor to estimate the capacity of the undo
tablespace.
Which two factors must you consider before using the Undo Advisor to estimate the capacity of the undo
tablespace? (Choose two.)
A.the retention period to support flashback
B.the expected length of the longest-running query
C.the number of undo tablespaces in the database
D.the size of the Flash Recovery Area for the database instance
答案:AB
解析:C是错误的,与undo大小没有啥关系,D也是错误的闪回恢复区与undo大小也没啥关系
A正确,闪回的保留时间,这里如果没有开闪回的话,那么主要就是靠undo了
B正确,这个是由于在查询的时候这个是要占用undo的,所以为了不报错,那么需要知道最长的查询需要占用多大的undo
参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/undo.htm#ADMIN11466 有下面一段内容
To use the Undo Advisor, you first estimate these two values:
1.The length of your expected longest running query
2.The longest interval that you will require for Oracle Flashback operations
这里可以看出来选择AB
这里说一下Undo Advisor,如果想要确定undo表空间的话,那么最好通过undo advisor来确定,它的数据来源于awr,这个功能
可以通过两种方式来访问,一种是em另外一种是BMS_ADVISOR PL/SQL package.优先考虑使用em
一、EM

进入首页后点击服务器--〉自动还原管理,选择分析时段,点击运行分析,然后就会在分析结果中给出对应的统计信息


二、DBMS_ADVISOR PL/SQL package
DECLARE
   tid    NUMBER;
   tname  VARCHAR2(30):='UNDO ADVISOR';
   oid    NUMBER;
BEGIN
   DBMS_ADVISOR.CREATE_TASK('Undo Advisor', tid, tname, 'Undo Advisor Task');
   DBMS_ADVISOR.CREATE_OBJECT(tname, 'UNDO_TBS', null, null, null, 'null', oid);
   DBMS_ADVISOR.SET_TASK_PARAMETER(tname, 'TARGET_OBJECTS', oid);
   DBMS_ADVISOR.SET_TASK_PARAMETER(tname, 'START_SNAPSHOT', 122);--这个是awr中的SNAPSHOT的id
   DBMS_ADVISOR.SET_TASK_PARAMETER(tname, 'END_SNAPSHOT', 172);--这个是awr中的SNAPSHOT的id
   DBMS_ADVISOR.SET_TASK_PARAMETER(tname, 'INSTANCE', 1); --这个是awr中的instance_number
   DBMS_ADVISOR.execute_task(tname);
END;
/
--执行完成后可以从下面的视图中查看相关信息
select * from DBA_ADVISOR_TASKS;
select * from DBA_ADVISOR_OBJECTS;
select * from DBA_ADVISOR_FINDINGS  --这里的message和more info中可以查看对应的信息
select * from DBA_ADVISOR_RECOMMENDATIONS;
--删除任务
exec dbms_advisor.delete_task('UNDO ADVISOR');
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值