成都创新互联网站制作重庆分公司

oracle12c关闭统计信息收集和启用统计信息收集

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',
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                              ENABLED
auto space advisor                                           ENABLED
sql tuning advisor                                           ENABLED

SQL> 

网页标题:oracle12c关闭统计信息收集和启用统计信息收集
分享URL:http://cxhlcq.com/article/pcjdod.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部