====== pears.MainBackupProcTTS ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create procedure "pears"."MainBackupProcTTS"() begin declare "ValidText" long varchar; declare "LogText" long varchar; declare "FailureCode" char(20); declare "NewLine" char(2); return; set "NewLine" = "char"(13)+"char"(10); set "FailureCode" = '00000'; select "validationresults"() into "validtext"; set "logtext" = 'Validation: '+"isnull"("validtext",'')+"newline"+'Backup: '; commit work; begin backup database directory 'D:\\IQXDBBackup\\SQLA16BlankDB\\TTS' transaction log truncate // Edit here as appropriate exception when others then set "FailureCode" = sqlstate end; if "failurecode" = '00000' then set "logtext" = "logtext"+'Successfully Completed' else set "logtext" = "logtext"+"string"('Failed with error ',"failurecode") end if; insert into "iqbackuplog"( "timecompleted","description" ) values( current timestamp,"logtext" ) end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."MainBackupProcTTS" IS {create PROCEDURE pears."MainBackupProcTTS"() begin declare "ValidText" long varchar; declare "LogText" long varchar; declare "FailureCode" char(20); declare "NewLine" char(2); return; set "NewLine" = "char"(13)+"char"(10); set "FailureCode" = '00000'; select "validationresults"() into "validtext"; set "logtext" = 'Validation: '+"isnull"("validtext",'')+"newline"+'Backup: '; commit work; begin backup database directory 'D:\\IQXDBBackup\\SQLA16BlankDB\\TTS' transaction log truncate // Edit here as appropriate exception when others then set "FailureCode" = sqlstate end; if "failurecode" = '00000' then set "logtext" = "logtext"+'Successfully Completed' else set "logtext" = "logtext"+"string"('Failed with error ',"failurecode") end if; insert into "iqbackuplog"( "timecompleted","description" ) values( current timestamp,"logtext" ) end }