The timer ORACLE JOB

2011-02-11  来源:本站原创  分类:Database  人气:74 

A recent use of a telecommunications project JOB, write this summary for future needs.

Create a stored procedure and execute JOB, the following code:

CREATE OR REPLACE PROCEDURE P_TEST_JOB
IS
-- Determine whether the task has been created, if a task is created , The  isExist > 0
isExist NUMBER := 0;
-- Archiving task ID
jobId NUMBER;
BEGIN
    SELECT COUNT(*) INTO isExist FROM ALL_JOBS J WHERE J.WHAT = ' Procedure name ;';
    -- Check whether the task has been created, if you have been created , You do not do action
    IF isExist = 0 THEN
        -- Created task
        DBMS_JOB.submit(jobId,                -- Task ID
                        ' Procedure name ;',             -- Task to execute a stored procedure, after the semicolon is not available
                        SYSDATE,              -- Job start time
                        'SYSDATE + 10/1440'); -- Task implementation cycle, in this case, each 10 Minutes to perform a
        COMMIT;
        -- To run the task
        DBMS_JOB.run(jobId);
        COMMIT;
    END IF;
END;

Execute this stored procedure in ORACLE to run the JOB list will appear in the new JOB, you can use

SELECT * FROM ALL_JOBS J WHERE J.WHAT = ' Procedure name ;'

JOB you just created to see the implementation.

相关文章
  • The timer ORACLE JOB 2011-02-11

    A recent use of a telecommunications project JOB, write this summary for future needs. Create a stored procedure and execute JOB, the following code: CREATE OR REPLACE PROCEDURE P_TEST_JOB IS -- Determine whether the task has been created, if a task

  • Oracle timer (Job) written summary of all time 2010-12-07

    Author: Park, a hui original blog: Links for the DBA, the database Job familiar, because often the automatic timer to perform some database scripts, or do a database backup, or do the data extraction, or do optimize database performance , including t

  • Oracle timer (Job) written summary of the time 2010-12-07

    Original author: Park, a hui original blog: Link For the DBA, Database Job familiar, because often timed to automatically perform some database scripts, or do a database backup, or do the data extraction, or do to optimize database performance , incl

  • Book: Oracle 11g database master timer 2011-09-18

    Oracle 11g database master timer

  • oracle simple timer operation 2010-09-05

    First create a test table: create table JOBTEST ( ID VARCHAR2(50) primary key, NAME VARCHAR2(20), AGE NUMBER(3) ) Then written timer to call the stored procedure: create or replace procedure myprocedure is begin insert into jobtest values(to_char(sys

  • Oracle automatically in the background to achieve the timing operation (timer) 2010-11-11

    1. Oracle promised to ensure that the operating mode control device starts the job queue: Oracle regularly perform "Job Queue" in the background process is the process of SNP, while the SNP want to start the process, we must first ensure that th

  • oracle stored procedure call timer 2011-07-01

    Introduction orcale simple use of timers, I hope you can understand a look 1 Create a table, in order to clearly see the operation of the timer we create a table with a date field create table job_table(run_time date); (2) create a stored procedure c

  • oracle backup batch file timer 2010-03-31

    Batch file @ Echo off set filename =% DATE: ~ 4,4%% DATE: ~ 9,2%% DATE: ~ 12,2% set filedir = d: \ echo% filename% exp sdfxw/123456 @ oracledb File =% filedir%% filename%. dmp full = y for / f "skip = 7"%% i in ('dir d: \ *. dmp / tc / od / b')

  • Oracle ASM process of ASMB 2010-03-04

    In the ASM alert log to see if a Quote Fri Mar 5 00:03:10 2010 Starting background process ASMB ASMB started with pid = 13, OS Fri Mar 5 00:06:19 2010 NOTE: ASMB process exiting due to lack of ASM file activity Thus a preliminary study about the role

  • Learning MySQL timer EVENT 2010-03-12

    Learning MySQL timer EVENT Support the event from start MySQL 5.1 features, similar to the oracle's job function. With this feature we can let MySQL after the implementation of automatic data collection and other functions, without ever need to suppo

  • Oracle bug of the new child listener process forked 2010-03-22

    The database client telephoned again hang phenomenon, so the deployment of oswatcher run in its host, oswatcher really good tool, highly recommended. Operating system platform Quote $ Uname-a HP-UX hpuxa B.11.23 U ia64 4101409079 unlimited-user licen

  • Oracle database will always be the case very high CPU utilization 2010-03-15

    Oracle database will always be the CPU utilization is high, this time mostly in the database there is a serious poor performance SQL statements SQL statement that consumed much of the CPU resources, resulting in lower overall system performance. Of c

  • Oracle Implementation time operation 2010-04-17

    Oracle database regularly often have to perform some automated script, or do a database backup, or do the data extraction, or do database performance optimization, including the work of rebuilding the index and so on, then need to use a function dbms

  • Oracle Implementation Timing operations 2010-04-17

    Oracle database regularly often have to perform some automated script, or do a database backup, or do the data extraction, or do database performance optimization, including the work of rebuilding the index and so on, then need to use a function dbms

  • Oracle enq: CF - contention cause data hang 2010-04-22

    Receiving customer calls, the database lost response, the database version of all business suspended Quote SQL> select * from v $ version where rownum = 1; BANNER -------------------------------------------------- -------------- Oracle Database 10g E

  • oracle database services Xiangjie 2010-04-29

    Reproduced the original source: http://student.csdn.net/space.php?uid=117956&do=blog&id=21344 Oracle and manually start the service Xiangjie control Note: SID - Database ID HOME_NAME - Oracle Home name, such as OraHome92, OraHome81 (1) OracleServi

  • oracle 11g installation diagram 2010-05-26

    Use the Advanced installation OUI starts after the "Select Installation" window, we choose: Advanced Installation Step 3: a "Select Installation Type" window, select the version that we need to install. Here we certainly choose Enterpr

  • Oracle's SQL statement Daquan (Abstract) 2010-05-27

    SQL statement - Go See the table space Database table space growth in all the inspection: SQL> SELECT A. TABLESPACE_NAME, (1 - (A. TOTAL) / B. TOTAL) * 100 USED_PERCENT FROM (SELECT TABLESPACE_NAME, SUM (BYTES) TOTAL FROM DBA_FREE_SPACE GROUP BY TABL

  • personal oracle note 2010-06-02

    - Break on pname skip 2; - for the same pname Category Display - Clear break variable p number; exec: p: = 1; pirnt t; selct * from t where - Select * from t where - Inline view: the "query" query select p.id, c1_sum1, c2_sum2 from p, (Select id

  • Oracle data dictionary used 2010-06-17

    Oracle data dictionary used The following table collected almost all the Oracle data dictionary views or aliases, as each view, or alias of the field, please use the 'Describe' statement to query. Name Description: Oracle data dictionary, the object