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

oracle JOB

ÿÌì1µãÖ´ÐеÄoracle JOBÑùÀý
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X,
what => 'ETL_RUN_D_Date;',
next_date => to_date('2009-08-26 01:00:00','yyyy-mm-dd hh24:mi:ss'),
interval => 'trunc(sysdate)+1+1/24',
no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/
ÒÔÉÏÊÇÃ÷È·Ö¸¶¨Ã¿ÌìµÄ1µãÖ´ÐдËjob,Èç¹ûÖ¸¶¨ÊÇÿÌìÖÐÎç12µãÖ´ÐÐintervalÐèÒªÖ¸¶¨Îª'trunc(sysdate)+1+12/24',Èç¹û½ö½öÖ¸¶¨intervalΪһÌì,ÕâÑùµ±ÄãÊÖ¹¤ÓÃdbms_job.run(job)È¥ÔËÐÐÒ»´Îʱ,jobÿÌìµÄÖ´ÐÐʱ¼äÊÇ»á¸Ä±äµÄ,Èç¹ûÄãÏëjobÿÌìÔڹ̶¨Ê±¼äÖ´ÐÐ,¿ÉÒԲο¼ÉÏÃæµÄÀý×Ó.
³õʼ»¯Ïà¹Ø²ÎÊýjob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//×î´óÖµ²»Äܳ¬¹ý1000 ;job_queue_interval = 10 //µ÷¶È×÷ҵˢÐÂƵÂÊÃëΪµ¥Î»
job_queue_process ±íʾoracleÄܹ»²¢·¢µÄjobµÄÊýÁ¿£¬¿ÉÒÔͨ¹ýÓï¾ä¡¡¡¡
show parameter job_queue_process;
À´²é¿´oracleÖÐjob_queue_processµÄÖµ¡£µ±job_queue_processֵΪ0ʱ±íʾȫ²¿Í£Ö¹oracleµÄjob£¬¿ÉÒÔͨ¹ýÓï¾ä
ALTER SYSTEM SET job_queue_processes = 10;
À´µ÷ÕûÆô¶¯oracleµÄjob¡£
Ïà¹ØÊÓͼ£º
dba_jobs
all_jobs
user_jobs
dba_jobs_running °üº¬ÕýÔÚÔËÐÐjobÏà¹ØÐÅÏ¢
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
Ìá½»jobÓï·¨£º
begin
sys.dbms_job.submit(job => :job,
what => 'P_CLEAR_PACKBAL;',
next_date => to_date('04-08-2008 05:44:09', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'sysdate+ 1/360');
commit;
end;
/
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
´´½¨JOB
variable jobno number;
begin
dbms_job.submit(:jobno, 'P_CRED_PLAN;',SYSDATE,'SYSDATE+1/2880',TRUE);
commit;
ÔËÐÐJOB
SQL> begin
dbms_job.run(:job1);
end;
/
ɾ³ýJOB
SQL> begin
dbms_job.remove(:job1);
end;
/
DBA_JOBS
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
×ֶΣ¨ÁУ© ÀàÐÍ ÃèÊö
JOB NUMBER ÈÎÎñµÄΨһ±êʾºÅ
LOG_USER VARCHAR2(30) Ìá½»ÈÎÎñµÄÓû§
PRIV_USER VARCHAR2(30) ¸³ÓèÈÎÎñȨÏÞµÄÓû§
SCHEMA_USER VARCHAR2(30) ¶ÔÈÎÎñ×÷Óï·¨·ÖÎöµÄÓû§Ä£Ê½
LAST_DATE DATE ×îºóÒ»´Î³É¹¦ÔËÐÐÈÎÎñµÄʱ¼ä
LAST


Ïà¹ØÎĵµ£º

Oracle³õ²½½Ó´¥Ê±Óöµ½µÄÎÊÌâ¼°½â¾ö°ì·¨

½ñÌìÔÚ»úÆ÷ÉÏ×°Oracle 10g£¬°²×°Íê³ÉÒÔºó³öÏÖ´íÎóÌáʾ¡°ORA-00988: ¿ÚÁîȱʧ»òÎÞЧ¡±£¬È»ºó¾ÍÎÞ·¨½øÈë¿ØÖÆ̨½øÐÐÏàÓ¦µÄ²Ù×÷ºÍ¹ÜÀí£¬ÎÒÒÔÇ°ÔÚ°²×°Oracle 9ʱ²¢Ã»ÓгöÏÖ¹ý
Õâ¸ö´íÎó¡£È»ºóжÔغóÖØа²×°£¬ÎÊÌâÒÀ¾É£¬ÕÛÌÚÁ˺ôóÒ»ÕóÖÕÓÚŪÃ÷°×ÊÇÔõôһ»ØÊÂÁË¡£
ÕâÖÖÇé¿öͨ³£·¢ÉúÓÚ´´½¨ Oracle Àý³Ìʱָ¶¨ÁË·ÇÕý³£µÄÈ«¾ÖÊý¾Ý¿ ......

Oracle spool Ó÷¨Ð¡½á

ת×Ô£ºhttp://wallimn.javaeye.com/blog/472182
¶ÔÓÚSPOOL
Êý¾ÝµÄSQL£¬×îºÃÒª×Ô¼º¶¨Òå¸ñʽ£¬ÒÔ·½±ã³ÌÐòÖ±½Óµ¼Èë,SQLÓï¾ä
È磺
select
taskindex||'|'||commonindex||'|'||tasktype||'|'||to_number(to_char(sysdate,'YYYYMMDD'))
from ssrv_sendsms_task;
spool
³£ÓõÄÉèÖÃ
set colsep' ';¡¡¡¡¡¡ //ÓòÊä³ö·Ö¸ô·û ......

Oracle blobÀàÐÍ Êµ¼ù

BLOBµÄº¬Òå¡¡¡¡
      BLOB (binary large object)£¬¶þ½øÖÆ´ó¶ÔÏó£¬ÊÇÒ»¸ö¿ÉÒÔ´æ´¢¶þ½øÖÆÎļþµÄÈÝÆ÷¡£
¡¡¡¡ÔÚ¼ÆËã»úÖУ¬BLOB³£³£ÊÇÊý¾Ý¿âÖÐÓÃÀ´´æ´¢¶þ½øÖÆÎļþµÄ×Ö¶ÎÀàÐÍ¡£
¡¡¡¡BLOBÊÇÒ»¸ö´óÎļþ£¬µäÐ͵ÄBLOBÊÇÒ»ÕÅͼƬ»òÒ»¸öÉùÒôÎļþ£¬ÓÉÓÚËüÃǵijߴ磬±ØÐëʹÓÃÌØÊâµÄ·½Ê½À´´¦Àí£¨ÀýÈ磺ÉÏ´«¡ ......

²»°²×°Oracle¿Í»§¶ËÁ¬½ÓOracle

Ô­À´Á¬½ÓORACLE×ÜÊÇҪװORACLE¿Í»§¶Ë£¬Í¦Âé·³µÄ£¬Ò»·½ÃæÒª´øORACLEµÃÅÌ£¬ÁíÒ»·½Ã棬װÕâô´óµÃ¶«Î÷Ò²ÈÃÈ˺ܲ»Ë¬¡£Oracle´Ó10g¿ªÊ¼Ð³öÁËÒ»¸öInstant Client£¬ÊÇÕë¶ÔWINDOWSƽ̨µÄ£¬²»Óð²×°¿Í»§¶Ë¾Í¿ÉÒÔÁ¬½ÓOracleÊý¾Ý¿â¡£Instant ClientÊÇÒ»¸ö½ÏΪÇáÁ¿¼¶µÄ¿Í»§°ü£¬Êµ¼ÊÊÇÒ»¸özipÎļþ£¬40¶àM£¬²»ÐèÒª°²×°£¬Ö±½Ó½âѹËõ£¬¿ÉÒÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ