Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BTEQ on Windows

Status
Not open for further replies.

Rbar

Programmer
Jun 25, 2001
18
US
How do I invoke BTEQ to execute a batch job/script in Windows?
When I tried to invoke BTEQ in a script, I got an error.
If I cut and past my script into an open BTEQWIN session, it works perfectly.
 
Just open a dos box and type in bteq. This should open a bteq session.
Or make .bat files where you start up a bteq session in.

Be sure the directory where bteq is, is in your PATH. Normally bteq is installed for windows machines under: c:\Program Files\NCR\Teradata Client\bin.
 
That works. Thanks.
How can I save the output from a batch bteq?
 
Use redirection:
bteq < batchscript > outfile

Dieter
 
My Bteq invocation is in my bat file.
Do I have to break it up to route to an <outfile>?
I'm using Windows Bteq.
 


bteqwin is a GUI version of the command line program

bteq


Bteqwin expects its input and output to come from the GUI window and not STDIN.


If you are using it in a script use the command line version and put the output in a file.

bteq .logon tdp/user,passwd < script > script.out





---
 
RBar,

just put the following in your batch file that should do what u want.

bteq < bteqscript > bteqoutput

Tdatgod what if the logon command is in the BTEQ script file itself. Is it necessary to give the following command. Here bteq is windows version or dos version.

bteq .logon tdp/user,passwd < script > script.out


Sridharan





 
I have not been able to get the message directed to a Windows file.
I've tried the > and >> but that hasn't changed anything.
There's nothing more required than to add the file name to the BTEQ command line?
 
I use Win2K, so adjust to Unix accordingly.

Start cmd.exe you must. Change to the directory where your script is. If myscript.sql is in C:\ddl be in this directory when you enter the command bteq

.logon yada/yada
--Then run your script--
.run file=myscript.sql;

That's all there is to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top