排程管理大總結
不管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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 工作總結--工單排程
- 任務排程的思考和總結
- spark排程管理Spark
- 排程器Quartz的簡述與使用總結quartz
- 作業系統常用的排程演算法總結作業系統演算法
- Flink排程之排程器、排程策略、排程模式模式
- 結對程式設計:電梯排程程式設計
- Net作業排程(二) -CrystalQuartz遠端管理quartz
- Linux核心排程分析(程式排程)Linux
- PHP課程總結PHP
- 開源公開課丨大資料排程系統 Taier 任務排程介紹大資料AI
- RAC管理總結
- Spark中資源排程和任務排程Spark
- 作業系統(5)處理器排程管理作業系統
- libgo原始碼分析之多執行緒協程管理和排程Go原始碼執行緒
- 大咖說·圖書分享|深入叢集:大型資料中心資源排程與管理
- Go語言排程器之主動排程(20)Go
- Go排程器系列(3)圖解排程原理Go圖解
- 大資料學習筆記(十五)-大資料排程框架大資料筆記框架
- iOS Swift結構體與類的方法排程iOSSwift結構體
- 告別手動排程,海豚排程器 3.1.x 叢集部署讓你輕鬆管理多機!
- 專案管理軟體排程的優勢有哪些?專案管理
- 排程器簡介,以及Linux的排程策略Linux
- Go排程器系列(2)巨集觀看排程器Go
- Go語言排程器之排程main goroutine(14)GoAI
- 【Spark篇】---Spark資源排程和任務排程Spark
- Go runtime 排程器精講(五):排程策略Go
- Pod的排程是由排程器(kube-scheduler)
- 插入、冒泡、歸併、堆排序、快排總結排序
- 【總結】二叉樹概念大總結二叉樹
- 任務排程
- 資料排程
- phpcms使用過程的總結PHP
- 《軟體工程》課程總結軟體工程
- 課程階段性總結
- css常用大總結CSS
- 大前端效能總結前端
- sql大賽總結SQL