转 oracle 默认自动统计信息 时间修改
############sql3:
https://blog.csdn.net/dataminer_2007/article/details/41363417
http://blog.51cto.com/hunt1574/2136259
b6usrg82hwsa3 28,795.60 call dbms_stats.gather_database_stats_job_proc ( )
select window_name, repeat_interval, duration, enabled from dba_scheduler_windows where enabled='TRUE';
select * from DBA_SCHEDULER_JOB_RUN_DETAILS where job_name ='GATHER_STATS_JOB';
修改周六日自动任务的运行时间开始于22点,持续时间240分钟:
exec dbms_scheduler.disable( name => 'SATURDAY_WINDOW', force => TRUE);
exec dbms_scheduler.set_attribute( name => 'SATURDAY_WINDOW', attribute => 'repeat_interval',value => 'freq=daily;byday=SAT;byhour=22;byminute=0;bysecond=0');
exec dbms_scheduler.set_attribute( name => 'SATURDAY_WINDOW', attribute => 'DURATION',value => numtodsinterval(240,'minute'));
exec dbms_scheduler.enable( name => 'SATURDAY_WINDOW');
exec dbms_scheduler.disable( name => 'SUNDAY_WINDOW, force => TRUE);
exec dbms_scheduler.set_attribute( name => 'SUNDAY_WINDOW', attribute => 'repeat_interval',value => 'freq=daily;byday=SUN;byhour=22;byminute=0;bysecond=0');
exec dbms_scheduler.set_attribute( name => 'SUNDAY_WINDOW', attribute => 'DURATION',value => numtodsinterval(240,'minute'));
exec dbms_scheduler.enable( name => 'SUNDAY_WINDOW');
###debug
Rem Pls run as sys i.e "connect / as sysdba" on each instance
set pagesize 2000
set echo on
column OBJECT_NAME format a30
spool job
select object_id, OBJECT_NAME from dba_objects
where OBJECT_TYPE = 'JOB';
select * from dba_scheduler_jobs where job_name ='GATHER_STATS_JOB';
select * from DBA_SCHEDULER_JOB_LOG where job_name ='GATHER_STATS_JOB';
select * from DBA_SCHEDULER_JOB_RUN_DETAILS where job_name ='GATHER_STATS_JOB';
spool off
Rem Internal Job Queues Summary report.
Rem Pls run as sys i.e "connect / as sysdba" on each instance
column systimestamp format a35
column ATTR_INTV format a37
column ATTR_TSTAMP format a37
column start_time format a35
column obj_name format a20
column name format a30
column value format a30
column window_name format a10
column job_queue_name format a18
column job_type format 9999
column flag format 9999
column status format a6
column "SEQUENCE#" format 9999
column id format 99999
set pagesize 100
set echo on
spool scheduler_qs
-- Report Internal Queues
--select job_queue_name, JOB_TYPE,
-- (select object_name from dba_objects where object_id = job_oid union select name from
-- scheduler$_lwjob_obj where obj# = job_oid) OBJ_NAME, FLAG, start_time from x$jskjobq;
-- scheduler$_lwjob_obj is not available
select * from x$jskjobq;
-- Report current time in scheduler format
select dbms_scheduler.stime from dual;
-- Report all global attributes
SELECT o.name, a.*
FROM sys.obj$ o, sys.scheduler$_global_attribute a
WHERE o.obj# = a.obj# AND BITAND(a.flags,1) != 1;
-- Report resource manager info
select * from v$rsrc_plan;
select * from v$rsrc_plan_history;
select id,name, active_sessions, execution_waiters from v$rsrc_consumer_group;
select * from v$rsrc_consumer_group;
select state from v$rsrc_session_info where state != 'NOT MANAGED' ;
select name, CPU_WAITS, CONSUMED_CPU_TIME, YIELDS,
CPU_WAIT_TIME from V$RSRC_CONSUMER_GROUP;
Rem Scheduler job and window logs
column additional_info format a40
set pagesize 1000
set linesize 150
column REQ_START_DATE format a37
column ACTUAL_START_DATE format a37
column log_date format a37
column window_name format a10
column operation format a9
column error# format 99999
column status format a9
column CPU_USED format a16
column job_name format a18
column run_duration format a15
connect / as sysdba
select log_date, owner, job_name, operation, status from dba_scheduler_job_log
union
select log_date, 'SYS', window_name, operation, status from
dba_scheduler_window_log
order by 1;
Rem select log_date, actual_start_date-req_start_date, job_name, error#, status, run_duration,
Rem cpu_used, additional_info
Rem from dba_scheduler_job_run_details order by log_id;
select job_name, CAST (actual_start_date-req_start_date AS INTERVAL DAY(2) TO SECOND(2)) DELAY
from dba_scheduler_job_run_details order by log_id;
Rem select additional_info from dba_scheduler_job_run_details where additional_info is not null;
spool off;
Rem Internal Job Queues Summary report for 10.2.
Rem Pls run as sys i.e "connect / as sysdba" on each instance
set long 400
column log_date format a37
column operation format a8
column status format a6
column additional_info format a400
set pagesize 1000
set linesize 120
column systimestamp format a37
column next_start_date format a40
column start_date format a40
column manual_open_time format a40
column manual_duration format a40
column duration format a40
column end_date format a40
column last_start_date format a40
column window_name format a26
column enabled format a6
column active format a6
column systimestamp format a35
column ATTR_INTV format a37
column ATTR_TSTAMP format a37
column start_time format a35
column obj_name format a20
column name format a30
column value format a30
column job_queue_name format a18
column job_type format 9999
column flag format 9999
column status format a6
column "SEQUENCE#" format 9999
column id format 99999
spool wintest
select * from dba_scheduler_windows ;
select log_date, window_name, operation, status, substr(additional_info,1,350) from
dba_scheduler_window_log
where operation != 'CREATE'
order by 1;
select log_date, window_name, operation,substr(additional_info,1,350) from
dba_scheduler_window_log order by 1 ;
select window_name, substr(additional_info,1,350) x from
dba_scheduler_window_log where additional_info is not null;
-- Report Internal Queues v10.2
select job_queue_name, JOB_TYPE,
(select object_name from dba_objects where object_id = job_oid
) OBJ_NAME, FLAG, start_time from x$jskjobq;
-- Report current time in scheduler format
select dbms_scheduler.stime from dual;
-- Report all global attributes
SELECT o.name, a.*
FROM sys.obj$ o, sys.scheduler$_global_attribute a
WHERE o.obj# = a.obj# AND BITAND(a.flags,1) != 1;
-- Report resource manager info
select * from v$rsrc_plan;
select * from v$rsrc_plan_history;
select id,name, active_sessions, execution_waiters from v$rsrc_consumer_group;
select * from v$rsrc_consumer_group;
select state from v$rsrc_session_info where state != 'NOT MANAGED' ;
select name, CPU_WAITS, CONSUMED_CPU_TIME, YIELDS,
CPU_WAIT_TIME from V$RSRC_CONSUMER_GROUP;
转 oracle 默认自动统计信息 时间修改的更多相关文章
- Oracle的自动统计信息不收集直方图的信息
Oracle的自动统计信息不收集直方图的信息 在oracle9i中,默认的统计信息收集是不收集直方图信息的,也就是说默认的MOTHOD_OPT模式为FOR ALL COLUMNS SIZE 1 在10 ...
- [统计信息系列7] Oracle 11g的自动统计信息收集
(一)统计信息收集概述 在Oracle 11g中,默认有3个自动任务,分别是:自动统计信息收集.SQL调优顾问.段空间调整顾问,查看方法如下: SQL> SELECT CLIENT_NAME,T ...
- Oracle自动统计信息的收集原理及实验
[日期:2014-11-21]来源:Linux社区 作者:stevendbaguo[字体:大 中 小] 从Oracle Database 10g开始,Oracle在建库后就默认创建了一个名为GATH ...
- oracle自动统计信息
在11g中,默认自动收集统计信息的时间为晚上10点(周一到周五,4个小时),早上6点(周六,周日,20个小时), select a.window_name, a.repeat_interval,a ...
- Oracle之自动收集统计信息
一.Oracle 11g 在Oracle的11g版本中提供了统计数据自动收集的功能.在部署安装11g Oracle软件过程中,其中有一个步骤便是提示是否启动这个功能(默认是启用这个功能). 在这里介绍 ...
- oracle里的统计信息
1 oracle里的统计信息 Oracle的统计信息是这样的一组数据,存储在数据字典,从多个维度描述了oracle数据库对象的详细信息,有6种类型 表的统计信息:记录数.表块的数量.平均行长度等 索引 ...
- 基于Oracle的SQL优化(崔华著)-整理笔记-第5章“Oracle里的统计信息”
第5章“Oracle里的统计信息” 详细介绍了Oracle数据库里与统计信息相关的各个方面的内容,包括 Oracle数据库中各种统计信息的分类.含义.收集和查看方法,以及如何在Oracle数据库里正确 ...
- 关于Oracle开启自动收集统计信息的SPA测试
主题:关于Oracle开启自动收集统计信息的SPA测试 环境:Oracle RAC 11.2.0.4(Primary + Standby) 需求:生产Primary库由于历史原因关闭了自动统计信息的收 ...
- Oracle性能优化之Oracle里的统计信息
一.什么是统计信息 oracle数据库里的统计信息是如下的一组数据:他们存储在数据字典里,且从多个维度描述了oracle数据库数据对象的详细信息. oracle数据库里的统计信息主要分为以下6种情况: ...
随机推荐
- 杭电acm 1076题
水题,一个求闰年的题目,复习一下闰年的求法.... 1,如果能被4整除但不能被100整除的是闰年 2,能被400整除的是闰年 题目大意是:给定一个开始年份T以及一个正数N,要求求出从T开始,到了哪一年 ...
- Effective Objective-C [下]
http://esoftmobile.com/2013/08/17/effective-objective-c-2/ Chapter 6: Blocks and Grand Central Dispa ...
- loj10098 分离的路径
传送门 分析 此题要先用tarjan求点双联通分量,注意在求解是要注意一条无向边只能走一次.求完之后我们发现原来的图会变成一棵树,对于 这棵树我们发现答案是(叶子节点数量+1)/2,实际便是每两个节点 ...
- Java流机制详解
转自http://blog.csdn.net/qq_16558621/article/details/51377887 http://www.cr173.com/html/18666_1.html
- [译]内联Javascript vs 外置Javascript
本文翻译youtube上的up主kudvenkat的javascript tutorial播放单 源地址在此: https://www.youtube.com/watch?v=PMsVM7rjupU& ...
- 阿里云ECS centos7.2 支持IPv6
公司的项目因为服务器没有支持IPv6而被appstore给退回来了 第一部分 第一步:编辑 /etc/sysctl.conf 文件,将其中三条禁用IPv6的设置更改为: 第二步:使用命令启动启用IPv ...
- 动态变更Repeater控件HeaderTemplate列名
本博文,Insus.NET教你动态实现变更Repeater控件HeaderTemplate列名.一般情况之下,是不需要动态变更,只有动态有Repeater控件不变情况之下,来显示多种数据源进行绑定.这 ...
- Flink学习笔记-支持的数据类型
说明:本文为<Flink大数据项目实战>学习笔记,想通过视频系统学习Flink这个最火爆的大数据计算框架的同学,推荐学习课程: Flink大数据项目实战:http://t.cn/EJtKh ...
- U19464 山村游历(Wander) LCT维护子树大小
\(\color{#0066ff}{ 题目描述 }\) 在一个偏远的小镇上,有一些落后的山村.山村之间通过一些道路来连接.当然有的山村可能不连通. 一年当中会发生很多大事,比如说有人提议要在山村\(i ...
- windows安装redis并设置别名
最近两天不知什么原因导致win10的redis 无法通过 双击 redis-server.exe 文件启动 redis服务:于是从新安装并且 通过命令行启动服务,并且设置别名,每次方便启动服务 1.下 ...