Teradata BTEQ: disable logon prompt

273 views Asked by At

When i run a teradata bteq in the CMD shell -

A little logon prompt screen pops up.

When i press enter the bteq runs.

Is there a way to disable this popup screen?

Searching the internet yields that entering a logonprompt off should solve the problem.

Like so:

.SET LOGONPROMPT OFF
.LOGON my_server

-- rest of the bteq script...

.QUIT
.LOGOFF

I use the following shell command to run the bteq: bteq < myscript.sql > log.txt

Could you please help me get rid of the logon popup screen?

1

There are 1 answers

0
Abinash On BEST ANSWER

You can pass the fully qualified logon string to get rid of the prompt.

.LOGON my_server/user,password

If you still want to go with only the server details in .LOGON. Along with .SET LOGONPROMPT OFF, set the environment variable GUILOGON as NO.

In CMD: setx GUILOGON NO

Snippet from TD Documentation:

Note that setting LOGONPROMPT to OFF is sometimes not going to be sufficient for suppressing all unnecessary prompts when using Windows BTEQ. You may also need to instruct CLI to suppress its generation of what is known as its GUILOGON dialog box.

This can be accomplished by setting the environment variable GUILOGON to NO.