DBMS_JOBS interval problems

Hi all,
We have 2 jobs running since a year, in the version ORACLE 8i, 8.1.7.0, recently i have applied patch and upgraded to 8.1.7.4. i dont know when this problem started after 20 days after my upgradation i found my job is not running properly, here is the result from user_jobs.
LAST_DATE LAST_SEC NEXT_DATE NEXT_SEC TOTAL_TIME B INTERVAL
19-NOV-04 09:03:07 20-NOV-04 17:30:33 410 N trunc(sysdate+1)+9/24 .
last datetime is 19th around 9AM, next date why it is showing 20th 17.30 PM, my interval is trunc(sysdate+1)+9/24 . is there any possibility we can see what problems occured while running job?
2nd job also problem
LAST_DATE LAST_SEC NEXT_DATE NEXT_SEC TOTAL_TIME B INTERVAL
20-NOV-04 00:15:16 21-NOV-04 23:45:00 308 N trunc(sysdate+1)+23.75/24 .
while i wanted job everyday to be run at 23.45 PM.
Please where the problm? is ther e any LOG to see?
Thanks in advance

What do the broken and failures columns of user_jobs say? Could it be that the job has failed and the next_date and next_sec are showing the next automatic re-try?

Similar Messages

  • Dbms_job.interval ORA-23421

    Hi ,
    i have a job that its owner is user A
    and i have a procedure X in user B that calls dbms_job.interval
    user A calls procedure X but i am getting the error ORA-23421 !!!??
    note : i can see user A jobs in all_jobs from X procedure .
    the owner of the job who is calling X which i turn calls the dbms_job.interval
    why i am getting this error

    The procedure is defaulting as authid definer and thus is
    executing "as user B". User B doesn't see User A's job.
    You'd have to modify the procedure to be authid current_user OR
    create the procedure in user A's schema. I would prefer the latter unless you
    really use User B as the owner for ALL PLSQL code.

  • Error executing a query (validity interval problem in variable)

    Hi all,
    I have an issue in a query.
    While executing the query  i am getting following error
    "THE VALIDITY INTERVAL HAS THE INITIAL VALUE AS LOWER LIMIT"
    There are two CALMONTH variables that are being used in the query and are also used as selection variables
    1) interval characteristic mandatory variable
    2) single value characteristic mandatory variable
    Please suggest me what might be the problem.
    Any suggestions are welcome.
    Thanks
    Mudit

    Hello,
    I tried debugging my query in RSRT and i have found a possible reason for that.
    My query was built on a multiprovider in which data was not loaded in one of the cube.Since no request was loaded in the infocube initial fields of all time characteristics were empty which was the reason for the error.
    Thanks once again for your valuable inputs.
    Mudit

  • Retry count & interval problem

    I am Using OSB R4 where My Scenario is i need to place the payloads in to the JMS Queue, and route them to the Endpoint URI webservice if the service is unavailable i need to sent the notification mail and rollback the payload back in to the Queue. My problem is i receiving hundreds of notification mail when the service is down instead of one. I configured the retry count to 1 and retry interval as 15 mins for the business service URI and implemented single thread consumer in work manager. Please help me in this.....

    I am Using OSB R4 where My Scenario is i need to place the payloads in to the JMS Queue, and route them to the Endpoint URI webservice if the service is unavailable i need to sent the notification mail and rollback the payload back in to >the Queue. My problem is i receiving hundreds of notification mail when the service is down instead of one.This is a classic case for using OSB SLA alerting instead of doing it in the message pipeline. Configure a sla alert set to trigger when there are 1 or more route errors in an aggrevation interal of 30 mins and set an email alert destination. This will make sure you will get only 1 mail for all errors in that period of 30 minutes.

  • About DIR release interval problem!

    Dear experts:
      now met a problem about DIR release interval. the fellowing is actual business secenario:
    1.create and release a DIR of beginning version A at 08.09.2010.
    2. create and release a DIR of version B in according of ECR/ECO, and the ECR/ECO's valid date from  is 07.09.2010.
    3. after the DIR of version B was released,the release interval of the version A DIR was become  08.07.2010-07.09.2010.
    but on the theory,because the ECO's valid date from is 08.11.2010,then the release interval of the version A document should be 08.09.2010-08.11.2010, why it was 08.07.2010-07.09.2010, where did  the 07.09.2010 come from?
    thanks somebody tell me why!!!
    pangyanting

    Dear Pangyanting,
    honestly I'm a bit confused because of your description. You wrote that the 'valid from' date of the ECR/ECO is 07.09.2010
    and normally this date is also used for the release interval of the document info record.
    But then you mentioned the 08.11.2010 as valid date from for the ECO. So could you please clarify which is the valid from date of the change number in transaction CC03.
    Best regards,
    Christoph

  • Set Interval Problems

    I am trying to have this function attach a movie clip and
    then after n seconds delete it. I am using the setInterval but
    after finding that I cannot get this to work properly I think it is
    the wrong code to use in this situation? correct? How can I
    accomplish this?

    well you're close but there are a few problems here.
    setInterval is the right way to go, but you have to target the
    correct instance to remove and you must always be sure to clear the
    interval or it will continue to run. so you need to do something
    more like the following:

  • Interval problem

    Hi.
    I have a problem using startLoadInterval and IE6, it's using
    the cached XML. Are many solutions but, nothing to solve this:
    quote:
    onclick="javascript:execXML(1);ds1.startLoadInterval(1000);"
    execXML(), changes the XML contents, based on the
    parameter("1" in this case).
    obviously, when the interval reloads the XML the results on
    page are new. But on IE6 doesn't work

    Hi,
    Can you please give us a url where to see your page to
    investigate the incorrect behavior in IE6?
    Did you checked if the header response Content-Type is
    application/xml? Because if is not this may cause your problem.
    Thanks,
    Diana

  • IOS 7 passcode interval problem

    After updating to iOS 7, I started using a passcode. I wanted the interval to be 1 hour between entering passcodes so I went to the settings as usual. For some odd reason, my phone only offered Immediate, 1 Minute, 5 Minutes, and 15 Minutes as options. I know for a fact that 1 hour and 4 hours exists because my friends have them. What is wrong with my phone and how can I fix this?!

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

  • Set interval problem

    I'm trying to generate an instance of a logo every two
    seconds and have them remain persistent. This code creates a new
    instance every two seconds but the earlier versions are deleted.
    Any ideas of how to do this would be helpful.
    function createLogo():Void {
    var counter:Number;
    counter++
    var copy:MovieClip = attachMovie("logo", "newLogo" +
    counter, counter);
    ["copy" + counter]_x = Math.floor(Math.random() * (0-650));
    ["copy" + counter]_y = -60;
    var myInterval:Number = setInterval(createLogo, 2000);

    Trace your counter value. I think you will see that it isn't
    what you think!
    There are probably several things wrong with this. First you
    can't increment a value that doesn't already have a value. It used
    to be that a variable without a value was assumed to be zero, but
    now-a-days...
    The next thing is that you really need to have the counter
    variable be outside the function. You want it to persist from
    function call to function call. But by having it declared as var
    inside the function it is local to the function. So as soon as
    createLogo is done counter goes away and isn't kept for the next
    round.
    Finally, this isn't specific to what you have asked, but it
    is just advice. Generally there can be lots of counters in your
    code. So it is just fine to name it counter when it is local to a
    function. But once you move it out of a function (where it might
    interfere with other counter(s). You might want to rename it to
    something more identifiable. Like logoCount or some such.

  • Help with Interval for DBMS_JOB

    Hi,
    I'd like to create a job using DBMS_JOB and schedule it to run once every month on the first Saturday of the month at 10 in the morning. How would i write the interval for this?
    Thanks.

    user629987 wrote:
    I have created the job in TOAD (the easy way) and now I am trying to reset the interval using the following statement....
    exec dbms_job.interval(81460, next_day(last_day(trunc(sysdate)),'SAT'));
    ...so that it executes on the first saturday of every month ( i haven't figured out how to include the time component yet so that it will execute at 10am), The expression you gave always returns midnight on Saturday. 10 AM on Saturday is 10/24 of a day after that, so add (10/24).
    but the statement gives me the following error:
    >
    ORA-23319: parameter value "03-MAR-12" is not appropriate
    Any ideas how to fix this? Thanks.The 2nd argument of interval is supposed to be a string, such as 'SYSDATE + 7', taht can be evaluated dynamically. You're passing a DATE. Try:
    exec dbms_job.interval (81460, 'next_day (last_day (trunc(sysdate)), ''SAT'') + (10/24)');Edited by: Frank Kulash on Feb 14, 2012 7:59 AM
    Repeated the single-quotes around SAT, since that's inside a string literal.

  • Using DBMS_JOB to schedule auto execution of procedure on a daily basis

    I need to implement a batch procedure for my project and would be using
    DBMS_JOB for the same purpose.I have tried creating a job for the same
    that I submitted using DBMS_JOB.SUBMIT() and I ran the job initially using
    DBMS_JOB.run(). Now at this instant the next_time parameter to run the proc
    is calculated automaticlly. How does the proc run automatically after that
    in specified interval of time?? Do I need to access some dba_XX views for the
    same.....or set some database parameters??

    You will need to set the "interval" portion of the job. Either with dbms_job.submit, or dbms_job.interval.
    Lets say you wanted to run the job every morning at 4:30am, it would be:
    trunc(sysdate)+1+4/24+30/1440
    The "+1" increases it one day.
    The "+4/24" increases it 4 hours.
    The "+30/1440" increases it 30 minutes.
    Hope this helps.
    Brian

  • To submit a job in dbms_job package with specific durations

    Hi,
    Want to set a job to run everyday from 8.00 am to 6.00 pm for every 30 min after that every hour.I want to set this in dbms_job package.The database is 10.2.0.3
    The implementation notation used is
    variable jobno number;
    exec dbms_job.submit(:jobno,'begin procedurename; end;',sysdate,
    'case when sysdate-trunc(sysdate)>=8/24 and sysdate-trunc(sysdate)<18/24 then sysdate+30/1440 else sysdate+1/24');
    but the error resulted is parameter value not appropriate.

    Hi,
    Obviously because you have two different interval strings 'sysdate+30/1440' and 'sysdate+1/24'.
    (The interval strings are inaccurate, but that's a different story)
    The preferred solution in 10g would be to use dbms_scheduler.
    A workaround using dbms_job would be to use 2 ancilliary jobs to change the interval of your main job twice a day, calling dbms_job.interval.
    Your interval strings will cause the time to drift.
    You need to use trunc(sysdate,'HH24') instead of just sysdate.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • Creating job in disabled mode

    hi,
    i created a job which calls the stored proc but i would like to create the job in disabled mode now and later when ever its needed i would like to enable it.
    need help to modify the below code.
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    job => X
    ,what => 'EMPLOYEE_PROC;'
    ,next_date => TRUNC(LAST_DAY(SYSDATE)) + 1
    ,interval => 'TRUNC(LAST_DAY(SYSDATE)) + 1'
    ,no_parse => FALSE
    END;
    /

    Hi,
    You can create the job without specifying the interval. Later, you can use dbms_job.change / dbms_job.interval to change the interval.
    Something like,
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    job => X
    ,what => 'EMPLOYEE_PROC;'
    ,next_date => TRUNC(LAST_DAY(SYSDATE)) + 1
    ,interval => null
    ,no_parse => FALSE
    END;
    /-Arun

  • STATSPACK 수행방법 ( STATSPACK SNAPSHOT 수집 )

    제품 : ORACLE SERVER
    작성날짜 : 2002-10-10
    STATSPACK 수행방법 ( STATSPACK SNAPSHOT 수집 )
    ==============================================
    PURPOSE
    이 자료는 oracle 8.1.6부터 새로이 제공되는 성능 진단도구인 statspack의
    수행 방법에 대해 기술한다.
    Explanation
    1. StatsPack snapshot 수집
    snapshot 수집을 위한 가장 단순한 방법은 SQL*Plus에 PERFSTAT 사용자로
    login한 후, statspack.snap 프로시져를 수행시키는 것이다.
    예.
    SQL> connect perfstat/perfstat
    SQL> execute statspack.snap;
    참고사항 : OPS 환경에서는 데이터를 수집하고자 하는 대상 instance에
    접속하여 수행하여야 한다. snapshot은 모든 인스턴스에서 수집되어야만
    비교를 해 볼 수 있다. 하나의 인스턴스에서 수집된 snapshot 은 동일한
    인스턴스에서 수집된 또 다른 snapshot과 비교가 된다.
    성능 분석을 용이하게 하기 위해 initSID.ora 파라미터 파일에서
    timed_statistics 값을 true로 지정하는 것이 좋다. timed_statistics
    파라미터는 alter system 명령으로, 동적으로 변경 가능한 값이다. 시간
    정보는 그 자체로도 중요할 뿐더러 Oracle 기술 지원에 성능관련 문제 분석
    을 요청할 때에도 필요하다.
    statspack.snap 및 statspack.modify_statspack_parameter 프로시져에는
    필요한 파라미터를 지정할 수 있다.
    =============================================================================
    Parameter Name Valid Values Value Meaning
    =============================================================================
    i_snap_level 0, 5, 10 5 Snapshot 레벨
    i_ucomment Text Blank Snapshot과 함께 저장할 설명문구
    i_executions_th Integer >=0 100 SQL 관련 임계치: 실행된 횟수
    i_disk_reads_th Integer >=0 1,000 SQL 관련 임계치: 디스크 READ 횟수
    i_parse_calls_th Integer >=0 1,000 SQL 관련 임계치: parse call 횟수
    i_buffer_gets_th Integer >=0 10,000 SQL 관련 임계치: buffer get 횟수
    i_session_id Valid sid 0 (no 세션단위의 성능 정보를 수집하기
    from session) 위한 대상 session id
    v$session
    i_modify_parameter True, False False 파라미터를 앞으로의 snapshot에서도
    계속 사용하기 위해 저장할 지 여부
    =============================================================================
    2. 수집되는 데이터의 양을 지정하는 방법
    1) Snapshot 레벨
    패키지에 의해 수집되는 데이터 양은 snapshot 레벨에 따라 조정된다.
    다시 말해 지정된 레벨은 수집될 데이터의 양을 결정한다.
    Level >= 0     일반적인 성능 통계
         수집되는 통계 정보:
         0 이상의 모든 레벨에서는 일반적인 성능 관련 통계 정보가
         수집된다. 여기에는 wait statistics, system event,
         system statistics, rollback segment 데이터, row cache, SGA,
    background event, session event, lock statistics,
         buffer pool statistics, parent latch statistics 등이 포함된다.
    Level >= 5     추가적인 데이터 : SQL 문자
         이 레벨에서는 하위 레벨에서 수집되는 모든 데이터 이외에도
         추가적으로, 자원을 많이 사용하는 SQL 문장과 관련된 성능
         정보를 수집한다.
         SQL 관련 '임계치'
         statspack에 의해 수집되는 SQL 문장은 미리 지정된 다음
         조건 중 하나라도 넘을 경우 수집된다.
         - SQL 실행 횟수                (기본값 100 )
         - SQL 처리시 발생하는 disk read      (기본값 1,000 )
         - SQL parse call 횟수           (기본값 1,000 )
         - SQL 처리시 발생하는 buffer gets      (기본값 10,000)
         위에 나열된 각각의 임계치는 어떤 SQL 관련 정보를 수집할
         것인지를 결정하는 데 사용된다. 위에 언급된 임계치 가운데
         하나라도 넘는 SQL 문장과 관련된 정보가 snapshot을 처리
         하는 동안 수집된다.
         SQL 임계치 레벨 각각은 stats$statspack_parameter 테이블에
         저장되어 있거나, snapshot 수집 당시 파라미터에 의해 지정
    가능하다.
    2) snapshot SQL 임계치
    레벨 이외에도 추가적으로 구성 가능한 파라미터가 있다. 이 파라미터들은
    SQL 수집 시 사용되는 임계치들로, 임계치를 넘어서는 모든 SQL 문장들이
    수집된다.
    snapshot level 및 패키지에 의해 사용되는 임계치 관련 정보는
    stats$statspack_parameter 테이블에 저장된다.
    3) snapshot level과 SQL 관련 임계치 값을 변경하는 방법
    snapshot 수집 작업 시 사용되는 기본 파라미터 값은 조정 가능하며,
    이 값을 조정함으로써 인스턴스에 미치는 부하를 줄이면서, 원하는
    수준의 정보를 수집할 수 있다.
    * snapshot을 받아내변서, 새로운 값을 데이터베이스에 저장
    ( statspack.snap 호출 시, i_modify_parameter 변수 값을 지정 )
    SQL> execute statspack.snap -
    (i_snap_level=>10, i_modify_parameter=>'true');
    i_modify_parameter 를 true로 지정하면, 이 값이 stats$statspack_parameter
    테이블에 저장되며; 이 값이 이후 실행되는 snapshot에 사용된다.
    i_modify_parameter 값을 false로 지정하거나 생략하면, 해당
    snapshot 작업에만 지정된 정보가 사용되며, 이후 작업에는
    stats$statspack_parameter 에 지정된 값을 사용하여 작업이 수행된다.
    * snapshot 수행을 하지 않고 기본값을 바꾸기 위해서는
    statspack.modify_statspack_parameter 프로시져를 사용한다.
    예를 들어 snapshot level을 10으로 변경하고, SQL 관련 임계치 가운데
    buffer_gets, disk_reads 값을 변경하고자 할 때 다음과 같이 한다.
    SQL> execute statspack.modify_statspack_parameter -
    (i_snap_level=>10, i_buffer_gets_th=>10000, i_disk_reads_th=>1000);
    이 프로시져를 수행시키면, snapshot 수행 없이, 변경 사항이
    계속해서 남게 된다.
    modify_statspack_parameter 프로시져에 지정 가능한 전체 파라미터의
    전체 목록은 snap 프로스져와 동일하다.
    4) Session ID 지정
    특정 세션과 관련된 정보를 수집하고자 할 경우, StatsPack 호출 시
    세션 id 지정이 가능하다. 세션과 관련해서 수집되는 정보에는
    세션 통계, 세션 이벤트, lock activity 등이 있다. 기본적으로는
    세션 레벨의 통계는 수집하지 않게 되어 있다.
    SQL> execute statspack.snap(i_session_id=>3);
    3. StatsPack snapshot 수집의 자동화
    일중, 주간, 년간 정보를 비교하기 위해서는, 일정 기간 동안 수집된
    여러 개의 snapshot 정보가 필요하다. 애플리케이션이나 데이터베이스의
    성능 관련 특성을 파악하기 위해서는 최소한 두 개의 snapshot 정보가 필요
    하다.
    snapshot을 수집하는 최선의 방법은, 일정 주기로 snapshot 수집을
    자동화시키는 것이다. 이를 위해 2가지 방법을 사용할 수 있다.
    - 데이터베이스가 제공하는 dbms_job 프로시져를 사용하여 snapshot
    수집 작업을 스케쥴러에 등록한다.
    - OS 시스템 유틸리티( unix의 cron 이나 NT 의 at 명령 )를 사용하여
    snapshot을 스케쥴러에 등록한다.
    1) DBMS_JOB 패키지를 사용한 StatsPack snapshot 작업의 자동화
    오라클 내부적으로 통계정보 수집을 자동화하고자 한다면, dbms_job
    패키지를 사용하면 된다. 샘플은 oracle 8.1.6의 경우 $ORACLE_HOME/rdbms/admin/statsuato.sql
    ( 8.1.7이상은 $ORACLE_HOME/rdbms/admin/spauto.sql) 에 들어 있으며,
    매 시간 마다 snapshot을 등록하는 예제이다.
    dbms_job을 사용하여 snapshot을 자동화시키기 위해서는, init 파일의
    job_queue_processes 파라미터가 0 이상이어야만 한다.
    init<SID>.ora 예제:
    # Set to enable the job queue process to start. This allows dbms_job
    # to schedule automatic statistics collection using STATSPACK
    job_queue_processes=1
    OPS 환경에서 statsauto.sql 을 사용한다면, statsauto.sql 스크립트는
    클러스터 내의 모든 인스턴스에서 한번 씩 수행되도록 하여야 한다.
    마찬가지로 job_queue_processes 파라미터 값도 모든 인스턴스에서
    0 이상의 값으로 지정되어 있어야 한다.
    dbms_job에 대한 자세한 사용방법은 <bulletin:10707> 를 참조한다.
    2) OS 시스템 유틸리티를 사용한 StatsPack snapshot 작업의 자동화.
    unix의 cron에 등록하는 방법은 <bulletin:10906>을, NT 의 at 명령을 사
    용하는 방법은 <bulletin: 11618> 을 참조한다.
    4. 통계정보 수집 주기의 변경 방법
    통계정보 수집 주기를 변경하기 위해서는 dbms_job.interval 프로시져를
    사용한다.
    예.
    execute dbms_job.interval(1,'SYSDATE+(1/48)');
    위에서 SYSDATE+(1/48) 는 통계정보가 1/48 일에 한번씩 ( 매 30분 마다)
    수집되도록 지정한 예이다.
    job이 즉시 실행되도록 하기 위해서는
    execute dbms_job.run(<job number>);
    job을 스케쥴러에서 제거하기 위해서는
    execute dbms_job.remove(<job number>);
    5. STATSPACK의 삭제 및 snapshot 데이타 제거 방법.
    1) Statspack 삭제
    Statspack 환경 삭제를 위해서는 oracle 8.1.6의 경우는 statsdrp.sql을
    oracle 8.1.7 이상의 경우는 spdrop.sql을 수행한다.
    cd $ORACLE_HOME/rdbms/admin
    SQL> connect / as sysdba
    SQL> @statsdrp
    2) Snapshot 데이타 제거
    불필요한 snapshot 데이타를 제거하기 위해서 oracle 8.1.7부터는
    sppurge.sql과 sptrunc.sql을 제공한다.
    특정 구간 사이의 snapshot정보를 제거하려면 sppurge.sql을 수행한다.
    이 script를 수행하면 삭제할 시작과 끝의 snapshot id를 지정하게 되며 지정
    된 구간의 snapshot 데이타가 제거된다.
    모든 snapshot 정보를 삭제하려면 sptrunc.sql을 수행한다.
    cd $ORACLE_HOME/rdbms/admin
    sqlplus perfstat/perfstat
    SQL> @sptrunc
    Example
    none
    Reference Documents
    <Note:94224.1>
    <Note:149121.1>

    제품 : ORACLE SERVER
    작성날짜 : 2002-10-10
    STATSPACK 수행방법 ( STATSPACK SNAPSHOT 수집 )
    ==============================================
    PURPOSE
    이 자료는 oracle 8.1.6부터 새로이 제공되는 성능 진단도구인 statspack의
    수행 방법에 대해 기술한다.
    Explanation
    1. StatsPack snapshot 수집
    snapshot 수집을 위한 가장 단순한 방법은 SQL*Plus에 PERFSTAT 사용자로
    login한 후, statspack.snap 프로시져를 수행시키는 것이다.
    예.
    SQL> connect perfstat/perfstat
    SQL> execute statspack.snap;
    참고사항 : OPS 환경에서는 데이터를 수집하고자 하는 대상 instance에
    접속하여 수행하여야 한다. snapshot은 모든 인스턴스에서 수집되어야만
    비교를 해 볼 수 있다. 하나의 인스턴스에서 수집된 snapshot 은 동일한
    인스턴스에서 수집된 또 다른 snapshot과 비교가 된다.
    성능 분석을 용이하게 하기 위해 initSID.ora 파라미터 파일에서
    timed_statistics 값을 true로 지정하는 것이 좋다. timed_statistics
    파라미터는 alter system 명령으로, 동적으로 변경 가능한 값이다. 시간
    정보는 그 자체로도 중요할 뿐더러 Oracle 기술 지원에 성능관련 문제 분석
    을 요청할 때에도 필요하다.
    statspack.snap 및 statspack.modify_statspack_parameter 프로시져에는
    필요한 파라미터를 지정할 수 있다.
    =============================================================================
    Parameter Name Valid Values Value Meaning
    =============================================================================
    i_snap_level 0, 5, 10 5 Snapshot 레벨
    i_ucomment Text Blank Snapshot과 함께 저장할 설명문구
    i_executions_th Integer >=0 100 SQL 관련 임계치: 실행된 횟수
    i_disk_reads_th Integer >=0 1,000 SQL 관련 임계치: 디스크 READ 횟수
    i_parse_calls_th Integer >=0 1,000 SQL 관련 임계치: parse call 횟수
    i_buffer_gets_th Integer >=0 10,000 SQL 관련 임계치: buffer get 횟수
    i_session_id Valid sid 0 (no 세션단위의 성능 정보를 수집하기
    from session) 위한 대상 session id
    v$session
    i_modify_parameter True, False False 파라미터를 앞으로의 snapshot에서도
    계속 사용하기 위해 저장할 지 여부
    =============================================================================
    2. 수집되는 데이터의 양을 지정하는 방법
    1) Snapshot 레벨
    패키지에 의해 수집되는 데이터 양은 snapshot 레벨에 따라 조정된다.
    다시 말해 지정된 레벨은 수집될 데이터의 양을 결정한다.
    Level >= 0     일반적인 성능 통계
         수집되는 통계 정보:
         0 이상의 모든 레벨에서는 일반적인 성능 관련 통계 정보가
         수집된다. 여기에는 wait statistics, system event,
         system statistics, rollback segment 데이터, row cache, SGA,
    background event, session event, lock statistics,
         buffer pool statistics, parent latch statistics 등이 포함된다.
    Level >= 5     추가적인 데이터 : SQL 문자
         이 레벨에서는 하위 레벨에서 수집되는 모든 데이터 이외에도
         추가적으로, 자원을 많이 사용하는 SQL 문장과 관련된 성능
         정보를 수집한다.
         SQL 관련 '임계치'
         statspack에 의해 수집되는 SQL 문장은 미리 지정된 다음
         조건 중 하나라도 넘을 경우 수집된다.
         - SQL 실행 횟수                (기본값 100 )
         - SQL 처리시 발생하는 disk read      (기본값 1,000 )
         - SQL parse call 횟수           (기본값 1,000 )
         - SQL 처리시 발생하는 buffer gets      (기본값 10,000)
         위에 나열된 각각의 임계치는 어떤 SQL 관련 정보를 수집할
         것인지를 결정하는 데 사용된다. 위에 언급된 임계치 가운데
         하나라도 넘는 SQL 문장과 관련된 정보가 snapshot을 처리
         하는 동안 수집된다.
         SQL 임계치 레벨 각각은 stats$statspack_parameter 테이블에
         저장되어 있거나, snapshot 수집 당시 파라미터에 의해 지정
    가능하다.
    2) snapshot SQL 임계치
    레벨 이외에도 추가적으로 구성 가능한 파라미터가 있다. 이 파라미터들은
    SQL 수집 시 사용되는 임계치들로, 임계치를 넘어서는 모든 SQL 문장들이
    수집된다.
    snapshot level 및 패키지에 의해 사용되는 임계치 관련 정보는
    stats$statspack_parameter 테이블에 저장된다.
    3) snapshot level과 SQL 관련 임계치 값을 변경하는 방법
    snapshot 수집 작업 시 사용되는 기본 파라미터 값은 조정 가능하며,
    이 값을 조정함으로써 인스턴스에 미치는 부하를 줄이면서, 원하는
    수준의 정보를 수집할 수 있다.
    * snapshot을 받아내변서, 새로운 값을 데이터베이스에 저장
    ( statspack.snap 호출 시, i_modify_parameter 변수 값을 지정 )
    SQL> execute statspack.snap -
    (i_snap_level=>10, i_modify_parameter=>'true');
    i_modify_parameter 를 true로 지정하면, 이 값이 stats$statspack_parameter
    테이블에 저장되며; 이 값이 이후 실행되는 snapshot에 사용된다.
    i_modify_parameter 값을 false로 지정하거나 생략하면, 해당
    snapshot 작업에만 지정된 정보가 사용되며, 이후 작업에는
    stats$statspack_parameter 에 지정된 값을 사용하여 작업이 수행된다.
    * snapshot 수행을 하지 않고 기본값을 바꾸기 위해서는
    statspack.modify_statspack_parameter 프로시져를 사용한다.
    예를 들어 snapshot level을 10으로 변경하고, SQL 관련 임계치 가운데
    buffer_gets, disk_reads 값을 변경하고자 할 때 다음과 같이 한다.
    SQL> execute statspack.modify_statspack_parameter -
    (i_snap_level=>10, i_buffer_gets_th=>10000, i_disk_reads_th=>1000);
    이 프로시져를 수행시키면, snapshot 수행 없이, 변경 사항이
    계속해서 남게 된다.
    modify_statspack_parameter 프로시져에 지정 가능한 전체 파라미터의
    전체 목록은 snap 프로스져와 동일하다.
    4) Session ID 지정
    특정 세션과 관련된 정보를 수집하고자 할 경우, StatsPack 호출 시
    세션 id 지정이 가능하다. 세션과 관련해서 수집되는 정보에는
    세션 통계, 세션 이벤트, lock activity 등이 있다. 기본적으로는
    세션 레벨의 통계는 수집하지 않게 되어 있다.
    SQL> execute statspack.snap(i_session_id=>3);
    3. StatsPack snapshot 수집의 자동화
    일중, 주간, 년간 정보를 비교하기 위해서는, 일정 기간 동안 수집된
    여러 개의 snapshot 정보가 필요하다. 애플리케이션이나 데이터베이스의
    성능 관련 특성을 파악하기 위해서는 최소한 두 개의 snapshot 정보가 필요
    하다.
    snapshot을 수집하는 최선의 방법은, 일정 주기로 snapshot 수집을
    자동화시키는 것이다. 이를 위해 2가지 방법을 사용할 수 있다.
    - 데이터베이스가 제공하는 dbms_job 프로시져를 사용하여 snapshot
    수집 작업을 스케쥴러에 등록한다.
    - OS 시스템 유틸리티( unix의 cron 이나 NT 의 at 명령 )를 사용하여
    snapshot을 스케쥴러에 등록한다.
    1) DBMS_JOB 패키지를 사용한 StatsPack snapshot 작업의 자동화
    오라클 내부적으로 통계정보 수집을 자동화하고자 한다면, dbms_job
    패키지를 사용하면 된다. 샘플은 oracle 8.1.6의 경우 $ORACLE_HOME/rdbms/admin/statsuato.sql
    ( 8.1.7이상은 $ORACLE_HOME/rdbms/admin/spauto.sql) 에 들어 있으며,
    매 시간 마다 snapshot을 등록하는 예제이다.
    dbms_job을 사용하여 snapshot을 자동화시키기 위해서는, init 파일의
    job_queue_processes 파라미터가 0 이상이어야만 한다.
    init<SID>.ora 예제:
    # Set to enable the job queue process to start. This allows dbms_job
    # to schedule automatic statistics collection using STATSPACK
    job_queue_processes=1
    OPS 환경에서 statsauto.sql 을 사용한다면, statsauto.sql 스크립트는
    클러스터 내의 모든 인스턴스에서 한번 씩 수행되도록 하여야 한다.
    마찬가지로 job_queue_processes 파라미터 값도 모든 인스턴스에서
    0 이상의 값으로 지정되어 있어야 한다.
    dbms_job에 대한 자세한 사용방법은 <bulletin:10707> 를 참조한다.
    2) OS 시스템 유틸리티를 사용한 StatsPack snapshot 작업의 자동화.
    unix의 cron에 등록하는 방법은 <bulletin:10906>을, NT 의 at 명령을 사
    용하는 방법은 <bulletin: 11618> 을 참조한다.
    4. 통계정보 수집 주기의 변경 방법
    통계정보 수집 주기를 변경하기 위해서는 dbms_job.interval 프로시져를
    사용한다.
    예.
    execute dbms_job.interval(1,'SYSDATE+(1/48)');
    위에서 SYSDATE+(1/48) 는 통계정보가 1/48 일에 한번씩 ( 매 30분 마다)
    수집되도록 지정한 예이다.
    job이 즉시 실행되도록 하기 위해서는
    execute dbms_job.run(<job number>);
    job을 스케쥴러에서 제거하기 위해서는
    execute dbms_job.remove(<job number>);
    5. STATSPACK의 삭제 및 snapshot 데이타 제거 방법.
    1) Statspack 삭제
    Statspack 환경 삭제를 위해서는 oracle 8.1.6의 경우는 statsdrp.sql을
    oracle 8.1.7 이상의 경우는 spdrop.sql을 수행한다.
    cd $ORACLE_HOME/rdbms/admin
    SQL> connect / as sysdba
    SQL> @statsdrp
    2) Snapshot 데이타 제거
    불필요한 snapshot 데이타를 제거하기 위해서 oracle 8.1.7부터는
    sppurge.sql과 sptrunc.sql을 제공한다.
    특정 구간 사이의 snapshot정보를 제거하려면 sppurge.sql을 수행한다.
    이 script를 수행하면 삭제할 시작과 끝의 snapshot id를 지정하게 되며 지정
    된 구간의 snapshot 데이타가 제거된다.
    모든 snapshot 정보를 삭제하려면 sptrunc.sql을 수행한다.
    cd $ORACLE_HOME/rdbms/admin
    sqlplus perfstat/perfstat
    SQL> @sptrunc
    Example
    none
    Reference Documents
    <Note:94224.1>
    <Note:149121.1>

  • Problem in DBMS_JOB

    Hi All,
    I have problem while executing the job. I am able to submit the job but when the job is triggered I am encountering the error given below.
    Pocedure:
    create or replace procedure test_jj is
    V_date date;
    begin
    v_date := null;
    exception
    when others then
    null;
    end test_jj;
    Job script:
    declare
    v_jb_no number;
    begin
    sys.dbms_job.submit(job => v_jb_no,
    what => 'begin test_jj; exception when others then null; end;',
    next_date => sysdate,
    interval => 'sysdate+10/(24*60*60)');
    commit;
    end;
    Error:
    Errors in file /u01/app/oracle/product/9.2.0.6/rdbms/log/orandr_ora_13285.trc: ORA-12012: error on auto execute of job 492 ORA-22286: insufficient privileges on file or directory to perform FILEEXISTS operation ORA-06512: at "SYS.DBMS_LOB", line 485 ORA-06512: at line 13 Wed Feb 22 12:18:02 2006 Errors in file /u01/app/oracle/product/9.2.0.6/rdbms/log/orandr_ora_13283.trc: ORA-12012: error on auto execute of job 494 ORA-22286: insufficient privileges on file or directory to perform FILEEXISTS operation ORA-06512: at "SYS.DBMS_LOB", line 485 ORA-06512: at line 13
    Kindly advice me
    Regards,
    Jaggy

    No specific grant needed. By default public has execution right on DBMS_JOB.
    Example:SQL> create user user1 identified by user1;
    User created.
    SQL> grant create session to user1;
    Grant succeeded.
    SQL> connect user1/user1
    Connected.
    SQL> declare
      2     i       integer;
      3  begin
      4      DBMS_JOB.Submit( i, 'begin NULL; end;', SYSDATE+(1/24/60) );
      5     commit;
      6  end;
      7  /
    SQL> select job, what from user_jobs;
           JOB WHAT
           843 begin NULL; end;
    .. and after a minute..
    SQL> select job, what from user_jobs;
    no rows selectedThus the bare minimum of a CREATE SESSION is needed to submit a PL/SQL job - not even CREATE PROCEDURE rights are needed.
    Sanity check. Repeat the above. Create a job that has BEGIN NULL; END; as the body. Submit it. Check for errors.

Maybe you are looking for

  • Smartform in background task

    Hi, I have the following code which is a copy of standard program /bev1/vd_bew_lief_background: IF nast-vsztp = 4. CALL FUNCTION 'ZUAM_FMDELNOTE' IN BACKGROUND TASK AS SEPARATE UNIT ELSEIF sy-tcode = VL71 OR sy-tcode = VL02N OR sy-tcode = VL03N. CALL

  • Problem in Graphical message mapping.Need UDF to add array based on some co

    Hi All, I have been struck in message mapping.Below i am explaining it, I have two input array, one array lets call  X [24]                                 [25]                                  [26]                                  [24]              

  • Weird...please help!

    I dont know if this belongs here or the ipod forum but I believe it belongs here because of itunes. Okay, everytime I plug in my ipod to update it, i get this message saying "Itunes has encountered a problem and needs to close." and when I went to se

  • Best Practice for DHCP when Anchoring to a Guest Wireless LAN Controller

    Hi all, I'm interested in the communities opinion in relation to DHCP provisioning when using auto-anchor/guest tunneling. As far as I can tell, one cannot use the internal DHCP on the anchor controller when using auto-anchor due to incompatibility b

  • PC to MAC registration

    Recently purchased Lightroom 5 and installed the disc on a WINDOWS PC, I now have a Macbook and would like to run Lightroom on the Mac. How can I do this? I am aware I need to do a download, how do I get it registered without having to pay for a seco