This discussion is archived
2 Replies Latest reply: Jan 11, 2013 8:56 AM by 980328 RSS

Error while defining chain_step using dbms_scheduler.define_chain_step

980328 Newbie
Currently Being Moderated
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
  • 1. Re: Error while defining chain_step using dbms_scheduler.define_chain_step
    damorgan Oracle ACE Director
    Currently Being Moderated
    Welcome to the forums.

    Take a look at my demos here:
    http://www.morganslibrary.org/reference/pkgs/dbms_scheduler.html

    Also: Please read the FAQ and learn how to post formatted code listings with
     tags. It will help you get responses.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
  • 2. Re: Error while defining chain_step using dbms_scheduler.define_chain_step
    980328 Newbie
    Currently Being Moderated
    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 2
    Question:
    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points