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

ORACLEÎﻯÊÓͼ ÎﻯÊÓͼµÄ¿ìËÙË¢ÐÂ


´øUNION ALLÎﻯÊÓͼµÄ¿ìËÙË¢ÐÂ
1.   ¶¨ÒåµÄ²éѯµÄunion all²Ù×÷±ØÐëÔÚ×µÈ¼¶£¨²éѯÖØдºó£©
2.   ÎﻯÊÓͼÈÕÖ¾Ö¸¶¨rowidºÍincluding new values
3.   Èç¹û±íÉèÉæ¼°µ½Ò»¸ö´óÁ¿µÄinsert»òÕßÖ±½Ó·¾¶¼ÓÔØ£¬deletes,update£¬Ö¸¶¨sequencea
4.   fromÁбíÖÐËùÓбíµÄrowid±ØÐë³öÏÖÔÚselect×Ó¾äÖÐ
5.   selectÁÐÖбØÐë°üÀ¨Ò»¸öά»¤ÁУ¬±»³ÆΪunion all marker
6.   Ô¶¶ËÊý¾Ý¿âµÄ±í²»Ö§³Öunion all
7.   ²»Ö§³Ö¾Û¼¯²Ù×÷£¬ÒòΪûÓÐrowid
 
CREATETABLEtest1ASSELECT*fromdba_objects;
CREATETABLEtest2ASSELECT*fromdba_objects;
CREATETABLEtest3ASSELECT*fromdba_objects;
 
CREATEMATERIALIZEDVIEWLOGONCTAIS2.TEST1WITHROWID,SEQUENCEINCLUDINGNEWVALUES;
CREATEMATERIALIZEDVIEWLOGONCTAIS2.TEST2WITHROWID,SEQUENCEINCLUDINGNEWVALUES;
CREATEMATERIALIZEDVIEWLOGONCTAIS2.TEST3WITHROWID,SEQUENCEINCLUDINGNEWVALUES;
 
CREATEMATERIALIZEDVIEWmv_test_union_all
REFRESHFASTONDEMANDWITHROWID
AS
SELECTowner, object_name, subobject_name, object_id, data_object_id, object_type, created, last_ddl_time,TIMESTAMP, status,TEMPORARY,GENERATED, secondary,1marker,ROWIDrdfromtest1
UNIONALL
SELECTowner, object_name, subobject_name, object_id, data_object_id, object_type, created, last_ddl_time,TIMESTAMP, status,TEMPORARY,GENERATED, secondary,2marker,ROWIDrdfromtest2
UNIONALL
SELECTowner, object_name, subobject_name, object_id, data_object_id, object_type, created, last_ddl_time,TIMESTAMP, status,TEMPORARY,GENERATED, secondary,3marker,ROWIDrdfromtest3
 
´ø¾Û¼¯ÎﻯÊÓͼµÄ¿ìËÙË¢ÐÂ
1.   ÎﻯÊÓͼÈÕÖ¾Ö¸¶¨rowidºÍincluding new values
2.   Èç¹û±íÉèÉæ¼°µ½Ò»¸ö´óÁ¿µÄinsert»òÕßÖ±½Ó·¾¶¼ÓÔØ£¬deletes,update£¬Ö¸¶¨sequence
3.   Ö§³ÖµÄº¯Êýsum,count,avg,stddev,variance,min,max
4.   ±ØÐëÖ¸¶¨count(*)
5.   Èç¹ûʹÓÃstddev,variance£¬ÄÇôcountºÍsum±ØÐëÖ¸¶¨¡£ORACLEÍƼöͬʱָ¶¨sum(expr*expr)
6.   selectÖеÄÁв»ÄÜÓÐÀ´×Ô¶à¸ö±íµÄ¸´ÔÓµÄ


Ïà¹ØÎĵµ£º

ORACLEµ÷ÓÅÖ® ÄÚ´æ½á¹¹µ÷ÓÅ£¨Õª×ÔÎÄƽÊ飩

´ÓAIX ½Ç¶È£¬ÎÒÃÇ¿ÉÒÔÔÚÏÂÃæÈý¸ö½Ç¶ÈºâÁ¿ÄÚ´æʹÓõĺÏÀíÐÔ
1>¼õÉÙÒ³Ãæ½»»»²Ù×÷
µ±²Ù×÷ϵͳÐèÒª¸ü¶àÄÚ´æÒ³ÒÔÖ§³ÖÆäËûÓ¦ÓÃÔËÐÐʱ£¬²Ù×÷ϵͳ½«ÒÀ¾ÝijÖÖËã·¨£¨LRUËã·¨£©°Ñµ±Ç°×¤ÁôÔÚÄÚ´æÖеÄijЩ
Êý¾ÝÒ³"Page Out"£¬Ò²¾ÍÊÇ°ÑÄÚ´æÖеÄÊý¾ÝÒ³´ÓÄÚ´æ¶ÎתÒƵ½ÎïÀí´ÅÅÌ¡£ÏÔÈ»£¬ÕâÖÖÀàÐ͵IJÙ×÷»áÓ°ÏìÕû¸öϵͳµÄÔËÐÐÐÔÄÜ¡£
¶ÔÓÚ ......

È«ÃæѧϰORACLE SchedulerÌØÐÔ(1)´´½¨jobs

Ëùν³öÓÚjob¶øʤÓÚjob£¬ËµµÄ¾ÍÊÇOracle 10gºóµÄÐÂÌØÐÔSchedulerÀ²¡£ÔÚ10g»·¾³ÖУ¬ORACLE½¨ÒéʹÓÃSchedulerÌæ»»ÆÕͨµÄjob£¬À´¹ÜÀíÈÎÎñµÄÖ´ÐС£Æäʵ£¬½«SchedulerÃèÊö³É¹ÜÀíjobµÄ¹¤¾ßÒѾ­Ì«¹ýƬÃæÁË£¬10G°æ±¾ÖÐÐÂÔöµÄScheduler¾ø²»½ö½öÊÇ´´½¨ÈÎÎñÕâô¼òµ¥¡£¡£¡£¡£
Ìáʾ£ºORACLEÖйÜÀíSchedulerÊÇͨ¹ýDBMS_SCHEDULER°ü£¬±¾ÕÂÒ ......

È«ÃæѧϰORACLE SchedulerÌØÐÔ(2)¹ÜÀíjobs

1.2 ¹ÜÀíJobs
1.2.1 ÆôÓÃJobs
¡¡¡¡Ç°Ãæ´´½¨JOBʱ£¬ÓÉÓÚδÏÔʽµÄÖ¸¶¨ENABLED²ÎÊý£¬Òò´Ë¼´Ê¹Ö¸¶¨ÁËSTART_DATE£¬²»¹ýĬÈÏÇé¿öÏÂJOB²»»á×Ô¶¯Ö´ÐС£¶ÔÓÚÕâÖÖÇé¿ö£¬DBMS_SCHEDULER°üÖÐÌṩÁËÒ»¸ö¹ý³ÌENABLE£¬¿ÉÒÔÓÃÀ´ÐÞ¸ÄJOBµÄÆôÓÃ״̬£¬µ÷Ó÷½Ê½·Ç³£¼òµ¥£¬ÀýÈ磺
SQL> exec dbms_scheduler.enable(¨INSERT_TEST_TBL& ......

ORACLE¼Æ»®(schedule)Ïê½â

´´½¨job
jobÊÇʲôÄØ? ¼òµ¥µÄ˵¾ÍÊǼƻ®(schedule)¼ÓÉÏÈÎÎñ˵Ã÷. ÁíÍ⻹ÓÐһЩ±ØÐëµÄ²ÎÊý.
ÕâÀïÌáµ½µÄ"ÈÎÎñ"¿ÉÒÔÊÇÊý¾Ý¿âÄÚ²¿µÄ´æ´¢¹ý³Ì,ÄäÃûµÄPL/SQL¿é,Ò²¿ÉÒÔÊDzÙ×÷ϵͳ¼¶±ðµÄ½Å±¾.
¿ÉÒÔÓÐÁ½ÖÖ·½Ê½À´¶¨Òå"¼Æ»®":
1) ʹÓÃDBMS_SCHDULER.CREATE_SCHEDULE ¶¨ÒåÒ»¸ö¼Æ»®;
2) µ÷ÓÃDBMS_SCHDULER.CREATE_JOBE¹ý³ÌÖ±½ÓÖ¸¶¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ