Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-08-2006, 03:08 PM
eonlexx eonlexx is online now
Registered User
 
Join Date: 06-16-2006
Posts: 6
Question .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
Reply With Quote
  #2  
Old 11-09-2006, 08:31 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply With Quote
  #3  
Old 11-09-2006, 11:04 AM
eonlexx eonlexx is online now
Registered User
 
Join Date: 06-16-2006
Posts: 6
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
Reply With Quote
  #4  
Old 11-09-2006, 11:23 AM
eonlexx eonlexx is online now
Registered User
 
Join Date: 06-16-2006
Posts: 6
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 <UserName> -p <Password> -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.
Reply With Quote
  #5  
Old 11-09-2006, 09:46 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Attached Files
File Type: bld remote_bat.bld (711 Bytes, 1672 views)
Reply With Quote
  #6  
Old 01-22-2007, 02:37 PM
magwo magwo is online now
Registered User
 
Join Date: 01-19-2007
Posts: 7
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:30 PM.


Copyright © 1999-2023 Kinook Software, Inc.