ORACLE JOB »ã×Ü
Ò»¡£jobµÄÔËÐÐƵÂÊÉèÖÃ
1.ÿÌì¹Ì¶¨Ê±¼äÔËÐУ¬±ÈÈçÔçÉÏ8:10·ÖÖÓ£ºTrunc(Sysdate+1) + (8*60+10)/24*60
2.ToadÖÐÌṩµÄ£º
ÿÌ죺trunc(sysdate+1)
ÿÖÜ£ºtrunc(sysdate+7)
ÿÔ£ºtrunc(sysdate+30)
ÿ¸öÐÇÆÚÈÕ£ºnext_day(trunc(sysdate),'SUNDAY')
ÿÌì6µã£ºtrunc(sysdate+1)+6/24
°ë¸öСʱ£ºsysdate+30/1440
3.ÿ¸öСʱµÄµÚ15·ÖÖÓÔËÐУ¬±ÈÈ磺8:15£¬9:15£¬10:15...£ºtrunc(sysdate,'hh')+75/1440¡£ÔÏÈÎÒÉèÖõÄÊÇtrunc(sysdate,'hh')+15/1440£¬·¢ÏÖ¾ÓÈ»²»ÐС£
¶þ¡£JOBΪʲô²»ÔËÐУ¿
1.ÏÈÀ´Á˽âÒ»ÏÂJOBµÄ²ÎÊý˵Ã÷£ºÓëjobÏà¹ØµÄ²ÎÊýÒ»¸öÊÇjob_queue_processes£¬Õâ¸öÊÇÔËÐÐJOBʱºòËùÆðµÄ½ø³ÌÊý£¬µ±È»ÏµÍ³ÀïÃæJOB´óÓÚÕâ¸öÊýÖµºó£¬¾Í»áÓÐÅŶӵȺòµÄ£¬×îСֵÊÇ0£¬±íʾ²»ÔËÐÐJOB£¬×î´óÖµÊÇ36£¬ÔÚOSÉ϶ÔÓ¦µÄ½ø³ÌʱSNPn£¬9iÒÔºóOSÉϹÜÀíJOBµÄ½ø³Ì½ÐCJQn¡£¿ÉÒÔʹÓÃÏÂÃæÕâ¸öSQLÈ·¶¨Ä¿Ç°Óм¸¸öSNP/CJQÔÚÔËÐС£
select * from v$bgprocess£¬Õâ¸öpaddr²»Îª¿ÕµÄsnp/cjq½ø³Ì¾ÍÊÇÄ¿Ç°¿ÕÏеĽø³Ì£¬ÓеıíʾÕýÔÚ¹¤×÷µÄ½ø³Ì¡£
ÁíÍâÒ»¸öÊÇjob_queue_interval£¬·¶Î§ÔÚ1--3600Ö®¼ä£¬µ¥Î»ÊÇÃ룬Õâ¸öÊÇ»½ÐÑJOBµÄprocess£¬ÒòΪÿ´ÎsnpÔËÐÐÍêËû¾ÍÐÝÏ¢ÁË£¬ÐèÒª¶¨ÆÚ»½ÐÑËû£¬Õâ¸öÖµ²»ÄÜ̫С£¬Ì«Ð¡»áÓ°ÏìÊý¾Ý¿âµÄÐÔÄÜ¡£
2.Õï¶Ï£ºÏÈÈ·¶¨ÉÏÃæÕâÁ½¸ö²ÎÊýÉèÖÃÊÇ·ñÕýÈ·£¬ÌرðÊǵÚÒ»¸ö²ÎÊý£¬ÉèÖÃΪ0ÁË£¬ËùÓÐJOB¾Í²»»áÅÜ£¬È·ÈÏÎÞÎóºó£¬ÎÒÃǼÌÐøÏòÏ¡£
3.ʹÓÃÏÂÃæµÄSQL²ì¿´JOBµÄµÄbroken,last_dateºÍnext_date£¬last_dateÊÇÖ¸×î½üÒ»´ÎjobÔËÐгɹ¦µÄ½áÊøʱ¼ä£¬next_dateÊǸù¾ÝÉèÖõÄƵÂʼÆËãµÄÏ´ÎÖ´ÐÐʱ¼ä£¬¸ù¾ÝÕâ¸öÐÅÏ¢¾Í¿ÉÒÔÅжÏJOBÉÏ´ÎÊÇ·ñÕý³££¬»¹¿ÉÒÔÅжÏÏ´εÄʱ¼ä¶Ô²»¶Ô£¬SQLÈçÏ£º
select * from dba_jobs
ÓÐʱºòÎÒÃÇ·¢ÏÖËûµÄnext_dateÊÇ4000Äê1ÔÂ1ÈÕ£¬ËµÃ÷jobÒª²»¾ÍÊÇÔÚrunning£¬Òª²»¾ÍÊÇ״̬ÊÇbreak(broken=Y)£¬Èç¹û·¢ÏÖJOBµÄbrokenֵΪY£¬ÕÒÓû§Á˽âһϣ¬È·¶¨¸ÃJOBÊÇ·ñ¿ÉÒÔbroken£¬Èç¹û²»ÄÜbroken£¬ÄǾͰÑbrokenÖµÐ޸ijÉN£¬ÐÞ¸ÄÔÙʹÓÃÉÏÃæµÄSQL²ì¿´¾Í·¢ÏÖËûµÄlast_dateÒѾ±äÁË£¬JOB¼´¿ÉÕý³£ÔËÐУ¬ÐÞ¸Äbroken״̬µÄSQLÈçÏ£º
declare
BEGIN
DBMS_JOB.BROKEN(<JOB_ID>,FALSE);
END;
4.ʹÓÃÏÂÃæµÄSQL²éѯÊÇ·ñJOB»¹ÔÚRunning
select * from dba_jobs_running
Èç¹û·¢ÏÖJOBÒѾRunÁ˺ܾÃÁË»¹Ã»ÓнáÊø£¬¾ÍÒª²éÔÒòÁË¡£Ò»°ãµÄJOB runningʱ»áËø¶¨Ïà¹ØµÄÏà¹ØµÄ×ÊÔ´£¬¿ÉÒԲ鿴һÏÂv$accessºÍv$locked_objectÕâÁ½¸öview£¬Èç¹û·¢ÏÖÆäËû½ø³ÌËø¶¨ÁËÓëJ
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
Ê×ÏȸÐлÎÄÕµÄ×÷Õß,ÎÒתÀ´´ó¼Ò¹²Ïí
Oracle´Ó8.1.6¿ªÊ¼Ìṩ·ÖÎöº¯Êý£¬·ÖÎöº¯ÊýÓÃÓÚ¼ÆËã»ùÓÚ×éµÄijÖÖ¾ÛºÏÖµ£¬ËüºÍ¾ÛºÏº¯ÊýµÄ²»Í¬Ö®´¦ÊǶÔÓÚÿ¸ö×é·µ»Ø¶àÐУ¬¶ø¾ÛºÏº¯Êý¶ÔÓÚÿ¸ö×éÖ»·µ»ØÒ»ÐС£
ÏÂÃæÀý×ÓÖÐʹÓõıíÀ´×ÔOracle×Ô´øµÄHRÓû§ÏÂµÄ±í£¬Èç¹ûûÓа²×°¸ÃÓû§£¬¿ÉÒÔÔÚSYSÓû§ÏÂÔËÐÐ$ORACLE_HOME/demo/schema/human_re ......
Just a few days ago a got to two Oracle DBAs discussing why the have so much “PX Deq Credit : send blkd” on a system. And if that is causing their performance problems.
The are some blog on the internet claiming it has to do with qc distribution and what ever.
But in many cases, especi ......
Óï·¨:
substr( string, start_position, [ length ] )
È¡×Ó×Ö·û´®,´Óstart_position¿ªÊ¼,È¡length¸ö,lengthΪ¿ÉÑ¡£¬Èç¹ûlengthΪ¿ÕÔò·µ»Østart_positionºóµÄËùÓÐ×Ö·û¡£
ʵÀý:
substr('This is a test', 6, 2) would return 'is'
&nbs ......