oracle 10gÈçºÎ¹Ø±ÕºÍ´ò¿ª×Ô¶¯ÊÕ¼¯Í³¼ÆÐÅÏ¢
http://www.51testing.com/?uid-16403-action-viewspace-itemid-101605
Ò»¡¢ORACLE10g×Ô¶¯ÊÕ¼¯Í³¼ÆÐÅÏ¢--×Ô¶¯analyze
´ÓOracle Database 10g¿ªÊ¼£¬OracleÔÚ½¨¿âºó¾ÍĬÈÏ´´½¨ÁËÒ»¸öÃûΪGATHER_STATS_JOBµÄ¶¨Ê±ÈÎÎñ£¬ÓÃÓÚ×Ô¶¯ÊÕ¼¯CBOµÄͳ¼ÆÐÅÏ¢¡£
Õâ¸ö×Ô¶¯ÈÎÎñĬÈÏÇé¿öÏÂÔÚ¹¤×÷ÈÕÍíÉÏ10£º00-6£º00ºÍÖÜÄ©È«Ì쿪Æô¡£µ÷ÓÃDBMS_STATS.GATHER_DATABASE_STATS_JOB_PROCÊÕ¼¯Í³¼ÆÐÅÏ¢¡£¸Ã¹ý³ÌÊ×Ïȼì²âͳ¼ÆÐÅϢȱʧºÍ³Â¾ÉµÄ¶ÔÏó¡£È»ºóÈ·¶¨ÓÅÏȼ¶£¬ÔÙ¿ªÊ¼½øÐÐͳ¼ÆÐÅÏ¢¡£
¿ÉÒÔͨ¹ýÒÔϲéѯÕâ¸öJOBµÄÔËÐÐÇé¿ö£º
select * from Dba_Scheduler_Jobs where JOB_NAME ='GATHER_STATS_JOB'
ÆäʵͬÔÚ10µãÔËÐеÄJob»¹ÓÐÒ»¸öAUTO_SPACE_ADVISOR_JOB£º
SQL> select JOB_NAME,LAST_START_DATE from dba_scheduler_jobs;
JOB_NAME LAST_START_DATE
------------------------------ --------------------------------------
AUTO_SPACE_ADVISOR_JOB 04-DEC-07 10.00.00.692269 PM +08:00
GATHER_STATS_JOB 04-DEC-07 10.00.00.701152 PM +08:00
FGR$AUTOPURGE_JOB
PURGE_LOG 05-DEC-07 03.00.00.169059 AM PRC
È»¶øÕâ¸ö×Ô¶¯»¯¹¦ÄÜÒѾӰÏìÁ˺ܶàϵͳµÄÕý³£ÔËÐУ¬ÍíÉÏ10µã¶ÔÓڴ󲿷ÖÉú²úϵͳҲ²¢·Ç¿ÕÏÐʱ¶Î¡£
¶ø×Ô¶¯·ÖÎö¿ÉÄܵ¼Ö¼«ÎªÑÏÖصÄãÅËø¾ºÕù£¬½ø¶ø¿ÉÄܵ¼ÖÂÊý¾Ý¿âHang»òÕßCrash¡£
ËùÒÔ½¨Òé×îºÃ¹Ø±ÕÕâ¸ö×Ô¶¯Í³¼ÆÐÅÏ¢ÊÕ¼¯¹¦ÄÜ£º
exec DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB');
×Ô¶¯»¯ÓÀÔ¶¶øÑÏÖصÄÒþ»¼Ïà°éË棡
¹Ø±Õ¼°¿ªÆô×Ô¶¯ËѼ¯¹¦ÄÜ£¬ÓÐÁ½ÖÖ·½·¨£¬·Ö±ðÈçÏ£º
·½·¨Ò»£º
exec dbms_scheduler.disable('SYS.GATHER_STATS_JOB');
exec dbms_scheduler.enable('SYS.GATHER_STATS_JOB');
·½·¨¶þ£º
alter system set "_optimizer_autostats_job"=false scope=spfile;
alter system set "_optimizer_autostats_job"=true scope=spfile;
Pfile¿ÉÒÔÖ±½ÓÐ޸ijõʼ»¯²ÎÊýÎļþ£¬ÖØÐÂÆô¶¯Êý¾Ý¿â¡£
¶þ¡¢AWRĬÈÏͨ¹ýMMON¼°MMNL½ø³ÌÀ´Ã¿Ð¡×Ô¶¯ÔËÐÐÒ»´Î£¬ÎªÁ˽ÚÊ¡¿Õ¼ä£¬²É¼¯µÄÊý¾ÝÔÚ 7 Ììºó×Ô¶¯Çå³ý¡£
¿ìÕÕƵÂʺͱ£Áôʱ¼ä¶¼¿ÉÒÔÓÉÓû§Ð޸ġ£Òª²é¿´µ±Ç°µÄÉèÖã¬Äú¿ÉÒÔʹÓÃÏÂÃæµÄÓï¾ä£º
select s
Ïà¹ØÎĵµ£º
¸Ãº¯ÊýÓÃÀ´·µ»ØÒ»¸öËÄÉáÎåÈëºóµÄÖµ
SELECT ROUND( number, [ decimalplaces ] ) from DUAL
參數:
±ØÌîÏnumber : Òª´¦ÀíµÄÊýÖµ(ÊýÖµ±í´ïʽ)
¿ÉÑ¡Ïdecimalplaces : ËÄÉáÎåÈëʱȡµÄСÊýµÄλÊý£¬²»ÌîÔò·µ»ØÕûÊý
Sample :
select round(123.456) from dual;& ......
Ò». ¸ÅÊö
¡¡¡¡Oracle´æ´¢¹ý³Ì¿ª·¢µÄÒªµãÊÇ£º
¡¡¡¡• ʹÓÃNotepadÎı¾±à¼Æ÷£¬ÓÃOracle PL/SQL±à³ÌÓïÑÔдһ¸ö´æ´¢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖд´½¨Ò»¸ö´æ´¢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖÐʹÓÃSQL*Plus¹¤¾ßÔËÐд洢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖÐÐ޸Ĵ洢¹ý³Ì;
¡¡¡¡• ͨ¹ý±àÒë´íÎóµ÷ÊÔ´æ´ ......
http://topic.csdn.net/t/20040818/16/3287013.html
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS|AS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
˵Ã÷£ºisÒ²¿É»»³Éas
2.SELECT INTO STATEMENT
& ......
1. ϵͳÅäÖùý³Ì
2.1. oracle°²×°Ìõ¼þ¼ì²é
2.1.1. Ó²¼þ¼ì²é
¼ì²éÓ²¼þÇé¿öÊÇ·ñ·ûºÏoracle 10g µÄ°²×°ÒªÇó¡£ÒÔrootµÇ¼ϵͳ£¬ÓÃϱíÃüÁîÊä³öµÄÖµÓ¦´óÓÚ»òµÈÓÚ½¨ÒéÖµ¡£
¼ì²éÏîÄ¿
ÃüÁî ......