All Forums Tools
toadrw 69 posts Joined 07/04
16 Apr 2015
Calling tbuild.exe directly via command prompt (Windows)



Sorry. I had posted this earlier, but I accidently unpublished it while looking at it.


We would like to be able to call tbuild.exe directly in a batch file. Is this possible or would it be easier to try to just call tbuild and set everything up via the system environement variables? Using TTU 14.10 and we have both 32-bit and 64-bit installed.


cmd /k "C:\Program Files (x86)\Teradata\Client\14.10\Teradata Parallel Transporter\bin\tbuild.exe"


Give us a an error with regards to tbuildexe.exee not existing.


Any help you could provide on how to set this up would be appreciated.  Thank you!

MartinJEd22 4 posts Joined 05/13
16 Apr 2015

Hi there,
I've got the following in a *.bat file and Windows is executing it without an issue.
File jobvars_1.txt is where we store passwords, file locations, System IDs etc.
tbuild -f "tpt_script_to_run_incl_path.txt" -v "H:\DATA\jobvars_1.txt" -j jobname
e.g. you can combine them:
tbuild -f "L:\DMO\Data Operations\Scripts\tpt_Campaigns.txt" -v "H:\DATA\jobvars_1.txt" -j tblCampaigns
rem ---
tbuild -f "L:\DMO\Data Operations\Scripts\tpt_XYZ.txt" -v "H:\DATA\jobvars_1.txt" -j tblXYZ
rem ---
Hope this helps.

toadrw 69 posts Joined 07/04
17 Apr 2015

Hi Martin:
Thank you for the reply!  
Our batch file is calling tpt the same way using just tbuild.  Our jobs are running fine when we can execute tpt by just type in tbuild.  To do this the parth to the tpt directory has to be in the path system environement variable on Windows and most of the time it is.
However, for users which do not have this set up, we were wondering if there was some trick to referencing the tbuild executable tbuild directly. So if you would open a command prompt you could just type in "C:\Program Files (x86)\Teradata\Client\14.10\Teradata Parallel Transporter\bin\tbuild.exe" to get to the tpt prompt much like you would just need to type in tbuild.
This is helpful say if you have two versions of tpt installed (32-bit and 64-bit) and you need to execute say 32-bit, but the first entry in your path variable is the 64-bit version.  I'd say for most people this is not an issue, but we have both a 64 and Wow64 version of our program.  64 bit needs to call 64-bit tpt and Wow64 needs to call 32-bit.  Rather than messing with environement variables we thougth we could call tbuild.exe in their respective directories.
I just need to know how to call a tpt script without having to rely on environment variables if it is possible.  Thanks again for your help!!!

toadrw 69 posts Joined 07/04
20 Apr 2015

So the trick is when you have tpt installed, but the tbuild command is not calling TPT is to first try uninstall/reinstall.  If that doesn't work then the next step would be to add the paths to the TPT bin and msg directories to your PATH system environment variable.
If you already have "paths" to another Teradata install then these will need to go before those.
Here are a couple of examples:
TD14.10 (64-bit)
C:\Program Files\Teradata\Client\14.10\Teradata Parallel Transporter\bin64
C:\Program Files\Teradata\Client\14.10\Teradata Parallel Transporter\msg64
TD15 (32-bit install on a 64-bit machine Wow64 mode)
C:\Program Files (x86)\Teradata\Client\15.00\Teradata Parallel Transporter\bin
C:\Program Files (x86)\Teradata\Client\15.00\Teradata Parallel Transporter\msg
It would still be nice to allow tbuild.exe to be called directly so that a user can switch between different versions or even different bit-type of TPT for use in different programs.

feinholz 1234 posts Joined 05/08
20 Apr 2015

Technically, TTU does not support "multiple versions" of the same products on the same machine.
This means you need to manipulate environment variables to achieve your goal.
We (Teradata Client Engineering) are in the process of coming up with a solution for this issue.


toadrw 69 posts Joined 07/04
21 Apr 2015

As always,  thank you Steve!!!

You must sign in to leave a comment.