oracle 12c 关闭统计信息收集和启用统计信息收集

前端之家收集整理的这篇文章主要介绍了oracle 12c 关闭统计信息收集和启用统计信息收集前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

oracle 12c 关闭统计信息收集和启用统计信息收集

--关闭统计信息
col client_name for a60
select client_name,status from DBA_AUTOTASK_CLIENT;

CLIENT_NAME                                                  STATUS
------------------------------------------------------------ ----------------
auto optimizer stats collection                              ENABLED
auto space advisor                                           ENABLED
sql tuning advisor                                           ENABLED

begin
DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'auto optimizer stats collection',operation => NULL,window_name => NULL);
end;
/

PL/sql procedure successfully completed.

--启用统计信息收集
select client_name,status from DBA_AUTOTASK_CLIENT;

CLIENT_NAME                                                  STATUS
------------------------------------------------------------ ----------------
auto optimizer stats collection                              DISABLED
auto space advisor                                           ENABLED
sql tuning advisor                                           ENABLED

sql> 

begin
DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'auto optimizer stats collection',window_name => NULL);
end;
/

PL/sql procedure successfully completed.

select client_name,status from DBA_AUTOTASK_CLIENT;

CLIENT_NAME                                                  STATUS
------------------------------------------------------------ ----------------
auto optimizer stats collection                              ENABLED
auto space advisor                                           ENABLED
sql tuning advisor                                           ENABLED

sql>
原文链接:https://www.f2er.com/oracle/206560.html

猜你在找的Oracle相关文章