Kinook Software Forums

Kinook Software Forums (
-   [VBP] General Discussion (
-   -   .bat file will not completely execute (

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"

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
VisBuildCmd.exe version
VisBuildPro.exe version
VisBuildBld.dll version
VisBuildBurn.dll version
VisBuildCore.dll version
VisBuildDotNET.dll version
VisBuildExt.dll version
VisBuildLog.dll version
VisBuildMisc.dll version
VisBuildMS.dll version
VisBuildMS2.dll version
VisBuildNet.dll version
VisBuildSvr.dll version
VisBuildSvr.Interop.dll version

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 11:30 PM.

Copyright © 1999-2019 Kinook Software, Inc.