oracle job¼ò½é
´´½¨oracle job
oracle job¼ò½é
Ö÷ÒªµÄʹÓÃÇé¾°
¶¨Ê±ÔÚºǫִ́ÐÐÏà¹Ø²Ù×÷:ÈçÿÌìÍíÉÏ0µã½«Ò»ÕűíµÄÊý¾Ý±£´æµ½ÁíÒ»ÕűíÖÐ,2£º¶¨Ê±±¸·ÝÊý¾Ý¿âµÈ
Ê컯˵ÍòÊ¿ªÍ·ÄÑ£¬ÕâÀïÎÒÖ»¼òµ¥¼ÇÊöÒ»¸ö´´½¨Ò»¸ö¼òµ¥µÄjob
²½ÖèÈçÏ£º
1¡¢´´½¨Ò»Õűíg_test
create table G_TEST
(
ID NUMBER(12),
C_DATE DATE
)
2¡¢´´½¨Ò»¸ösequence
create sequence G_SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 141
increment by 1
cache 20;
3¡¢´´½¨Ò»¸ö´æ´¢¹ý³Ì
create or replace procedure prc_g_test is
begin
insert into g_test values(g_seq.nextval,sysdate);
end prc_g_test;
4¡¢´´½¨job,
ʹÓÃSubmit()¹ý³Ì£¬¹¤×÷±»Õý³£µØ¼Æ»®ºÃ¡£
Õâ¸ö¹ý³ÌÓÐÎå¸ö²ÎÊý£ºjob¡¢what¡¢next_date¡¢intervalÓëno_parse¡£
PROCEDURE Submit ( job OUT binary_ineger,
What IN varchar2,
next_date IN date,
interval IN varchar2,
no_parse IN booean:=FALSE)
job²ÎÊýÊÇÓÉSubmit()¹ý³Ì·µ»ØµÄbinary_ineger¡£Õâ¸öÖµÓÃÀ´Î¨Ò»±êʶһ¸ö¹¤×÷¡£
what²ÎÊýÊǽ«±»Ö´ÐеÄPL/SQL´úÂë¿é¡£
next_date²ÎÊýָʶºÎʱ½«ÔËÐÐÕâ¸ö¹¤×÷¡£
interval²ÎÊýºÎʱÕâ¸ö¹¤×÷½«±»ÖØÖ´ÐС£
no_parse²ÎÊýָʾ´Ë¹¤×÷ÔÚÌύʱ»òÖ´ÐÐʱÊÇ·ñÓ¦½øÐÐÓï·¨·ÖÎö——TRUE
ָʾ´ËPL/SQL´úÂëÔÚËüµÚÒ»´ÎÖ´ÐÐʱӦ½øÐÐÓï·¨·ÖÎö£¬
¶øFALSEָʾ±¾PL/SQL´úÂëÓ¦Á¢¼´½øÐÐÓï·¨·ÖÎö¡£
ÔÚcommand window´°¿ÚÖÐÖ´ÐÐÏÂÃæ½Å±¾
variable job1 number;
begin
sys.dbms_job.submit(job => :job,
&nb
Ïà¹ØÎĵµ£º
1>.NUMBERÀàÐÍϸ½²£º
Oracle number datatype Óï·¨£ºNUMBER[(precision [, scale])]
¼ò³Æ£ºprecision --> p
scale --> s
NUMBER(p, s)
·¶Î§£º 1 <= p <=38, -84 <= s <= 127
±£´æÊý¾Ý·¶Î§£º-1.0e-130 <= number value < 1.0e+1 ......
Òª½â¾öOracleµÄ¿Í»§¶ËÂÒÂëÎÊÌâ¹Ø¼üÊÇÒª°Ñ·þÎñÆ÷¶ËʹÓõÄ×Ö·û¼¯¸ú¿Í»§¶ËʹÓõÄ×Ö·û¼¯Í³Ò»ÆðÀ´¡£Oracle¿Í»§¶Ë£¨Sqlplus£©Í¨¹ýNLS_LANG»·¾³±äÁ¿À´È·¶¨¿Í»§¶ËʹÓõÄ×Ö·û¼¯¡£NLS_LANG
²ÎÊýÓÉÒÔϲ¿·Ö×é³É:
NLS_LANG
=<Language>_<Territory>.<Clients Characterset>
NLS_LANG
¸÷²¿·Öº¬ÒåÈçÏÂ:
LANGUAGEÖ ......
oracle 10.2.0.4 patchµÄÏÂÔصØÖ·Áбí
Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (32-bit)
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
http://download.oracle.com/otn/nt/oracle10g/10201/10201_client_win32.zip
http://d ......
Êʵ±µÄʹÓÃË÷Òý¿ÉÒÔÌá¸ßÊý¾Ý¼ìË÷Ëٶȣ¬¿ÉÒÔ¸ø¾³£ÐèÒª½øÐвéѯµÄ×ֶδ´½¨Ë÷Òý
oracleµÄË÷Òý·ÖΪ5ÖÖ:ΨһË÷Òý£¬×éºÏË÷Òý£¬·´Ïò¼üË÷Òý£¬Î»Í¼Ë÷Òý£¬»ùÓÚº¯ÊýµÄË÷Òý
´´½¨Ë÷ÒýµÄ±ê×¼Óï·¨:
CREATE INDEX Ë÷ÒýÃû ON ±íÃû (ÁÐÃû)
TABLESPACE ±í¿Õ¼äÃû;
´´½¨Î¨Ò»Ë÷Òý:
CREATE unique INDEX Ë÷ÒýÃû ......