Guidance:
Part 1: The following steps fully demonstrate the job creation process:
Part 2: job-related knowledge:
Part 3: Practical Application
We found that the job owner must be used to delete jobs, and sys cannot delete other jobs! (First understand this, and then correct it later. Hey hey ·)
Body:
Part 1: The following steps fully demonstrate the
1. Call the PAGE method on a regular basis
------------------------------------
-- Purpose: refresh the page every few minutes
-- Note:
------------------------------------
Alter procedure [DBO]. [sendinfo]
As
Declare @ ADC int
Declare @ HR
hh24:m), interval from DBA _jobs where job in (325,295)2 Select Job,what,last_date,next_date,interval from Dba_jobs where job in (1,3);
Query the job's condition.Show Paramter background_dump_dest.Look at Alter.log and trace.
How would I stop a jobsql> exec Dbms_job.broken (1,true)
The PL/SQL process has completed su
".) Rebuild_job1 "', attribute => ' job_priority ', Value => 2);
Max_failures: The number of times the job failed to be allowed, ranging from 1 to 1000000, and null by default.
Sys.dbms_scheduler.set_attribute (name => ' SYS ".) Rebuild_job1 "', attribute => ' max_failures ', value => 5);
Job_weight: If you use parallel execution techniques, this parameter sets the degree of parallelism in the job to ex
(name => '"SYS". "REBUILD_JOB1"', attribute => 'job _ priority ', value => 2 );
Max_failures: number of job failures allowed. The value ranges from 1 to 1000000. The default value is null.
Sys. dbms_scheduler.set_attribute (name => '"SYS". "REBUILD_JOB1"', attribute => 'max _ failures ', value => 5 );
Job_weight: If parallel execution technology is used, this parameter can be used to set the degree of p
I don't know much about oracle. Today, a friend said that oracle creates a job. I thought it was a job. As a result, oracle creates a job, let me introduce how to create a job instance in oracle.
I. Simple Test of the job creation process case:1. Create a JOB_TEST table with
On the Linux bash shell single terminal interface, we often need to manage or complete multiple jobs at the same time, for example, execute compilation, implement data backup, and execute SQL queries and other tasks. All of the above work can be implemented in a bash, that is, in the same terminal window. The following describes how to switch and manage foreground and background jobs in Linux and how to manage jobs offline.
1. Definition of foreground
Management on the OS after 9i. You can use the following SQL statement to determine that several SNP/cjq instances are currently running.
Select * from V $ bgprocess. The SNP/cjq process that paddr is not empty is currently idle, and some are working processes.
The other is job_queue_interval, which ranges from 1 to 36 00 and is measured in seconds. This is the process of the wake-up job, because every
instance running a job in the following way: SQL> exec dbms_job.instance ). After testing, it is difficult to run the SQL statement. After the SQL statement is executed, the job is no longer running and a waiting event occurs: enq: TX-row lock contention. The executed
"task-dependent" trigger task execution, support event-based trigger task. The dispatch Center provides API services that trigger a single execution of tasks, which can be triggered flexibly according to business events.
second, Quick start
The project address is: Https://github.com/xuxueli/xxl-job
2.1 Initializing the Dispatch database
Please download the project source code and extract, get "Dispatch database initialization
Create a job demo for Oracle 1. first, enable the OracleJobSchedulerORCL server, which is mainly used to manage the timer of oracle tasks 2. then execute the following script in pl/SQL: (Note the command window instead of the SQL window)
Create or replace procedure DeleteDataForJob as hisDataTime number; beginhisDataTime: = 12; // delete data before January 1, De
I. Operating frequency settings for the job1. Daily fixed time operation, such as morning 8:10 minutes: Trunc (sysdate+1) + (8*60+10)/24*60Available in 2.Toad:Daily: Trunc (sysdate+1)Weekly: Trunc (sysdate+7)Per month: trunc (sysdate+30)Each Sunday: Next_day (trunc (sysdate), ' SUNDAY ')6 points per day: trunc (sysdate+1) +6/24Half an hour: sysdate+30/14403. Run the 15th minute of each hour, for example: 8:15,9:15,10:15...:trunc (sysdate, ' hh ') +75/1440. Originally I set is trunc (sysdate, ' h
Oracle job timed execution of stored procedures
One: simple test job Create a process case:1 , first create a job_test table, field is a Date FormatSql> CREATE TABLE Job_test (a date);Table createdSql> commit;Commit Complete2 , create a stored procedure BB the effect is toward pig inserting data into the tablesql> Create or replace procedure job_pro_
In the Linux bash shell single terminal interface for job switching and Offline Management in the front and back of Linux, we often need to manage or complete multiple jobs at the same time, such as performing compilation while implementing data backup, and other tasks such as SQL query. All of the above work can be implemented in a bash, that is, in the same terminal window. The following describes how to
The core elements of quartz.net task scheduling are scheduler, trigger and jobs, where trigger (which defines the elements of the scheduling time, what time rules are used to perform tasks), and the job is the metadata for task scheduling, scheduler is the controller that actually executes the schedule. There are two main types of jobs in Quartz.net: Stateless (stateless) and stateful (stateful). For the same trigger, a stateful
One: simple test job Create a process case:1 , first create a job_test table, field is a Date FormatSql> CREATE TABLE Job_test (a date);Table createdSql> commit;Commit Complete2 , create a stored procedure BB the effect is toward pig inserting data into the tablesql> Create or replace procedure job_pro_test as2 begin3 INSERT into job_test values (sysdate);4 End;5/Procedure created3 , create a job , the name
Total_time number The total time required for the task to run, in seconds
Broken VARCHAR2 (1) flag parameter, y indicates that the task is interrupted and will not run later
INTERVAL VARCHAR2 (200) An expression used to calculate the next run time
Failures number task runs continuously without success
WHAT VARCHAR2 (2000) Pl/sql block to perform a task
Current_session_labelraw MLSLABEL the trusted Oracle session character for this task
Clearance_hi R
One: The simple test job creation process case:1, first create a job_test table, the field is a date format
The code is as follows
Copy Code
Sql> CREATE TABLE Job_test (a date);Table createdSql> commit;Commit Complete
2, create a stored procedure BB action is to insert data into the Pig table
The code is as follows
Copy Code
Make sure each maintenance job has an output file in a standard
Directory.
In the Advanced tab under the job steps create an output file. This will
Allow you to see the full description of the job execution. There is
Nothing more annoying than not being able to see why a job failed.
How to set the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.