Tag: interval

dba_jobs and interval

Few examples of some scenarios of setting intervals for dba_jobs. Note: Updating the interval will not update the NEXT_DATE run of the job until the job runs. Setting a job to run every monday at 10:00 am SQL> exec dbms_job.interval(5, 'TRUNC(NEXT_DAY(SYSDATE, ''MONDAY''))+(10/24)'); SQL> commit; -- assume job was run and this SQL was run after … Continue reading dba_jobs and interval

Using sys.dbms_iob one can manage jobs in dba_jobs.

DBMS_JOB allows one to create/manage jobs under user who has logged but using sys.dbms_ijob one can manage jobs all jobs scheduled in DBA_JOBS. Here are some of the functions available in sys.dbms_ijob. To execute/run job: You don't have to be an owner of the job SQL> exec sys.dbms_ijob.run(5); If one tried executing the job not … Continue reading Using sys.dbms_iob one can manage jobs in dba_jobs.

How to change AWR retention, interval, topnsql?

Using dbms_workload_repository.modify_snapshot_settings, one can modify retention, interval, and topnsql. 1- Get the dbid which is needed to passs to dbms_workload_repository.modify_snapshot_settings SQL> select dbid from v$database; DBID ---------- 1992878807 2- Set retention, interval and top sql: retention=>value in minutes so (45 days * 24 (hours per day) * 60 minutes per hour = 64800), max value … Continue reading How to change AWR retention, interval, topnsql?

How to find AWR snapshot interval and retention settings?

Using this SQL one can find the snapshot interval and snapshot retention. SQL> SELECT extract(day from snap_interval) *24*60+extract(hour from snap_interval) *60+extract(minute from snap_interval) snapshot_Interval, extract(day from retention) *24*60+extract(hour from retention) *60+extract(minute from retention) retention_Interval FROM dba_hist_wr_control; Snapshot_Interval Retention_Interval ----------------- ------------------ 60 10080 How to change AWR snapshot interval and/or retention