Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Using DBMS_STAT function closes mission     - Linux firewall iptables beginner tutorial (Linux)

- How do I delete a NEEDS RECOVERY rollback state of undo tablespace (Database)

- SSH mutual trust configuration (Server)

- Use MD5 transform algorithm to prevent exhaustive decipher passwords (Linux)

- Oracle common internal event tracking number (Database)

- Linux hybrid character device (Linux)

- Hadoop + Zookeeper NameNode achieve high availability (Server)

- Hard disk encryption to protect data security (Linux)

- Linux keyboard recording script (Linux)

- Linux Monitoring Command (Linux)

- Docker installation under CentOS7 (Linux)

- Linux system monitoring, top command of the diagnostic tool Detailed (Linux)

- Linux performance optimization tools perf top (Linux)

- socket busy poll of Linux kernel 3.11 to avoid sleep switch (Linux)

- Understanding Linux firewall Iptables (Linux)

- Git Advanced Tutorial (Linux)

- Spring AOP for logging (Programming)

- OpenGL Programming Guide (8th edition of the original book) - compute shader (Programming)

- MySQL 5.6 master-slave replication configuration (Database)

- SME Linux network security policy server security (Linux)

 
         
  Using DBMS_STAT function closes mission
     
  Add Date : 2018-11-21      
         
       
         
  View over the following statement to read physically larger SQL statement

select executions,
      disk_reads,
      buffer_gets,
      round ((buffer_gets - disk_reads) / buffer_gets, 2) Hit_radio,
      round (disk_reads / executions, 2) reads_per_run,
      sql_text,
      sql_id,
      last_load_time
  From v $ sqlarea
 Where executions> 0
  and buffer_gets> 0
  and (buffer_gets - disk_reads) / buffer_gets < 0.8
  and last_load_time> to_date ( '2015-04-19', 'yyyy / mm / dd')
 Order by 4 desc;

Just to see the statements disk read is very high and the number of executions will be more.

call dbms_stats.gather_database_stats_job_proc ()

GATHER_DATABASE_STATS_JOB_PROC internal stored procedure is basically the same as with DBMS_STATS.GATHER_DATABASE_STATS features, but there are priorities of internal considerations, the more updated the priority list will collect statistical information.
Because of the work consumes a larger plan to close, here you need to use DBMS_SCHDULER built-in functions, built-in functions are the following procedure calls
......
CREATE_PROGRAM
DROP_PROGRAM
CREATE_JOB
CREATE_SCHEDULE
DROP_SCHEDULE
DISABLE
ENABLE
......

And here we need to use the following statement to close the specified task
EXEC DBMS_SCHEDULER.DISABLE ( 'GATHER_STATS_JOB');

DISABLE (NAME, FORCE, COMMIT_SEMANTICS) that are listed in the task name, whether to force, if submitted, the latter two default Y
ENBABLE (NAME, COMMIT_SEMANTICS) same
Task Scheduler can be created in the following ways
123 DBMS_SCHDULER.CREATE_JOB ( 'job_name', 'job_type', 'job_action', 'number_of_arguments',
'Start_date', 'repeat_interval', 'end_date', 'job_class', 'enabled', 'auto_drop',
'Comments', 'credential_name', 'destination_name')

Column such as:
BEGIN
DBMS_SCHEDULER.CREATE_JOB
(
JOB_NAME => 'ARC_MOVE',
SCHEDULE_NAME => 'EVERY_60_MINS',
JOB_TYPE => 'EXECUTABLE',
JOB_ACTION => '/U01/SCRIPTS/MOVE_ARCS.SH',
ENABLED => TRUE,
COMMENTS => 'MOVE ARCHIVED LOGS TO A DIFFERENT DIRECTORY'
);
END;

It may also be
DBMS_SCHDULER.CREATE_SCHEDULE (SCHEDULE_NAME, START_DATE, REPEAT_INTERVAL, END_DATE, COMMENTS)

Column such as:
BEGIN
  DBMS_SCHEDULER.CREATE_SCHEDULE
  (
  REPEAT_INTERVAL => 'FREQ = MINUTELY; INTERVAL = 1',
  START_DATE => SYSDATE,
  COMMENTS => 'rosanu_create_job',
  SCHEDULE_NAME => 'SCHEDULE_ROSANU'
  );
END;

Wherein repeat_interval worth noting here is to provide a scheduled task execution time interval.
FREQ keyword indicates frequency, optional parameters are:
YEARLY (years),
MONTHLY (month),
WEEKLY (weeks)
DAILY (day),
HOURLY (time),
MINUTELY (points),
SECONDLY (s)

INTERVAL keyword indicates that the frequency range of 1 to 999. Hereinafter referred to as run once every 10 days:
REPEAT_INTERVAL => 'FREQ = DAILY; INTERVAL = 10';

BYDAY keyword table specific day time, perform the following represents five per week
REPEAT_INTERVAL => 'FREQ = DAILY; BYDAY = FRI';

BYMONTHDAY keyword table the first few days of the month following the last day of each month showing
REPEAT_INTERVAL => 'FREQ = MONTHLY; BYMONTHDAY = -1';

BYMONTH keyword represents a specific month
REPEAT_INTERVAL => 'FREQ = YEARLY; BYMONTH = MAR; BYMONTHDAY = 10';

BYDATE keyword to specify the number of days by value
REPEAT_INTERVAL => 'FREQ = YEARLY; BYDATE = 0310';

BYHOUR keyword indicates hours
REPEAT_INTERVAL => 'FREQ = DAILY; BYHOUR = 16,17,18';

You can also specify the way through

REPEAT_INTERVAL => 'trunc (sysdate) +1'
On the database by the following statement to view the current all tasks
SELECT OWNER,
      JOB_NAME,
      JOB_ACTION,
      REPEAT_INTERVAL,
      LAST_START_DATE,
      COMMENTS
  FROM ALL_SCHEDULER_JOBS

In addition there DBA_SCHEDULER_JOBS and USER_SCHEDULER_JOBS, USER table does OWNER field.
     
         
       
         
  More:      
 
- Linux rename command usage in learning to modify the file name (Linux)
- PostgreSQL transaction model introduction (Database)
- Oracle PL / SQL selective basis (IF CASE), (LOOP WHILE FOR) (Database)
- About Nginx 7 (Server)
- shell-like program (Programming)
- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)
- Between the two to achieve the main MySQL database synchronization from (Database)
- Linux server security - the web server configuration (Linux)
- Nginx high concurrency optimization ideas (Server)
- Parts of the partition is not recognized after Debian mount mobile hard disk (Linux)
- How to install Unbound and DNSCrypt in Archlinux (Server)
- Fedora network set up simple (Linux)
- Turning off the interface eth0: error: Disconnect the device 'eth0' (Linux)
- Oracle ORA-01089 failure analysis (Database)
- How to create an alternative Android / iOS connected wireless hotspot AP in Ubuntu 15.04 (Linux)
- How to use Linux iptables tool for network sharing (Linux)
- Linux redirection and piping (Linux)
- configuration ssh without password under Linux (Linux)
- Analysis of common mistakes when compiling MySQL installation (Database)
- RabbitMQ installation, configuration, monitoring (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.