Using DBMS_Scheduler Package

Hi All,
I am on the way to use Oracle's Scheduler component. Please guide me how to associate a job or job class with a window or window group.
Job classes are used for prioritizing jobs and group jobs which have common resource requirements. Similarly, windows are used for automatically switching resource plans.
Now I am confused how can I attach my jobs (and job classes) with a window.
Is window associated with the help of schedules ?
Thnks and Regards,
Neeraj

Hi.
Using DBMS_SCHEDULER.CREATE_JOB creates the job. You can assign a schedule to the job when it is created. The inparameter schedule_name is used. When creating the window, the procedure dbms_scheduler.create_window takes some in parameters. One of these is Schedule_name. So Job is connected to a schedule and a schedule is connected to a window.
Hopes this helps.
rgds
Kjell

Similar Messages

  • Submitting Oracle job via OCCI using dbms_job package

    I am using 10g client to connect to a 9i Database on Redhat Linux AS 3.0.
    I am trying to submit a job via OCCI. I get back a jobId, but don't see the job in the user_jobs table or the result of the job being executed.
    I am using occi::Statement in the following way :
    stmt = connection->createStatement("begin dbms_job.submit(:v1, 'submitJobTest;', sysdate,'sysdate+1'); end;");
    // where submitJobTest is a stored procedure
    stmt->registerOutParam(1, OCCIINT);
    stmt->executeUpdate();
    int jobId = stmt->getInt(1);
    I get back a job id, but can't find it in the user_jobs. The first time I executed the program, i got back jobId 0, then 1 and so on..
    Any ideas? Do I need to use dbms_scheduler package?
    Thanks, Nilofer

    Good catch!
    Had a bug, in that my autocommit was not being set!
    Works now.
    Thanks,
    Nilofer

  • Error creating job into trigger using DBMS_SCHEDULER.

    Hi,
    I am trying to create job using dbms_scheduler package. I have one trigger on insert event on one table. I am creating job using following syntax.
    CREATE OR REPLACE TRIGGER TRG_BI_JOB_CONFIG BEFORE INSERT ON JOB_CONFIG FOR EACH ROW
    DECLARE
    BEGIN
         DBMS_SCHEDULER.Create_Job(job_name => 'my_job1'
                             ,job_type => 'PLSQL_BLOCK'
                             ,job_action => 'delete_temp'
                             ,start_date => TO_DATE('15-JUL-2003 1:00:00 AM', 'dd-mon-yyyy hh:mi:ss PM')
                                  ,repeat_interval => 'FREQ=DAILY'
                             ,enabled => TRUE
                             ,comments => 'DELETE FOR job schedule.');
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END;
    but I am getting following error while inserting into JOB_CONFIG table.
    ORA-04092: cannot in a trigger
    ORA-06512: at "PRAKASH1.TRG_BI_JOB_CONFIG", line 41
    ORA-04088: error during execution of trigger
    same above statement If I am running from sqlplus then It is creating job without error. If I am creating job using DBMS_JOB into trigger then It is also working fine but this package is depricated from oracle10g so I cannt use it any more.
    My Oracle version is 'Oracle DATABASE 10g RELEASE 10.2.0.1.0 - Production'.
    can anyone help me in this context.

    I have a few comments on this thread as an Oracle dbms_scheduler developer.
    - Oracle takes backward compatibility very seriously. Although dbms_job is deprecated, the interface will continue to work indefinitely. The deprecation of dbms_job is so that customers will be encouraged to take advantage of the more powerful dbms_scheduler. It is extremely unlikely that entire blocks of functionality will ever be removed. There is currently no plan to remove dbms_job functionality (and even if there were, doing so would be strenuously opposed by many users).
    - lots of internal Oracle database components are standardizing on using dbms_scheduler (resource manager, materialized views, auto sql tuning etc). This is good evidence that it will continue to be the recommended scheduling method for the foreseeable future - not even the concept of a replacement exists. It is also under active development.
    - The reason for the automatic commit is that a dbms_scheduler job is a full database object like a stored procedure or a table. So a call to dbms_scheduler.create_job is like executing a DDL which takes effect immediately. A dbms_job job is mostly just a row in a table so a call to dbms_job.submit behaves like regular DML. There are many advantages to a job being a full database object but DDL behaviour is an unfortunate requirement of this.
    Hope this clears a few things up, reply with any questions.
    -Ravi

  • Building pages to use dbms_scheduler like in OEM, is it a good idea?

    In OEM, there's already full featured web pages to administrate scheduler objects, sometimes, OEM is very heavy in load, during my first testing, it even make my db server hang, run out of swap. But I try to build a simple page to submit jobs using dbms_scheduler, it works file and quite light weighted.
    So is it a good idea to build scheduler administration pages in Apex? will it be like reinvent a wheel?

    This is what I am trying to do but have run into the 'insufficient privileges' problem. I am actually trying to give our users the ability to schedule some of the jobs associated with their application. I've been able to submit a job through Toad under the schema used by the application. But I'm not sure whether I need to grant the appropriate privileges to run the scheduler package to the flows schema as well. I have also been able to schedule the job through the SQL Workshop in the APEX application builder, but I can't do it through the application. Any suggestions?
    Sue
    Edited by: suewia on Jan 6, 2010 7:14 AM

  • I'm new to using dbms_scheduler. I'm trying out some basic stuff to see how it works

    I have not used the dbms_scheduler package before and trying out some basic functionality to see and understand how it works. The below code is what I have writtern
    BEGIN
    DBMS_SCHEDULER.create_job(
    job_name => 'Test_Job3',
    job_type =>  'PLSQL_BLOCK',
    job_action => 'BEGIN pr; END;',
    start_date => systimestamp,
    repeat_interval => 'freq=secondly;bysecond=4;',
    end_date => null,
    enabled => true,
    comments => 'This job is test for dbms_scheduler'
    END;
    create procedure pr
    is
    begin
    DBMS_OUTPUT.PUT_LINE('Inside the pr procedure called using scheduler');
    end;
    According to my understanding it should print the line inside the procedure 'pr' every 4 seconds, but I don't see any output being shown. Can someone help me understand what exaclty is wrong with my code. I'm using Toad for oracle.

    One more question - I'm trying to bring in one more functionality. Lets says - There is a job that needs to be executed every month at a particular time. I schedule it, but I want this job to be executed 'n' number of times.
    For example - There is procedure that is called in the scheduler. Since its processes lot of records - I'm breaking down in chunks of data - Say 5 chunks. Now when its scheduled each month at a particular time - it should ideally execute 5 times in order to complete the job for that month. How can this be achieved ? I thought of using max_runs, but that might end the job and never repeat it again.

  • How to run the job using DBMS_SCHEDULER

    How to run the job using DBMS_SCHEDULER
    pleas give some sample Iam very new to DBMS_SCHEDULER

    Hi
    DBMS_SCHEDULER
    In Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.
    With DBMS_SCHEDULER Oracle procedures and functions can be executed. Also binary and shell-scripts can be scheduled.
    Rights
    If you have DBA rights you can do all the scheduling. For administering job scheduling you need the privileges belonging to the SCHEDULER_ADMIN role. To create and run jobs in your own schedule you need the 'CREATE JOB' privilege.
    With DBMS_JOB you needed to set an initialization parameter to start a job coordinator background process. With Oracle 10g DBMS_SCHEDULER this is not needed any more.
    If you want to user resource plans and/or consumer groups you need to set a system parameter:
    ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
    Baisc Parts: Job
    A job instructs the scheduler to run a specific program at a specific time on a specific date.
    Programs
    A program contains the code (or reference to the code ) that needs to be run to accomplish a task. It also contains parameters that should be passed to the program at runtime. And it?s an independent object that can referenced by many jobs
    Schedules
    A schedule contains a start date, an optional end date, and repeat interval with these elements; an execution schedule can be calculated.
    Windows
    A window identifies a recurring block of time during which a specific resource plan should be enabled to govern resource allocation for the database.
    Job groups
    A job group is a logical method of classifying jobs with similar characteristics.
    Window groups
    A window groups is a logical method of grouping windows. They simplify the management of windows by allowing the members of the group to be manipulated as one object. Unlike job groups, window groups don?t set default characteristics for windows that belong to the group.
    Using Job Scheduler
    SQL> drop table emp;
    SQL> Create table emp (eno int, esal int);
    SQL > begin
    dbms_scheduler.create_job (
    job_name => 'test_abc',
    job_type => 'PLSQL_BLOCK',
    job_action => 'update emp set esal=esal*10 ;',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=DAILY; INTERVAL=10',
    comments => 'Iam tesing scheduler');
    end;
    PL/SQL procedure successfully completed.
    Verification
    To verify that job was created, the DBA | ALL | USER_SCHEDULER_JOBS view can be queried.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_abc FALSE 0
    Note :
    As you can see from the results, the job was indeed created, but is not enabled because the ENABLE attribute was not explicitly set in the CREATE_JOB procedure.
    Run your job
    SQL> begin
    2 dbms_scheduler.run_job('TEST_abc',TRUE);
    3* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_ABC FALSE 0
    Copying Jobs
    SQL> begin
    2 dbms_scheduler.copy_job('TEST_ABC','NEW_TEST_ABC');
    3 END;
    4 /
    PL/SQL procedure successfully completed. Hope it will help you upto some level..!!
    Regards
    K

  • Updating Target Table using DBMS_Scheduler for every 10 seconds

    Hi All,
    Am new to DBMS_Scheduler Package,
    Based on the examples I have written an anonymous block to create job,,, It needs a correction in repeat_interval value,
    I have two table emp (Source) and sk_emp (Target),
    I want sk_emp table to be update for every 10 seconds,
    CREATE PROCEDURE sk_insert_records
    IS
    BEGIN
       MERGE INTO sk_emp se
          USING emp e
          ON (e.empno = se.empno)
          WHEN MATCHED THEN
             UPDATE
                SET se.ename = e.ename, se.job = e.job, se.mgr = e.mgr,
                    se.hiredate = e.hiredate, se.sal = e.sal, se.comm = e.comm,
                    se.deptno = e.deptno
                WHERE se.empno = e.empno
          WHEN NOT MATCHED THEN
             INSERT (empno, ename, job, mgr, hiredate, sal, comm, deptno)
             VALUES (e.empno, e.ename, e.job, e.mgr, e.hiredate, e.sal, e.comm,
                     e.deptno);
    END;I have written the above procedure and below is my anonymous block of dbms_scheduler
    BEGIN
       DBMS_SCHEDULER.create_job (job_name              => 'empdetails',
                                  job_type                 => 'STORED_PROCEDURE',
                                  job_action               => 'ngshare.sk_insert_records',
                                  number_of_arguments      => 0,
                                  start_date               => TRUNC (SYSDATE),
                                  repeat_interval          => 'FREQ=DAILY;BYSECOND=10',
                                  end_date                 => NULL,
                                  job_class                => 'DEFAULT_JOB_CLASS',
                                  enabled                  => TRUE,
                                  auto_drop                => FALSE,
                                  comments                 => 'DONE BY SUNIL'
    END;Can you please let me know the solution,,
    if my repeat_interval is correct, can you please let me know what else need to be done,
    This is my Version
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionThanks for your help
    Edited by: NSK2KSN on Jul 26, 2010 11:06 AM

    Hi It's working, Problem was in repeat_interval it's working now,
    Thanks,
    I changed
      repeat_interval          => 'FREQ=DAILY;BYSECOND=10',to
      repeat_interval          => 'FREQ=SECONDLY;BYSECOND=10',Thanks,
    Edited by: NSK2KSN on Jul 26, 2010 11:14 AM

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to delete data from a file using IO package

    Hi All,
    i am trying to remove some content of the file.
    this content is not at starting of file not even at end of file.
    can anybody tell me how can i delete number of lines from file using IO package.

    iam having some data in text file .ex:in flowrist.txt
    12/5/07,500,300,6000 like many set of datas are
    there.In these if i want to delete the data based on
    the date which i specified.How to do this specific
    deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
    Take a look below at this example found on Google.
    http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
    The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse.

  • Help finding and using a package

    hi guyz,
    Iam new to this forum and i need this info urgently. so plz try to help me.
    I want to use the package below in an applet to convert my TemporaryRegistrationPermit to create a PNG file and then print it.
    how can i get the above package. I searched a lot on net and even on IBM website but never found it. How can i get it and include the class file in an applet and use the methods in it.Is there any other way to include this package in my applet, i mean a URL pointing to this class file.
    package com.ibm.gs.houston.saz.trp.utils.TemporaryRegistrationPermit
    I would really appreciate an early reply
    thank you
    tarun

    How do you know you need this package ? You know the path to it, so you must have seen it referenced somewhere.
    Some background please, but it sounds like it's an IBM internal class of some sort, so I wouldn't get your hopes up unless you have legitimate access to this or know it to be freely available.
    D.

  • Stored Proc running twice using DBMS_Scheduler

    Hello all,
    I have a vb front end that calls a main stored proc which submits scheduler jobs to execute several stored procs asynchronously. Everything is working, except the part that the several stored procs are running twice. In the troubleshooting, I have eliminated the front end from being the culprit and the stored procs themselves. Essentially, when I call the stored proc using dbms_scheduler.create_job, it runs twice, even manually. I am about at wits end trying to figure out why: Using Oracle 11gR2
    I started off setting up the programs
    begin
    --create program
    dbms_scheduler.create_program
    ( program_name => 'prog_name'
    ,program_type => 'STORED_PROCEDURE'
    ,program_action => 'usp_sub_proc_1'
    ,number_of_arguments => 8
    ,enabled => FALSE
    dbms_scheduler.DEFINE_PROGRAM_ARGUMENT
    ( program_name=> 'prog_name'
    ,argument_position=>1
    ,argument_name => 'name'
    ,argument_type=>'VARCHAR2'
    /*the remaining 7 arguments are in code but not display for space reasons*/
    dbms_scheduler.enable('prog_name');
    end;Then the main stored proc executes this code:
    declare v_job_name varchar2(100);
        v_1 varchar(50) := 'All';
        v_2 varchar(50) := 'All';
        v_3 varchar(50) := 'All';
        v_4 varchar(50) := 'All';
        v_5 varchar(50) := 'TEST';
        i_6 integer := 1;
        v_7 varchar(50) := 'TEST_NE';
        ts_8 timestamp := current_timestamp;
    begin
        v_job_name := 'uj_dmo_1';
    dbms_scheduler.create_job (v_job_name
                                            ,program_name => 'prog_name'
                                            ,job_class => 'UCLASS_1'
                                            ,auto_drop => TRUE
    --set parameters
    dbms_scheduler.set_job_argument_value(v_job_name,1, v_1);
    dbms_scheduler.set_job_argument_value(v_job_name,2, v_2);
    dbms_scheduler.set_job_argument_value(v_job_name,3, v_3);
    dbms_scheduler.set_job_argument_value(v_job_name,4, v_4);
    dbms_scheduler.set_job_argument_value(v_job_name,5, v_5);
    dbms_scheduler.set_job_argument_value(v_job_name,6, to_char(i_6));
    dbms_scheduler.set_job_argument_value(v_job_name,7, v_7);
    dbms_scheduler.set_job_argument_value(v_job_name ,8, to_char(ts_8));
    --enable job
    dbms_scheduler.enable(v_job_name);
    --execute job
    dbms_scheduler.run_job(job_name => v_job_name , use_current_session => FALSE);
    end;
    ...And this is where I get the double execution of the job, but I am just not seeing it in my syntax, dba_scheduler_jobs, logging, etc. Any help is greatly appreciated, thanks!!

    Well apparently I will not win any Captain Obvious awards;
    With 34MCA2K2's response with "what doesn't work" for some reason turned the light on. After some more testing here is what I found.
    This code works as expected :
    Exhibit A
    begin
    dbms_scheduler.create_job (job_name =>'TESTER'
                                   ,job_type => 'PLSQL_BLOCK'
                                   ,job_action => 'declare test1 integer := 1; begin test1 := test1 + 5; end;'
                                   ,auto_drop => True
       /*dbms_scheduler.enable('TESTER');   */
       dbms_scheduler.run_job(job_name => 'TESTER', use_current_session =>FALSE);   
    end;As does this:
    Exhibit B
    begin
    dbms_scheduler.create_job (job_name =>'TESTER'
                                   ,job_type => 'PLSQL_BLOCK'
                                   ,job_action => 'declare test1 integer := 1; begin test1 := test1 + 5; end;'
                                   ,auto_drop => True
       dbms_scheduler.enable('TESTER');  
      /*dbms_scheduler.run_job(job_name => 'TESTER', use_current_session =>FALSE);    */
    end;Exhibit A will create the job and is visible in the schedulerjobs view, and the RUN_JOB will execute it even when not enabled, but the pl/sql will not drop the job.
    Exhibit B will create the job and once enabled, executes the job and then drops from schedulerjobs view.
    Therefore, my desired results for running the jobs once asynchronously and dropping immediately is....
    begin
        v_job_name := 'uj_dmo_1';
    dbms_scheduler.create_job (v_job_name
                                            ,program_name => 'prog_name'
                                            ,job_class => 'UCLASS_1'
                                            ,auto_drop => TRUE
    --set parameters
    dbms_scheduler.set_job_argument_value(v_job_name,1, v_1);
    dbms_scheduler.set_job_argument_value(v_job_name,2, v_2);
    dbms_scheduler.set_job_argument_value(v_job_name,3, v_3);
    dbms_scheduler.set_job_argument_value(v_job_name,4, v_4);
    dbms_scheduler.set_job_argument_value(v_job_name,5, v_5);
    dbms_scheduler.set_job_argument_value(v_job_name,6, to_char(i_6));
    dbms_scheduler.set_job_argument_value(v_job_name,7, v_7);
    dbms_scheduler.set_job_argument_value(v_job_name ,8, to_char(ts_8));
    /*enable job*/
    dbms_scheduler.enable(v_job_name);
    /*execute job (Do not execute the code below, it will lead to multiple executions)
    dbms_scheduler.run_job(job_name => v_job_name , use_current_session => FALSE); */
    end;

  • How to print new line using DBMS_OUTPUT package

    Hi,
    I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
    set serveroutput on size 200000
    set feedback on
    BEGIN
    DBMS_OUTPUT.PUT_LINE('First Line');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE('Second Line');
    END;
    I expect following output ...
    First Line
    Second Line
    but i got following output....
    First Line
    Second Line
    why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?

    You can try the following:
    SQL> ED
    Wrote file afiedt.buf
      1  BEGIN
      2  DBMS_OUTPUT.PUT('ONE LINE...');
      3  DBMS_OUTPUT.PUT('SECOND LINE...');
      4  DBMS_OUTPUT.NEW_LINE;
      5  DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
      6  DBMS_OUTPUT.PUT('TEST');
      7  DBMS_OUTPUT.NEW_LINE;
      8  DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
      9  DBMS_OUTPUT.PUT_LINE(CHR(10));
    10  DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
    11* END;
    SQL> /
    ONE LINE...SECOND LINE...
    THIRD LINE WITH NEW LINE...
    TEST
    FOURTH LINE
    EXAMPLE
    FIFTH LINE
    PL/SQL procedure successfully completed.Documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062

  • How do I create and use a package?

    Sorry for the noobish question, but I have never had the need to use a package and currently would like to learn how they work just to satisfy my own curiosity.
    Suppose I have a file named Node.class in a folder named Classes, and I have another class named Main.class sitting in another folder. I want to create a Node object using the Main class.
    How do I accomplish that? Would I need to use a package?
    I tried to write package Classes; on my Main file but it did not work. thanks

    This is an old explanation I wrote:
    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    And a statement to run the program is:
    java myapp.aProgram
    (This can be issued from any directory, as Java will search for the program, starting the search from the classpath directories.)
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

  • Error while invoking webservice using UTL_HTTP package

    Hi All,
    I am invoking a webservice (SOAP Request) from a PL/SQL block using UTL_HTTP package.
    I am able to send the complete request and am getting the required instance on the BPEL Console, but the process is errorring out while getting response back.
    and the PL/SQL Block is ending in error mentioned below:
    ERROR at line 1:
    ORA-29266: end-of-body reached
    ORA-06512: at "SYS.UTL_HTTP", line 1321
    ORA-06512: at "APPS.CSM_BPEL_TEST_PKG", line 34
    ORA-06512: at line 1
    Can anyone let me know what is the cause of this.
    Thanks in advance

    My guess would be that your request is not properly constructed,
    29266, 00000, "end-of-body reached"
    // *Cause:  The end of the HTTP response body was reached.
    // *Action: If the end of the HTTP response is reached prematurely, check if
    //          the HTTP response terminates prematurely.  Otherwise, end the
    //          HTTP response.John

  • Error while defining chain_step using dbms_scheduler.define_chain_step

    Hello,
    I am trying to create a chain_job using dbms_scheduler in <Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit>
    BEGIN
    dbms_scheduler.create_chain (
    chain_name => 'test_chain',
    rule_set_name => NULL,
    evaluation_interval => NULL,
    comments => 'Test chain.');
    END;
    -- Chain Created Successfully
    begin
    dbms_scheduler.create_program (
    program_name => 'test_program',
    program_type => 'PLSQL_BLOCK',
    program_action => 'BEGIN null; END;',
    enabled => TRUE,
    comments => 'Test program.');
    end;
    -- Program Created Successfully
    begin
    dbms_scheduler.define_chain_step (
    chain_name => 'test_chain',
    step_name => 'step_maximum_length_allowed',
    program_name => 'test_program');
    end;
    Error at line 1
    ORA-27465: invalid value STEP_MAXIMUM_LENGTH_ALLOWED for attribute step_name
    ORA-06512: at "SYS.DBMS_ISCHED", line 3912
    ORA-06512: at "SYS.DBMS_ISCHED", line 1452
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1364
    ORA-06512: at line 2
    The step_name length I used above<'step_maximum_length_allowed'> is 27 characters.
    If I use a step_name of length <= 24 characters, the define_chain_step works.
    Question:
    Does this error have to do with the maximum length allowed for step_name. If so, then the error raised should have reflected that.
    Appreciate any help.
    Thanks
    Kumar
    Edited by: 977325 on Jan 10, 2013 12:01 PM
    Edited by: 977325 on Jan 10, 2013 12:01 PM
    Edited by: 977325 on Jan 10, 2013 12:03 PM

    Thanks a lot damorgan for your reply :)
    I have gone through the link you provided. I couldn't find any limits on step naming though.
    Here is the question again with proper with proper formatting.
    I am trying to create a chain_job using dbms_scheduler in <Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit>
    BEGIN
       DBMS_SCHEDULER.create_chain (chain_name            => 'test_chain',
                                    rule_set_name         => NULL,
                                    evaluation_interval   => NULL,
                                    comments              => 'Test chain.');
    END;
    -- Chain Created Successfully
    BEGIN
       DBMS_SCHEDULER.create_program (program_name     => 'test_program',
                                      program_type     => 'PLSQL_BLOCK',
                                      program_action   => 'BEGIN null; END;',
                                      enabled          => TRUE,
                                      comments         => 'Test program.');
    END;
    -- Program Created Successfully
    <code>
    BEGIN
       DBMS_SCHEDULER.define_chain_step (
          chain_name     => 'test_chain',
          step_name      => 'step_maximum_length_allowed',
          program_name   => 'test_program');
    END;
    Error at line 1
    ORA-27465: invalid value STEP_MAXIMUM_LENGTH_ALLOWED for attribute step_name
    ORA-06512: at "SYS.DBMS_ISCHED", line 3912
    ORA-06512: at "SYS.DBMS_ISCHED", line 1452
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1364
    ORA-06512: at line 2Question:
    The step_name length I used above is 27 characters.
    If I use a step_name of length <= 24 characters, the define_chain_step works.
    Does this error have to do with the maximum length allowed for step_name. If so, then the error raised should have reflected that.

Maybe you are looking for

  • Dynamic column change in Alv

    Hello friends,                    Can any1 pls tell me if there is a function module available which can be used for dynamic column change in ALV.                   Pls also elaborate how to use it.....

  • Mail Won't Import All Emails

    I just upgraded from an iMac G4 running 10.3.9 to a SR MacBook Pro with 10.4.9. I used the Migration Assistant to move my mail, but not all of the messages transferred. I also tried copying ~/Library/Mail manually but got the same results. When Mail

  • My Wi-Fi randomly stopped working and will not turn on.

    So one night, I closed all my applications and did the regular routine, "procedures" if you will. The next morning, I turned on my MacBook and the Wi-Fi said it was off, and so I turned it on, but it wouldn't turn on. The little icon would stay at th

  • Rear left sound coming out of front left and ri

    Sound that should be coming out of the rear left speaker is being divided by the front 2 speakers. Anyone know whats going on? i'v tried reinstall windows vista, reinstalling the sound card, made it sure its not the speakers. So i have no idea whats

  • Ant + Junit + html reports question

    Hi, I am successfully creating reports from my test suite, however instead of listing all classes in the left frame of the html report of all test classes included in the suite, it shows the suite class name and when I click on it it lists all 250 or