Dbms_job
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Dbms_job

Hybrid View

  1. #1
    Join Date
    Jan 2002
    Posts
    474

    Dbms_job

    HI all,

    If I have the following job to be scheduled to run, can I add another DBMS_UTILITY to analyze for the second schema let say TEST2 ???

    var j number
    begin
    dbms_job.submit
    (
    :j,
    'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''TEST1'',''COMPUTE'');',
    SYSDATE,
    'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/12'
    );
    COMMIT;
    end;

    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    var j number
    begin
    dbms_job.submit
    (
    :j,
    'begin
    SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''TEST1'',''COMPUTE'');
    SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''TEST2'',''COMPUTE'');
    end;',
    SYSDATE,
    'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/12'
    );
    COMMIT;
    end;

    ... or just submit two jobs, of course.

    By the way you should be using DBMS_STATS, not DBMS_UTILITY
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Jan 2002
    Posts
    474
    Slimdave,

    can you show me how to use Dbms_stats???
    Thanks

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width