Oracle JOB Ó÷¨Ð¡½á
Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
sql> alter system set job_queue_processes=n;£¨n>0£©
job_queue_processes×î´óֵΪ1000
²é¿´¸ÃÖµ show parameter processes
²é¿´job queue ºǫ́½ø³Ì
sql>select name,description from v$bgprocess;
¶þ£¬dbms_job package Ó÷¨½éÉÜ
°üº¬ÒÔÏÂ×Ó¹ý³Ì£º
Broken()¹ý³Ì¡£
change()¹ý³Ì¡£
Interval()¹ý³Ì¡£
Isubmit()¹ý³Ì¡£
Next_Date()¹ý³Ì¡£
Remove()¹ý³Ì¡£
Run()¹ý³Ì¡£
Submit()¹ý³Ì¡£
User_Export()¹ý³Ì¡£
What()¹ý³Ì¡£
1¡¢
Broken()¹ý³Ì¸üÐÂÒ»¸öÒÑÌá½»µÄ¹¤×÷µÄ״̬£¬µäÐ͵ØÊÇÓÃÀ´°ÑÒ»¸öÒÑÆƹ¤×÷±ê¼ÇΪδÆƹ¤×÷¡£
Õâ¸ö¹ý³ÌÓÐÈý¸ö²ÎÊý£ºjob ¡¢brokenÓënext_date¡£
PROCEDURE Broken (job IN binary_integer,
Broken IN boolean,
next_date IN date :=SYSDATE)
job²ÎÊýÊǹ¤×÷ºÅ£¬ËüÔÚÎÊÌâÖÐΨһ±êʶ¹¤×÷¡£
broken²ÎÊýָʾ´Ë¹¤×÷ÊÇ·ñ½«±ê¼ÇΪÆÆ——TRUE˵Ã÷´Ë¹¤×÷½«±ê¼ÇΪÆÆ£¬¶øFLASE˵Ã÷´Ë¹¤×÷½«±ê¼ÇΪδÆÆ¡£
next_date²ÎÊýָʾÔÚʲôʱºò´Ë¹¤×÷½«ÔÙ´ÎÔËÐС£´Ë²ÎÊýȱʡֵΪµ±Ç°ÈÕÆÚºÍʱ¼ä¡£
jobÈç¹ûÓÉÓÚijÖÖÔÒòδÄܳɹ¦Ö®ÐУ¬oracle½«ÖØÊÔ16´Îºó£¬»¹Î´Äܳɹ¦Ö´ÐУ¬½«±»±ê¼ÇΪbroken
ÖØÐÂÆô¶¯×´Ì¬ÎªbrokenµÄjob£¬ÓÐÈçÏÂÁ½ÖÖ·½Ê½;
a¡¢ÀûÓÃdbms_job.run()Á¢¼´Ö´ÐиÃjob
sql>begin
sql>dbms_job.run(:jobno) ¸ÃjobnoΪsubmit¹ý³ÌÌύʱ·µ»ØµÄjob number
sql>end;
sql>/
b¡¢ÀûÓÃdbms_job.broken()ÖØн«broken±ê¼ÇΪfalse
sql>begin
sql>dbms_job.broken (:job,false,next_date)
sql>end;
sql>/
2¡¢
Change()¹ý³ÌÓÃÀ´¸Ä±äÖ¸¶¨¹¤×÷µÄÉèÖá£
Õâ¸ö¹ý³ÌÓÐËĸö²ÎÊý£ºjob¡¢what ¡¢next_dateÓëinterval¡£
PROCEDURE Change (job IN binary_integer,
&n
Ïà¹ØÎĵµ£º
±¾ÈËÒÔÇ°ÕûÀíµÄÊý¾Ý¿âÎļþǨÒƹý³Ì£¬Ï£ÍûÄܹ»¶Ô´ó¼ÒÓÐËù°ïÖú
1¡¢sqlplus "sys/sys@·þÎñÃû as sysdba"
2¡¢Ð޸ĿØÖÆÎļþ:
alter system set control_files='E:\oracle\oradata\myOracle_1\control01.ctl',
'E:\oracle\oradata\myOracle_1\control02.ctl','E:\oracle\oradata\my ......
SELECT EXECUTIONS , DISK_READS, BUFFER_GETS,
¡¡¡¡ROUND((BUFFER_GETS-DISK_READS)/BUFFER_GETS,2) Hit_radio,
¡¡¡¡ROUND(DISK_READS/EXECUTIONS,2) Reads_per_run,
¡¡¡¡SQL_TEXT
¡¡¡¡from V$SQLAREA
¡¡¡¡WHERE EXECUTIONS>0
¡¡¡¡AND BUFFER_GETS > 0
¡¡¡¡AND (BUFFER_GETS-DISK_READS)/BUFFER_GETS ......
Á½¸ö×Ó²éѯ½øÐм¯ºÏÔËÐУ¬ Ìõ¼þ¾ÍÊÇÁ½¸ö²éѯµÄ×ֶθöÊýÒ»Ö£¬ÀàÐÍÒ»Ö£¬×Ö¶ÎÃû¿ÉÒÔ²»Í¬¡£
SQL> select * from ta;
ID NAME
---------- --------------------
1 gorey
&nb ......
Sample
±í¿Õ¼ä£ºIMPTEMP
±í£ºRoles ¡¢Users
ͨ¹ýPL/SQLµ¼³öµÄÊý¾Ý¿â½Å±¾
-----------------------------------------------------
-- Export file for user IMPTEMP --
-- Created by Administ ......
1¡¢²é¿´Êý¾Ý¿â×Ö·û¼¯
Êý¾Ý¿â·þÎñÆ÷×Ö·û¼¯select * from nls_database_parameters£¬ÆäÀ´Ô´ÓÚprops$£¬ÊDZíʾÊý¾Ý¿âµÄ×Ö·û¼¯¡£
¡¡¡¡
¡¡¡¡¿Í»§¶Ë×Ö·û¼¯»·¾³select * from nls_instance_parameters,ÆäÀ´Ô´ÓÚv$parameter£¬
¡¡¡¡
¡¡¡¡±íʾ¿Í»§¶ËµÄ×Ö·û¼¯µÄÉèÖ㬿ÉÄÜÊDzÎÊýÎļþ£¬»·¾³±äÁ¿»òÕßÊÇ×¢²á±í
¡¡¡¡
¡¡¡¡»á»°×Ö·û¼¯» ......