Logon credentials in BTEQ script not working

Database
Enthusiast

Logon credentials in BTEQ script not working

I am relatively new to Teradata and am having issues w/ creating a BTEQ script which will logon and export data. The issue is w/ the logon command, I cannot get it to recorgnize my password. I have no problem w/ executing an import script w/ FastLoad that has the credentials embedded, but BTEQ won't recognize from script or interactive mode. We are using teradata version: 14.00.07.12 .

My script looks like:

.logon Serverip/USERNAME,PASSWORD ;

.EXPORT Data File=SOMEfILE.dat;

Select *

    From TableName;

.EXPORT Reset;

.LOGOFF;

But I can't even get BTEQ to recognize the password in interactive mode, even if I try to place quotes around it. I know this has to be a simple fix, but I can't find it.

3 REPLIES
Junior Supporter

Re: Logon credentials in BTEQ script not working

Hi.

In bteq "interactive mode" you cannot .LOGON with the password appended to the username with a comma. It only works this way in "batch mode".

You must provide the DBCop/Username only and then answer when interactively prompted for the password.

HTH.

Cheers.

Carlos.

Enthusiast

Re: Logon credentials in BTEQ script not working

Thanks for the tip. I did try passing the password in batch mode using various combinations of quotes/no quotes on both the password and userid. It turns out that I loacked the account during these tries but didn't know that because I still received the same invalid user/account message.

Enthusiast

Re: Logon credentials in BTEQ script not working

check if your login mechanism is LDAP n include it

.LOGMECH LDAP;