Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (http://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   .bat file will not completely execute (http://www.kinook.com/Forum/showthread.php?t=2139)

eonlexx 11-08-2006 03:08 PM

.bat file will not completely execute
 
I have a bat file that will backup several Oracle schemas. When I run the bat file from the command line it works fine. However, when I run the bat file from VisualBuild it returns after the first exp command completes. The following is a snipet of the bat file. From VisualBuild execution stops after Datarepository_dev is exported.

:: Make snapshot of Dev milestone DB
%O_BIN%exp Datarepository_dev/Datarepository_dev file=%O_home%\impala\Datarepository_%build%.dmp log=%O_home%\impala\Datarepository_%build%.log owner=Datarepository_dev statistics=none
%O_BIN%exp SystemData_dev/SystemData_dev file=%O_home%\impala\SystemData_%build%.dmp log=%O_home%\impala\SystemData_%build%.log owner=SystemData_dev statistics=none
%O_BIN%exp BusinessData_dev/BusinessData_dev file=%O_home%\impala\BusinessData_%build%.dmp log=%O_home%\impala\BusinessData_%build%.log owner=BusinessData_dev statistics=none

kinook 11-09-2006 08:31 AM

Please ZIP and post or send:
1) The info from Help | About | Install Info
2) The .bld file
3) A build log file

Also, make sure to call the batch file like

%DOSCMD% call "c:\path\to\batchfile.bat"

http://www.visualbuild.com/Manual/programtab.htm

eonlexx 11-09-2006 11:04 AM

Install info
 
Visual Build Professional 6.2
Registered to: Entriq Corporation (2-computer license)
Windows Version: 5.2.3790.1.0
Install path: C:\Program Files\VisBuildPro6
SftTree_IX86_U_50.dll version 5.05
unins000.exe version 51.42.0.0
VisBuildCmd.exe version 6.2.0.0
VisBuildPro.exe version 6.2.0.0
VisBuildBld.dll version 6.2.0.0
VisBuildBurn.dll version 6.2.0.0
VisBuildCore.dll version 6.2.0.0
VisBuildDotNET.dll version 6.2.0.0
VisBuildExt.dll version 6.2.0.0
VisBuildLog.dll version 6.2.0.0
VisBuildMisc.dll version 6.2.0.0
VisBuildMS.dll version 6.2.0.0
VisBuildMS2.dll version 6.2.0.0
VisBuildNet.dll version 6.2.0.0
VisBuildSvr.dll version 6.2.0.0
VisBuildSvr.Interop.dll version 1.0.0.0

eonlexx 11-09-2006 11:23 AM

Let me clarify
 
I have a bat file on my local server (A) that executes a bat file remotely on another server (B). The A.bat file’s content is:

psexec \\oracle1 -u -p -w d:\beingbackedup\ d:\beingbackedup\milestone.bat %1%

B.bat I have already posted. When I run A.bat from a DOS window and pass in the build number it works just fine. However, from within VisualBuild it will not execute pass the first executable line in B.bat.

Something else I noticed, the output from the B.bat file is not appearing in the output window.

kinook 11-09-2006 09:46 PM

1 Attachment(s)
In that case, you should configure the VBP step calling the .bat file to redirect output to a file and read output from that file (or call the remote batch file directly from a Run Program step, using the Remote tab to specify PsExec info), due to issues with VBP reading PsExec output handles. See attached samples.

magwo 01-22-2007 02:37 PM

This is out of topic, but I would just like to strongly recommend you to stay far, far away from .bat scripts. They have been the cause of numerous time-consuming bugs in our development.

There's simply too many good alternatives out there to keep using the very, very badly designed script language remnant of DOS.


Usually bat files evolve from one-liners into multi-line scripts, which is where they start to generate bugs and generally just suck.


Use python, ruby, scheme, lisp, C#, whatever the heck you want, just DON'T use bat files. :)


All times are GMT -5. The time now is 01:32 AM.


Copyright © 1999-2019 Kinook Software, Inc.