È«ÃæѧϰORACLE SchedulerÌØÐÔ(4)´´½¨ºÍ¹ÜÀíSchedule
Èý¡¢Ê¹ÓÃSchedules
¡¡¡¡10g ÖÐÐÂÍƳöµÄSCHEDULER¿ÉÄÜȷʵ»áÈúܶà³õ½Ó´¥µÄÅóÓѸоõÔÎÍ·ÔÎÄÔ£¬Ïà±È֮ǰµÄjobs£¬SCHEDULERÖÐÐÂÔöµÄ¸ÅÄîÌ«¶à¡£±ÈÈç˵jobs£¬ÈÔÈ»¿ÉÒÔÀí½â³É֮ǰ°æ±¾ÖеÄjobs£¬²»¹ý¹¦Äܸü¼ÓÇ¿´ó(×¢Òâ10gÖÐÒ²ÈÔÈ»¿ÉÒÔʹÓÃÆÕͨjobs£¬ÕâÊÇ·Ï»°£¬ÏàÐÅ¿´±¾ÆªÎÄÕµÄÅóÓÑÄ¿Ç°Ó¦¸Ã»¹ÊÇÕâÑùÔÚÓÃ)£¬±ÈÈç˵program£¬Ö¸µÄÊÇÔËÐеijÌÐò(°ÑÒª×öʲôµ¥Ìá³öÀ´ÁË)£¬±ÈÈç˵schedule£¬ÎÒ½«Æä·ÒëΪµ÷¶È(jobÎÒ·ÒëΪÈÎÎñ)£¬¶¨ÒåÖ´ÐеÄƵÂÊ»òÕß˵ÖÜÆÚ¡£
3.1 ´´½¨ºÍ¹ÜÀíSchedule s
¡¡¡¡Schedule £¬ÖÐÎÄÖ±ÒëµÄ»°Ó¦¸ÃÀí½â³Éµ÷¶È£¬´ÓÃû×ÖÀ´¿´£¬ËüÊÇÒ»¸öÂ߼ʵÌå(Âß¼£¬»¹ÊµÌ壬ºÃì¶Ü)£¬¾ÍÊÇ˵µ±´´½¨ÁËscheduleÖ®ºó£¬Êý¾Ý¿âÖоͿ϶¨´æÔÚÕâÒ»¶ÔÏó£¬Ö»²»¹ýÕâÒ»¶ÔÏóÊÇÓÃÀ´ÃèÊöjobµÄÖ´ÐÐÖÜÆÚ¡£
¡¡¡¡´´½¨schedule¿ÉÒÔͨ¹ýDBMS_SCHEDULER.CREATE_SCHEDULE¹ý³Ì£¬¸Ã¹ý³ÌÖ§³ÖµÄ²ÎÊýÈçÏ£º
SQL> desc dbms_scheduler.create_schedule;
Parameter Type Mode Default?
--------------- ------------------------ ---- --------
SCHEDULE_NAME VARCHAR2 IN
START_DATE TIMESTAMP WITH TIME ZONE IN Y
REPEAT_INTERVAL VARCHAR2 IN
END_DATE TIMESTAMP WITH TIME ZONE IN Y
COMMENTS VARCHAR2 IN Y
¡¡¡¡¸÷²ÎÊý·Ö±ð´ú±íº¬ÒâÈçÏ£º
SCHEDULE_NAME £ºÖ¸¶¨scheduleÃû³Æ£¬×¢ÒâÃû³Æ²»ÄÜÖظ´¡£
START_DATE £ºÖ¸¶¨¸Ãµ÷¶ÈµÄ¿ªÊ¼Ê±¼ä£¬¿ÉΪ¿Õ£¬µ±Îª¿Õʱ±íʾ¸Ãµ÷¶ÈÔݲ»ÆðÓá£
REPEAT_INTERVAL £ºÖ¸¶¨µ÷¶ÈµÄÖ´ÐÐƵÂÊ»òÖÜÆÚ¡£
END_DATE £ºÖ¸¶¨µ÷¶ÈµÄ½áÊøʱ¼ä£¬¿ÉΪ¿Õ£¬Îª¿Õʱ¾Í±íʾ¸Ãµ÷¶È½«Ò»Ö±½øÐС£
COMMENTS £º×¢ÊÍÐÅÏ¢¡£
¡¡¡¡ÕâÆäÖУ¬±È½ÏÓм¼Êõº¬Á¿µÄÊÇREPEAT_INTERVAL²ÎÊý£¬¶ÔÓÚÕâ¸ö²ÎÊý´ó¼ÒÓ¦¸Ã²»»áÌ«Ä°Éú£¬ÒòΪǰÃæ½éÉÜJobs£¬Ò²Ôø¾Ìáµ½¹ýͬÃûµÄ²ÎÊý£¬SchedulesÖеÄREPEAT_INTERVAL²ÎÊýºÍJobsÖеÄREPEAT_INTERVAL²ÎÊý¹¦ÄÜÍêÈ«Ïàͬ£¬ÉõÖÁ²ÎÊý¸ñʽҲһģһÑù¡£
¡¡¡¡REPEAT_INTERVAL ²ÎÊýµÄÓï·¨½á¹¹Òª¸´ÔӵĶࡣÆäÖÐ×îÖØÒªµÄÊÇFREQºÍINTERVALÁ½¸ö¹Ø¼ü×Ö¡£
FREQ ¹Ø¼ü×ÖÓÃÀ´Ö¸¶¨¼ä¸ôµÄʱ¼äÖÜÆÚ£¬¿ÉÑ¡²ÎÊýÓУºYEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, and SECONDLY£¬·Ö±ð±íʾÄê¡¢Ô¡¢ÖÜ¡¢ÈÕ¡¢Ê±¡¢·Ö¡¢ÃëµÈµ¥Î»¡£
INTERVAL ¹Ø¼ü×ÖÓÃÀ´Ö¸¶¨¼ä¸ôµÄƵ·±£¬¿ÉÖ¸¶¨µÄÖµµÄ·¶Î§´Ó1-99¡£
¡¡¡¡±
Ïà¹ØÎĵµ£º
ÕÒ²»µ½ÔÌûÁË ¾ÍÌùÕâÀï°É£¡
ÔÚÏò´ó¼ÒÏêϸ½éÉÜOracle֮ǰ£¬Ê×ÏÈÈôó¼ÒÁ˽âÏÂOracle xmltypeÊÇʲô£¬Oracle´Ó9i¿ªÊ¼Ö§³ÖÒ»ÖÖеÄÊý¾ÝÀàÐÍ----
xmltype£¬ÓÃÓÚ´æ´¢ºÍ¹ÜÀíxmlÊý¾Ý£¬²¢ÌṩÁ˺ܶàµÄfunctions£¬ÓÃÀ´Ö±½Ó¶ÁÈ¡xmlÎĵµºÍ¹ÜÀí½Úµã¡£ÏÂÃ潫½éÉÜOracle
xmltypeµÄһЩ»ù±¾Ê¹Óá£
1.½¨Á¢º¬ÓÐOracle xmltypeÊý¾Ý ......
¾²âÊÔ£¬ÔÚOracleÖУ¬¶ÔÓÚnullºÍ¿Õ×Ö·û´®'',webMethods JDBC Adapter ²éѯ³öÀ´¶¼»áÏÔʾnull.
¶øÔÚSQL SERVERÖУ¬»á·Ö±ðÏÖʵΪnullºÍ¿Õ×Ö·û´®¡£
º¬Òå½âÊÍ£º
ÎÊ£ºÊ²Ã´ÊÇNULL£¿
´ð£ºÔÚÎÒÃDz»ÖªµÀ¾ßÌåÓÐʲôÊý¾ÝµÄʱºò£¬Ò²¼´Î´Öª£¬¿ÉÒÔÓÃNULL£¬ÎÒÃdzÆËüΪ¿Õ£¬ORACLEÖУ¬º¬ÓпÕÖµµÄ±íÁ㤶ÈΪÁã¡£
ORACLEÔÊÐíÈκÎÒ»ÖÖÊý¾ ......
ÒÔsystemµÇ¼½øÈ¥Ö®ºó£¬Ö´ÐÐÏÂÃæµÄÃüÁ
SQL> alter user scott account unlock; £¨Íê³É½âËøµÄ²Ù×÷£©
Óû§ÒѸü¸Ä¡£
SQL> alter user scott identified by tiger; £¨ÖØиøscottÕâ¸öÓû§É趨ÃÜÂ룩
Óû§ÒѸü¸Ä¡£
SQL> conn scott/tiger
ÒÑÁ¬½Ó¡£ ......
MySQL:
SELECT column from table
ORDER BY RAND()
LIMIT 1
PostgreSQL:
SELECT column from table
ORDER BY RANDOM()
LIMIT 1
Microsoft SQL Server:
SELECT TOP 1 column from table
ORDER BY NEWID()
IBM DB2
SELECT column, RAND() as IDX
from table
ORDER BY IDX FETCH FIRST 1 ROWS ONLY
Thanks Ti ......
¶þ¡¢Ê¹ÓÃPrograms
¡¡¡¡ÔÚÂÛ̳ÖÐż¶û¼û¹ýÓÐÈËÌÖÂÛÈçºÎÔÚORACLEÖÐÖ´ÐвÙ×÷ϵͳÃüÁ»òÊÇORACLEÊý¾Ý¿âÍâµÄÓ¦Óá£Ó¦¸Ã˵ÔÚ9i¼°Ö®Ç°µÄ°æ±¾ÖУ¬ËäȻ˵²¢·ÇÍêÈ«ÎÞ·¨ÊµÏÖ£¨Æäʵ»¹ÊÇÓжàÖÖ·½Ê½Äܹ»±äÏàʵÏֵģ©£¬²»¹ý¸´ÔÓµÄʵÏÖ·½Ê½ÈÃDBAʹ¾¢ÁËÁ¦£¬ÉË͸ÁËÐÄ£¬·Ñ¾¢ÁËʶù¡£
¡¡¡¡½øÈë10g°æ±¾Ö®ºó£¬¾ÍÍêÈ«²»±ØÈç´Ë·ÑÉñ£¬ÒòΪÓÐÁËDBMS ......