已索引
该文章已被其他文章引用。
查看 Oracle 顾问发现的问题
dba_advisor_findings 视图中包含了 ADDM、AUTO_SQL_TUNING、AUTO_SPCADV 的发现和 DBA 调用某个 advisor 后的发现。
set lines 200;
set pages 800;
col task_name for a30
col segname for a25
col partition for a20
col type for a20
col message for a50
select af.task_name, af.impact, ao.attr2 segname, ao.attr3 partition, ao.type, af.message
from dba_advisor_findings af, dba_advisor_objects ao
where ao.task_id = af.task_id
and ao.object_id = af.object_id
and af.task_name='advisor_cy test' -- 可以通过 task_name 来仅查看 DBA 调用某个 advisor 后的结果
and lower(af.message) like '%shrink%'; -- 如果想只查询可以进行 shrink 操作的对象,加上该条件
查看 Oracle 关于空间的 recommendations(包含了操作命令):
set lines 300;
col recommendations for a60;
col c1 for a40;
select tablespace_name, segment_name, segment_type, partition_name,recommendations, c1
from
table(dbms_space.asa_recommendations(all_runs=>'TRUE',show_manual=>'TRUE',show_findings=>'FALSE'));