Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle 10g schedule jobµÄ³£ÓòÙ×÷

OracleÊý¾Ý¿â10g schedule jobµÄ³£ÓòÙ×÷:
-- job ȨÏÞ
grant create job to somebody;
-- job ´´½¨
begin
dbms_scheduler.create_job (
job_name => 'AGENT_LIQUIDATION_JOB',
job_type => 'STORED_PROCEDURE',
job_action => 'AGENT_LIQUIDATION.LIQUIDATION', --´æ´¢¹ý³ÌÃû
start_date => sysdate,
repeat_interval => 'FREQ=MONTHLY; INTERVAL=1; BYMONTHDAY=1;BYHOUR=1;BYMINUTE=0;BYSECOND=0', -- °´Ô£¬¼ä¸ôΪ1¸ö(ÔÂ),ÿÔÂ1ºÅ,Á賿1µã
comments => 'Ö´ÐдúÀíÉÌÇå·Ö³ÌÐò'
);
end;
/
-- job Ö´ÐÐʱ¼ä²âÊÔ
DECLARE
start_date date;
return_date_after date;
next_run_date date;
BEGIN
start_date := sysdate;--to_timestamp_tz('10-OCT-2004 10:00:00','DD-MM-YYYY HH24:MI:SS');
return_date_after := start_date;
FOR i IN 1..10 LOOP
DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING('FREQ=MONTHLY; INTERVAL=1; BYMONTHDAY=1;BYHOUR=1;BYMINUTE=0;BYSECOND=0',start_date, return_date_after, next_run_date);
DBMS_OUTPUT.PUT_LINE('next_run_date: ' || to_char(next_run_date,'yyyy-mm-dd HH24:MI:SS'));
return_date_after := next_run_date;
END LOOP;
END;
/
-- job ²éѯ
select owner, job_name, state from dba_scheduler_jobs;
select job_name, state from user_scheduler_jobs;
-- job ÆôÓÃ
begin
dbms_scheduler.enable('BACKUP_JOB');
end;
/
-- job ÔËÐÐ
begin
dbms_scheduler.run_job('COLA_JOB',TRUE); -- true´ú±íͬ²½Ö´ÐÐ
end;
/
-- job Í£Ö¹(²»Ì«ºÃÓÃ)
begin
dbms_scheduler.stop_job(job_name => 'COLA_JOB',force => TRUE);
end;
/
-- job ɾ³ý(¶ÔÍ£jobÀ´ËµºÃÓÃ)
begin
dbms_scheduler.drop_job(job_name => 'COLA_JOB',force => TRUE);)
end;
/


Ïà¹ØÎĵµ£º

sql serverºÍoracleÐÐתÁеÄÒ»ÖÖµäÐÍ·½·¨

sql serverºÍoracleÐÐתÁеÄÒ»ÖÖµäÐÍ·½·¨
ǰÑÔ£ºÍøÉÏÓв»ÉÙÎÄÕÂÊǽ²ÐÐתÁе쬵«ÊǴ󲿷ֶ¼ÊÇÖ±½ÓÌù´úÂ룬ºöÊÓÁËÖмä¹ý³Ì£¬±¾ÈË×Ô¼ºË¼¿¼ÁËÏÂΪʲôҪÕâÑùʵÏÖ£¬²¢ÇÒ×öÁËÈçϵıʼǣ¬¶ÔÓÐЩ¶®µÄÈËÀ´Ëµ¿ÉÄÜûÓмÛÖµ£¬Ï£Íû¶Ô»¹²»¶®µÄÈËÓÐÒ»µã½è¼øÒâÒå¡£
¶ÔÓÚÓÐЩҵÎñÀ´Ëµ£¬Êý¾ÝÔÚ±íÖеĴ洢ºÍÆä×îÖÕµÄGrid±íÏÖÇ¡ºÃÏ൱ÓÚ°ÑÔ ......

Oracle Finalizes Acquisition of Sun


We are pleased to announce that Oracle has completed its acquisition of Sun Microsystems and Sun is now a wholly owned subsidiary of Oracle. With this news, we want to reiterate our commitment to deliver complete, open and integrated systems that help our customers improve the performance, reliabi ......

µÇ¼oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí

¼oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí
1¡¢su – oracle ²»ÊDZØÐ裬ÊʺÏÓÚûÓÐDBAÃÜÂëʱʹÓ㬿ÉÒÔ²»ÓÃÃÜÂëÀ´½øÈësqlplus½çÃæ¡£
2¡¢sqlplus /nolog »òsqlplus system/manager »ò./sqlplus system/manager@ora9i;
3¡¢SQL>connect / as sysdba ;£¨as sysoper£©»ò
connect internal/oracle AS SYSDBA ;(scott/tiger) ......

Ò»µãOracle±Ê¼Ç

Oracle
1£¬shutdownÖ®ºó£¬ÈçºÎÆô¶¯Êý¾Ý¿âʵÀý£¿
ͨ¹ýCMDÃüÁî·û sqlplus "sys/password as
sysdba"£¬»áÁ¬µ½Ò»¸ö¿ÕÏÐʵÀý£¬ÕâÑù¿ÉÔÙÓÃstartupÃüÁî¡£
2£¬×°ÁËÊý¾Ý¿âÖ®ºó£¬ÓÃÁËshutdown£¬ºóÓÃÁËstartupµÈÆô¶¯Ö®ºó£¬¿ÉÓÃsql
plusºÍÍøÒ³·½Ê½Á¬oracle¡£µ«ÓÃjdbcÁ¬½Ó³ö´í£¿
ÊǼàÌýÆ÷ûÆô¶¯£ºD:\oracle\product\10.1.0\Db_1\ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ