Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_scheduler invalid name identifer too long

user13283765Dec 3 2013 — edited Dec 3 2013

Hello All,

I'm using Oracle 11gR2 and I'm creating a dbms_schduler_job. I want to have a unique job name everytime its executed.

The documentation states job_name as varchar2(100):

TYPE job_definition IS OBJECT (

  job_name VARCHAR2(100),

  job_class VARCHAR2(32),

  job_style VARCHAR2(11),

  program_name VARCHAR2(100),

  job_action VARCHAR2(4000),

  job_type VARCHAR2(20),

  schedule_name VARCHAR2(65),

  repeat_interval VARCHAR2(4000

The name i'm generating is: REMOTE_UNIX_COMMAND_JOB_245663051543. But then I get the error

ORA-27452: REMOTE_UNIX_COMMAND_JOB_245663051543 is an invalid name for a database object.

ORA-00972: identifier is too long

ORA-06512: at "SYS.DBMS_ISCHED", line 124

ORA-06512: at "SYS.DBMS_SCHEDULER", line 271

ORA-06512: at line 33

27452. 00000 -  "%s is an invalid name for a database object."

*Cause:    An invalid name was used to identify a database object.

*Action:   Reissue the command using a valid name.

What am I doing wrong.

vJobName := 'REMOTE_UNIX_COMMAND_JOB_'|| to_char(SYSDATE,'JSSSSS');

[...................................]

DBMS_SCHEDULER.create_job(

    job_name             => vJobName,

    job_type             => 'EXECUTABLE',

    number_of_arguments  => 1,

    job_action           => '/home/oracle/scripts/'||vRemoteFile1,

    auto_drop            => FALSE,

    enabled              => FALSE);

Thanks ina dvance for any asistance.

JS

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2013
Added on Dec 3 2013
5 comments
2,900 views