1 Reply Latest reply on May 2, 2019 1:35 PM by thatJeffSmith-Oracle

    DBMS_SCHEDULER credential set to null when job is edited

    MartinKlierDBA

      Dear experts,

       

      when we edit an existing job with SQL Developer 18.4, it always adds a "dbms_scheduler.set_attribute_null() for the credential_name to the SQL statement that's executed, rendering the job unusable.

      Database: 18c XE

       

      Like this:

      image005.png

      That's our build:

      image001-3.png

       

       

      Reproduction:

       

      BEGIN

        DBMS_CREDENTIAL.create_credential(

          credential_name => 'BACKUP_CRED',

          username        => 'oracle',

          password        => 'xxx'          <--(password of your oracle OS user here)

        );

      END;

      /

       

       

      BEGIN

      sys.dbms_scheduler.create_job(

      job_name => '"SYS"."DB_BACKUP"',

      job_type => 'BACKUP_SCRIPT',

      job_action => 'connect target /

      spool log to "/home/oracle/rman/log/db_backup.runlog" append;

      set echo on;

      show all;

      list incarnation;

      run {

        backup as compressed backupset database;

        backup as compressed backupset archivelog all delete all input;

        backup as backupset current controlfile spfile;

        report obsolete;

        delete noprompt obsolete;

      }

      spool log off;

      host "mv -f /home/oracle/rman/log/db_backup.runlog /home/oracle/rman/log/db_backup.$(date +%Y%m%d_%H%M%S).log";',

      repeat_interval => 'FREQ=DAILY;BYHOUR=23;BYMINUTE=0;BYSECOND=0',

      start_date => systimestamp at time zone 'EUROPE/BERLIN',

      job_class => 'DEFAULT_JOB_CLASS',

      comments => 'blah',

      auto_drop => FALSE,

      credential_name => 'BACKUP_CRED',

      enabled => TRUE);

      END;

      /

       

       

      What's my mistake here?

       

      Thank you

      Martin Klier