Teradata BTEQ:禁用登录提示

Teradata BTEQ: disable logon prompt

当我在CMD 运行 一个teradata bteq shell -

弹出一个小的登录提示屏幕。

当我按下输入 bteq 运行s.

有没有办法禁用此弹出屏幕?

在网上搜索发现输入 logonprompt off 应该可以解决问题。

像这样:

.SET LOGONPROMPT OFF
.LOGON my_server

-- rest of the bteq script...

.QUIT
.LOGOFF

我使用以下 shell 命令来 运行 bteq: bteq < myscript.sql > log.txt

你能帮我去掉登录弹出屏幕吗?

您可以传递完全限定的登录字符串来摆脱提示。

.LOGON my_server/user,password

如果您仍然只想使用 .LOGON 中的服务器详细信息。连同 .SET LOGONPROMPT OFF,将环境变量 GUILOGON 设置为 NO.

在 CMD 中:setx GUILOGON NO

来自 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.