ADSM-L

[ADSM-L] Returncode for a TDP CMD Script

2009-09-11 04:04:03
Subject: [ADSM-L] Returncode for a TDP CMD Script
From: Stefan Holzwarth <stefan.holzwarth AT ADAC DOT DE>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 11 Sep 2009 10:01:05 +0200
Hi,

we are using a Windows cmd Script for tdp Backups.
At the TSM Server the schedule is defined as:

tsm: TSMA>q sched tdp sql23full_SERVER33 f=d
            Policy Domain Name: TDP
                 Schedule Name: SQL23FULL_SERVER33
                   Description: FULL Backup SQL DB@23:00
                        Action: Command
                       Options:
                       Objects: c:\adsm32\tdpsql\sqlbackup.cmd
/tdpmode:full
                      Priority: 5


The tdpsql.exe returncode is stored in a variable %tdperror% within the
script sqlbackup.cmd and used for sending an error email. The CMD Job
ends with the line

exit /b %tdperror%   and should return the original error code to the
tsm scheduler.

Sometimes the backup gets an error and the error email is sent
correctly.
But from the tsm server sight the schedule is always successful.

I don't have an idea where to look further.
Instead of using exit /b I used a freeware tool errorlvl.exe to set the
returncode manually - no change in behavior.

Kind regards
Stefan Holzwarth