Running Sybase ISQL scripts from windows batch file

Posted by user1328709 on Stack Overflow See other posts from Stack Overflow or by user1328709
Published on 2012-11-23T16:41:40Z Indexed on 2012/11/23 17:05 UTC
Read the original article Hit count: 353

Filed under:
|
|

I have already researched on this site as well as on google extensively for this. I have created a number of batch files that perform certain automated transactions(backups etc) on our production database.

i want to further simplify my end of day processes by taking the dumps using a script that accepts input of some parameters. the script is able to login the isql prompt but unable to do the execution of the commands.

  @ECHO ***Started***
  @ECHO Enter MonthDay(MMDD)

   SET /p md=
  @ECHO  %md%

  mkdir \\10.20.1.17\arch\212%md%_banking
   set run=isql -Uuser -SORBITS -Ppass 
   %run%
   @echo dump database banking to '/media/newArch/212%md%_banking/212%md%EOD_banking.dmp' with compression=5  
   @echo dump database master to '/media/newArch/212%md%_banking/212%md%EOD_master.dmp'
   @echo go
    pause

I have been unsuccessful at putting these in a separate script file because the script itself uses a passed parameter.

Please give me hints and links to
Thanks

© Stack Overflow or respective owner

Related posts about batch

Related posts about sybase