Skip to Content
0
Former Member
Oct 06, 2006 at 10:14 AM

Backu scripts on windows using batch scripts

411 Views

Hi all,

I am writing a batch file to take a backup of NW04 and NW04s on Windows with Database. I have executed the same

successfully on linux using shell scripts.But I am unable to execute some of the DB commands that I could execute on shell.They are as follows..

echo "#MaxDB backup commands to backup database instance"

#medium_cmd="medium_put $SID"_"$SUFFIX /sapdata/backup/$SID"_"$SUFFIX.DB FILE DATA"

medium_cmd="medium_put $SID"_"$SUFFIX $SID"_"$SUFFIX.DB FILE DATA"

echo $medium_cmd

backup_cmd="backup_start $SID"_"$SUFFIX DATA"

echo $backup_cmd

echo "executing complete data backup..."

_o=`cat <<EOF | dbmcli -d $SID -u control,control -uUTL

db_admin

util_connect

$medium_cmd

$backup_cmd

db_online

EOF`

the varaible like SID are taken from the user. Now I am not able to execute the same using DOS. My question is how to execute the DB commands as a single commands. Please help me as It is of high priority.

Thanks a heap in advance.