ADSM-L

Re: [ADSM-L] Returncode for a TDP CMD Script

2009-09-11 06:26:19
Subject: Re: [ADSM-L] Returncode for a TDP CMD Script
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 11 Sep 2009 06:24:57 -0400
Without seeing your script, I suspect that the command that sets the return
code might be running asynchronously rather than synchronously.

I suggest going to the link in my sig and searching on:

   diagnostics for scripts

The first hit might be of use to you.

Best regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Product Development
Level 3 Team Lead
Internal Notes e-mail: Andrew Raibeck/Hartford/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

IBM Tivoli Storage Manager support web page:
http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager.html


The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2009-09-11
04:01:05:

> [image removed]
>
> Returncode for a TDP CMD Script
>
> Stefan Holzwarth
>
> to:
>
> ADSM-L
>
> 2009-09-11 04:02
>
> Sent by:
>
> "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
>
> Please respond to "ADSM: Dist Stor Manager"
>
> 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