TPT and Windows PowerShell

Tools

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


Tags (2)
8 REPLIES

Re: TPT and Windows PowerShell

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!

Teradata Employee

Re: TPT and Windows PowerShell

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

Re: TPT and Windows PowerShell

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!

Teradata Employee

Re: TPT and Windows PowerShell

"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

Re: TPT and Windows PowerShell

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.

Teradata Employee

Re: TPT and Windows PowerShell

Can you print out the PATH environment variable and send it?

TPT looks at that in order to start up the application.

-- SteveF

Re: TPT and Windows PowerShell

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

Teradata Employee

Re: TPT and Windows PowerShell

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