All Forums Tools
raestadilla 5 posts Joined 08/13
03 Dec 2014
TPT and Windows PowerShell

Hi!
I'm trying to run a TPT job using Windows PowerShell but I'm getting this error:

PS C:\Teradata\TPT> Get-Content .\district.tpt | tbuild -f
Error launching tbuildexe.exee": The system cannot find the file specified.
 (2)

When I use BTEQ scripts, I'm not having any problems.
And maybe to clarify, can you run a TPT job directly from powershell?
 
Thanks!
RA

 

raestadilla 5 posts Joined 08/13
03 Dec 2014

Got the answer on my question. 
Definitely tpt works on powershell but you need to use a different command which is:
tbuildexe.exe -f script_name.tpt
 
This will work fine in 32-bit environments but if you're using 64 bit, you need to create a new environment variable named TWB_ROOT that contains C:\Program Files (x86)\Teradata\Client\15.00\Teradata Parallel Transporter\ path.
 
thanks!

feinholz 1234 posts Joined 05/08
03 Dec 2014

Please do NOT use tbuildexe.exe to run TPT!
That is not the right approach and we will not support you when you do this.
TWB_ROOT is NOT an environment variable that the user should be setting at all.
The proper command is "tbuild".
"tbuild" actually maps (links) to a program called "tptlaunch".
"tptlaunch" sets up the environment for the rest of TPT.
 
Again, do NOT use tbuildexe.exe.

--SteveF

raestadilla 5 posts Joined 08/13
31 May 2016

Hi Steve, we're always new/newbie to something in our life... we got this error: "“Error launching tbuildexe.exe”:  The system cannot find the file specified. " that's why we thought of using the tbuildexe.exe BUT ANYWAYS, the server policy did not allow us to run tbuild in powershell so we had to invoke the tbuild using command prompt. Our powershell execution line looks like this now:
     PS: cmd /c tbuild -f tpt_file.tpt
Just out of curiosity, what's the difference between tbuild and tbuildexe.exe?
 
Thank you!
 
 

feinholz 1234 posts Joined 05/08
01 Jun 2016

"tbuild" is actually a link to a program called "tptlaunch" that does some environment setup and then calls "tbuildexe.exe".
Users should never attempt to run tbuildexe.exe by itself.
 

--SteveF

venkatmummidi 1 post Joined 09/14
16 Jun 2016

Iam get the same error when trying to run tbuild via powershell/java procces builder.

 

Error launching tbuildexe.exee": The system cannot find the file specified.

 (2)

 

 

Whats the resolution for this error? is TPT 15.10 installtion screwed on my windows box?

 
You have mentioned that raestadilla's workaround being wrong (to set TWB_ROOT),
but it would be great if you could give the solution for the actual issue.

feinholz 1234 posts Joined 05/08
22 Jun 2016

Can you print out the PATH environment variable and send it?
TPT looks at that in order to start up the application.

--SteveF

jody_larsen 1 post Joined 02/16
31 Aug 2016

I was running into this issue as well...  For some reason launching powershell and typing the following at the command prompt:
  tbuild
throws this error.  However, the following did work just fine for me from the powershell prompt:
  cmd /C tbuild
 

feinholz 1234 posts Joined 05/08
01 Sep 2016

From the Powershell documentation, it looks like that would be the best solution to running TPT under Powershell.
Even typing just tbuildexe.exe indicates the environment (and environment variables) are not set up in a way that TPT needs.
 

--SteveF

You must sign in to leave a comment.