Icon View Incident Report

Serious Serious
Reported By: Ulrich Doewich
Reported On: 8/6/2008
For: Version 2.01 Build 4
# 2740 Jobs that Call Stored Procedures Cause an AV When Executed

I made a small alteration to my maintenance JOB definition to take advantage of the HOURLY keyword you added, but it results in an AV that repeats every minute until the app/server is stopped.

      if Config.Gen_PrimaryServer then begin
        SQL.Text := 'SELECT * FROM Jobs WHERE Name=' +
                    EDBEngine1.QuotedSQLStr('Maintenance');
        Open; // check if the job already exists
        if RecordCount = 0 then begin
          Close;
          SQL.Clear;
          SQL.Add('CREATE JOB Maintenance');
          SQL.Add('RUN AS "System"');
          SQL.Add('FROM DATE ''2008-01-05'' TO DATE ''2108-01-06''');
          SQL.Add('HOURLY');
          SQL.Add('BETWEEN TIME ''01:00 AM'' AND TIME ''11:59 PM''');
          SQL.Add('BEGIN');
          SQL.Add('   USE RCS;');
          SQL.Add('   CALL ProcPurgeLog;');
          SQL.Add('   CALL ProcGenerateUpdates;');
          SQL.Add('   USE;');
          SQL.Add('END');
          {$IF Defined(DEBUG)}
          AddToLog('creating "Maintenance" job');
          {$IFEND}
          ExecSQL;
          {$IF Defined(DEBUG)}
          AddToLog('  success');
          {$IFEND}
        end
        else begin
          {$IF Defined(DEBUG)}
          AddToLog('"Maintenance" job already exists');
          {$IFEND}
          Close;
        end;
      end
      else begin
        SQL.Text := 'SELECT * FROM Jobs WHERE Name=' +
                    EDBEngine1.QuotedSQLStr('Maintenance');
        Open; // check if the job already exists
        if RecordCount = 0 then begin
          Close;
          SQL.Clear;
          SQL.Add('CREATE JOB Maintenance');
          SQL.Add('RUN AS "System"');
          SQL.Add('FROM DATE ''2008-01-05'' TO DATE ''2108-01-06''');
          SQL.Add('HOURLY');
          SQL.Add('BETWEEN TIME ''01:05 AM'' AND TIME ''11:59 PM''');
          SQL.Add('BEGIN');
          SQL.Add('   USE RCS;');
          SQL.Add('   CALL ProcGetUpdates;');
          SQL.Add('   USE;');
          SQL.Add('END');
          {$IF Defined(DEBUG)}
          AddToLog('creating "Maintenance" job');
          {$IFEND}
          ExecSQL;
          {$IF Defined(DEBUG)}
          AddToLog('  success');
          {$IFEND}
        end
        else begin
          {$IF Defined(DEBUG)}
          AddToLog('"Maintenance" job already exists');
          {$IFEND}
          Close;
        end;
      end;



Comments Comments
The problem was with the CALL statement in a job. The job was not being initialized properly after compilation.


Resolution Resolution
Fixed Problem on 8/7/2008 in version 2.01 build 5


Products Affected Products Affected
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image