Uploaded image for project: 'SET - Setups'
  1. SET - Setups
  2. SET-76

SQL scripts to alter SCHEDULER_MON_SYSNOTIFICATIONS and SCHEDULER_MON_NOTIFICATIONS should work for Oracle too

    XMLWordPrintable

Details

    Description

      Current Situation

      The SQL scripts

      • ./db/oracle/scheduler_mon_sysnotifications_alter.sql
      • ./db/oracle/scheduler_mon_notifications_alter.sql
        to alter tables SCHEDULER_MON_SYSNOTIFICATIONS and SCHEDULER_MON_NOTIFICATIONS doesn't work for Oracle because fields are added with NOT NULL constraint.
        scheduler_mon_notifications_alter.sql
        ALTER TABLE SCHEDULER_MON_NOTIFICATIONS ADD "RETURN_CODE" NUMBER(9) NOT NULL;
        UPDATE SCHEDULER_MON_NOTIFICATIONS SET "RETURN_CODE" = "ERROR";
        

      Desired Behavior

      Above tables should be updated (see workaround).

      Workaround

      Use an oracle client and execute the following sql manually

      alter SCHEDULER_MON_NOTIFICATIONS
      ALTER TABLE SCHEDULER_MON_NOTIFICATIONS ADD "RETURN_CODE" NUMBER(9) NULL;
      UPDATE SCHEDULER_MON_NOTIFICATIONS SET "RETURN_CODE" = "ERROR";
      ALTER TABLE SCHEDULER_MON_NOTIFICATIONS MODIFY "RETURN_CODE" NUMBER(9) NOT NULL;
      
      alter SCHEDULER_MON_SYSNOTIFICATIONS
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS ADD "OBJECT_TYPE" NUMBER(9) NULL;
      UPDATE SCHEDULER_MON_SYSNOTIFICATIONS SET "OBJECT_TYPE" = 0;
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS MODIFY "OBJECT_TYPE" NUMBER(9) NOT NULL;
      
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS ADD "RETURN_CODE_FROM" VARCHAR(100) NULL;
      UPDATE SCHEDULER_MON_SYSNOTIFICATIONS SET "RETURN_CODE_FROM" = '*';
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS MODIFY "RETURN_CODE_FROM" VARCHAR(100) NOT NULL;
      
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS ADD "RETURN_CODE_TO" VARCHAR(100) NULL;
      UPDATE SCHEDULER_MON_SYSNOTIFICATIONS SET "RETURN_CODE_TO" = '*';
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS MODIFY "RETURN_CODE_TO" VARCHAR(100) NOT NULL;
      
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS ADD "CURRENT_NOTIFICATION" NUMBER(9) NULL;
      UPDATE SCHEDULER_MON_SYSNOTIFICATIONS SET "CURRENT_NOTIFICATION" = "NOTIFICATIONS";
      ALTER TABLE SCHEDULER_MON_SYSNOTIFICATIONS MODIFY "CURRENT_NOTIFICATION" NUMBER(9) NOT NULL;
      
      CREATE INDEX SCHEDULER_MSN_O_T ON SCHEDULER_MON_SYSNOTIFICATIONS("OBJECT_TYPE");
      CREATE INDEX SCHEDULER_MSN_RC  ON SCHEDULER_MON_SYSNOTIFICATIONS("RETURN_CODE_FROM","RETURN_CODE_TO");
      

      Attachments

        Activity

          People

            re Robert Ehrlich
            oh Oliver Haufe
            Uwe Risse Uwe Risse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified