排程管理大總結
不管program、schedule、job_class、window、window group怎麼去定義,最後都是為job服務的,即這些東西功能都是DBMS_SCHEDULER.CREATE_JOB所用到的一部分
Program:對所要執行的任務的描述
DBMS_SCHEDULER.CREATE_PROGRAM (
program_name IN VARCHAR2,
program_type IN VARCHAR2,
program_action IN VARCHAR2,
number_of_arguments IN PLS_INTEGER DEFAULT 0,
enabled IN BOOLEAN DEFAULT FALSE,
comments IN VARCHAR2 DEFAULT NULL);
schedule:對執行任務時的時間資訊的描述,比如時候開始,間隔時間,結束時間
DBMS_SCHEDULER.CREATE_SCHEDULE (
schedule_name IN VARCHAR2,
start_date IN TIMESTAMP WITH TIMEZONE DEFAULT NULL,
repeat_interval IN VARCHAR2,
end_date IN TIMESTAMP WITH TIMEZONE DEFAULT NULL,
comments IN VARCHAR2 DEFAULT NULL);
job:把Program和schedule結合起來即任務(或job_class、window、window group結合起來)
Creates a job using a named schedule object and a named program object:
DBMS_SCHEDULER.CREATE_JOB (
job_name IN VARCHAR2,
program_name IN VARCHAR2,
schedule_name IN VARCHAR2,
job_class IN VARCHAR2 DEFAULT 'DEFAULT_JOB_CLASS',
enabled IN BOOLEAN DEFAULT FALSE,
auto_drop IN BOOLEAN DEFAULT TRUE,
comments IN VARCHAR2 DEFAULT NULL,
job_style IN VARCHAR2 DEFAULT 'REGULAR',
credential_name IN VARCHAR2 DEFAULT NULL,
destination_name IN VARCHAR2 DEFAULT NULL);
當然沒有program和schedule也可以建立job的,具體做法是
Creates a job in a single call without using an existing program or schedule:
DBMS_SCHEDULER.CREATE_JOB (
job_name IN VARCHAR2,
job_type IN VARCHAR2,
job_action IN VARCHAR2,
number_of_arguments IN PLS_INTEGER DEFAULT 0,
start_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
repeat_interval IN VARCHAR2 DEFAULT NULL,
end_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
job_class IN VARCHAR2 DEFAULT 'DEFAULT_JOB_CLASS',
enabled IN BOOLEAN DEFAULT FALSE,
auto_drop IN BOOLEAN DEFAULT TRUE,
comments IN VARCHAR2 DEFAULT NULL,
credential_name IN VARCHAR2 DEFAULT NULL,
destination_name IN VARCHAR2 DEFAULT NULL);
schedule_name:The name of the schedule, window, or window group associated with this
job.
auto_drop This flag, if TRUE, causes a job to be automatically dropped after it has
completed or has been automatically disabled. A job is considered
completed if:
■ Its end date (or the end date of the job schedule) has passed.
■ It has run max_runs number of times. max_runs must be set with SET_
ATTRIBUTE.
■ It is not a repeating job and has run once.
DBMS_SCHEDULER.SET_ATTRIBUTE (
name IN VARCHAR2,
attribute IN VARCHAR2,
value IN VARCHAR2,
value2 IN VARCHAR2 DEFAULT NULL);
attribute 之max_runs This attribute specifies the maximum number of consecutive scheduled
runs of the job. Once max_runs is reached, the job is disabled and its state
is changed to COMPLETED.
max_runs can be an integer between 1 and 1,000,000. By default, it is set to
NULL, which means that it repeats forever or until end_date or max_
failures is reached.
Job class:用來將若干個相關的任務關聯起來作為一個組,一般與某個資源使用者組或service關聯(資源使用者組和service只能關聯一個,不能同時關聯兩者)
DBMS_SCHEDULER.CREATE_JOB_CLASS (
job_class_name IN VARCHAR2,
resource_consumer_group IN VARCHAR2 DEFAULT NULL,
service IN VARCHAR2 DEFAULT NULL,
logging_level IN PLS_INTEGER DEFAULT DBMS_SCHEDULER.LOGGING_RUNS,
log_history IN PLS_INTEGER DEFAULT NULL,
comments IN VARCHAR2 DEFAULT NULL);
Window:表示一個時間段,比如早上8點到下午6點可以為一個window,window可以與某個計劃關聯也可以與某個schedule關聯(兩者可同時關聯),其實作用就是一個schedule
Creates a window using a named schedule object:
DBMS_SCHEDULER.CREATE_WINDOW (
window_name IN VARCHAR2,
resource_plan IN VARCHAR2,
schedule_name IN VARCHAR2,
duration IN INTERVAL DAY TO SECOND,
window_priority IN VARCHAR2 DEFAULT 'LOW',
comments IN VARCHAR2 DEFAULT NULL);
Creates a window using an inlined schedule:
DBMS_SCHEDULER.CREATE_WINDOW (
window_name IN VARCHAR2,
resource_plan IN VARCHAR2,
start_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
repeat_interval IN VARCHAR2,
end_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
duration IN INTERVAL DAY TO SECOND,
window_priority IN VARCHAR2 DEFAULT 'LOW',
comments IN VARCHAR2 DEFAULT NULL);
Window group:把若干個相關的window關聯起來,作為一個組,其實作用就是一個schedule
DBMS_SCHEDULER.CREATE_WINDOW_GROUP (
group_name IN VARCHAR2,
window_list IN VARCHAR2 DEFAULT NULL,
comments IN VARCHAR2 DEFAULT NULL);
group_name就是windows group的名稱,window_list就是window的名稱,多個window則用逗號隔開
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-1869832/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 任務排程的思考和總結
- 排程器Quartz的簡述與使用總結quartz
- Flink排程之排程器、排程策略、排程模式模式
- PHP課程總結PHP
- UFLDL:史丹佛大學深度學習課程總結深度學習
- 大資料排程元件之Apache DolphinScheduler大資料元件Apache
- libgo原始碼分析之多執行緒協程管理和排程Go原始碼執行緒
- 開源公開課丨大資料排程系統 Taier 任務排程介紹大資料AI
- kubernetes 排程
- Go runtime 排程器精講(五):排程策略Go
- Spark中資源排程和任務排程Spark
- 排程器簡介,以及Linux的排程策略Linux
- Go語言排程器之主動排程(20)Go
- Go排程器系列(3)圖解排程原理Go圖解
- iOS Swift結構體與類的方法排程iOSSwift結構體
- 大咖說·圖書分享|深入叢集:大型資料中心資源排程與管理
- Go runtime 排程器精講(十一):總覽全域性Go
- 告別手動排程,海豚排程器 3.1.x 叢集部署讓你輕鬆管理多機!
- 10.22 課程內容總結
- 課程階段性總結
- python 協程用法總結(一)Python
- 專案管理軟體排程的優勢有哪些?專案管理
- Pod的排程是由排程器(kube-scheduler)
- async-await:協作排程 vs 搶佔排程AI
- Go語言排程器之排程main goroutine(14)GoAI
- Go排程器系列(2)巨集觀看排程器Go
- 資料排程
- Laravel Scheme排程LaravelScheme
- 雲排程概述
- Kubernetes 排程器
- 任務排程
- linux程式排程Linux
- 分散式任務排程系統設計小結分散式
- Celery非同步排程框架(二)與Django結合使用非同步框架Django
- 今天,總監說要一個任務排程的列表。
- Linux 系統管理總結Linux
- Spring事務管理總結Spring
- 【Vue專案總結】後臺管理專案總結Vue
- k8s排程器介紹(排程框架版本)K8S框架