Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Using DBMS_STAT function closes mission     - PostgreSQL Source Customization: Online global read only (Database)

- The specified user to execute commands under Linux (Linux)

- How to configure a development environment elegant Lua (Linux)

- Ubuntu Tutorial: E: Failed to get lock / var / lib / apt / lists / lock - open (Linux)

- Use Git in Eclipse (Linux)

- Use OpenSSL to generate a certificate detailed process (Linux)

- CentOS7 method to upgrade the kernel to 3.18 (Linux)

- Use lsof restore accidentally deleted log files or database (Linux)

- KVM QEMU virtual machine installation configuration under CentOS (Linux)

- Build ftp server under CentOS 6.5 (Server)

- Linux system started to learn: how to solve the xxx is not in the sudoers file error (Linux)

- CentOS yum source as the default setting methods in DVD (Linux)

- Fedora 23 How to install LAMP server (Server)

- Easy to install Ubuntu 15.04 and Ubuntu 15.04 GNOME on Wayland trial (Linux)

- wget command Walkthrough (Linux)

- Ubuntu 14.04 install Nmap 6.46.1 (Linux)

- Oracle Data Guard LOG_ARCHIVE_DEST_n optional attribute parameters (Database)

- Java executable file to read information from a database copy (Programming)

- Scala REPL Shell call (Programming)

- Dialogue UNIX:! $ # @ *% (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:      
 
- HTTP Client Hints Introduction (Server)
- Summary Linux operating system some tips to prevent attacks (Linux)
- Linux server alarms using Java (Server)
- Add your own kernel and ramfs based on an existing Linux LiveCD (Linux)
- C ++ hash function (Programming)
- Oracle 12c users create (Database)
- Linux Network Programming --IP packet format Detailed (Programming)
- Docker: Mirroring and container operations (Server)
- Ubuntu 14.04 configure JDK1.8.0_25, switchable version (Linux)
- Linux host dual LAN transceiver package ARP problem (Linux)
- Some security configuration of Linux systems (Linux)
- Integrated security administrator Linux accident management (Linux)
- PCM audio under Linux (Linux)
- Secondary exponential smoothing prediction method implemented in Python (Programming)
- Linux, MySQL / MariaDB Galera Cluster Setup Process (Database)
- Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)
- Ubuntu rights management common commands (Linux)
- Linux security concerns again (Linux)
- W and uptime command (Linux)
- Mac Docker deploy development environment (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.