BTEQ logon


BTEQ logon


I have a question regarding BTEQ.
Let's say I am trying to logon
.logon hostname/myuid,mypass

it fails.

Then I do the following
.logon hostname/myuid
it prompts me for password

Succesfully logged on.

When command, hostname and credentials are all in one line it fails
When I do it interactively it is successful.

Why is that?


Re: BTEQ logon

Hi new911,
I think the reason it failed was because it expects a semicolon after your password. If you add this it should be OK. When you go through the prompt route no such delimiter is required.

try .logon hostname/myuid,mypass;



Re: BTEQ logon

IT does not help.
I put semicolon at the end and it says
*** Error: Invalid logon!

*** Total elapsed time was 1 second.

Teradata BTEQ for WIN32. Enter your logon or BTEQ command:

Then I enter it interactively
and here you go
*** Logon successfully completed.
*** Transaction Semantics are BTET.
*** Character Set Name is 'ASCII'.

*** Total elapsed time was 5 seconds.

BTEQ -- Enter your DBC/SQL request or BTEQ command:

Do I need to set something on the server or client?
Teradata Employee

Re: BTEQ logon

In "interactive mode" (standard input from terminal), BTEQ does not accept the password on the LOGON statement.

In "batch mode" (standard input redirected from file), BTEQ requires the password on the LOGON statement.

Re: BTEQ logon

Thank you for clarification.I moved one more step forward.

Now I created batch file.

I run the batch file from the location of COUNTRY.sql

bteq .logon tpcoe/UID,PASSW < COUNTRY.sql > COUNTRY.log

it gave me whole bunch of errors. I had to set path inside the batch file otherwise it would not find bteq, then windcli32.dll and so on.
I checked my env path and it contained the entries for teradata.

So far everything works but I would like to know why it does not pick up env variables and I had to set it up in the batch file.

Thank you all.

Re: BTEQ logon

create a 'logon' file called Example.logon that contains

.logon system_DSN/user_name,password;

call it in your bteq as follows:

/* Example BTEQ */

.Run file 'C:\script\logon\Example.logon';

Exec Macro_Name;
Call SPROC_Name;
or whatever you need to do.


Hope this helps

Re: BTEQ logon

i forget my Teradata BTEQ logon username and password how i recover it.

Senior Apprentice

Re: BTEQ logon

Ask your friendly DBA for your username and to reset the password.