简体   繁体   English

如何在Teradata MLoad脚本中隐藏登录密码

[英]How to hide Logon Password in Teradata MLoad Script

I have written a Multiload script to Load Data in TeraData Database and the commands in the script is like: 我编写了一个Multiload脚本以在TeraData数据库中加载数据,该脚本中的命令如下:

.LOGTABLE Employee_log;  
.LOGON 192.168.1.1/dbc,dbc; 
.BEGIN MLOAD TABLES Employee_Stg;  
.LAYOUT Employee;  
.FIELD in_EmployeeNo * VARCHAR(10);  
.FIELD in_FirstName * VARCHAR(30); ....

But the password is clearly visible in the script. 但是密码在脚本中清晰可见。 Is there a option to secure the password or any alternate way/command to logon and then run the script. 是否有用于保护密码的选项或用于登录然后运行脚本的任何其他方式/命令。

You can create a logon file and run it in your MLOAD script using the following command 您可以使用以下命令创建登录文件并在MLOAD脚本中运行它
.RUN FILE logonfile.txt

In the logon file you can provide the statement that you used in your script .LOGON 192.168.1.1/dbc,dbc; 在登录文件中,您可以提供在脚本中使用的语句.LOGON 192.168.1.1/dbc,dbc;

Restrict access to logonfile.txt, though only the user can read it 限制对logonfile.txt的访问,尽管只有用户可以读取它

chmod go-rwx logonfile.txt

or use tdwallet 或使用tdwallet

.LOGON 192.168.1.1/dbc,$tdwallet(dbc)

tdwallet keeps the entries safely away, only access via logon command. tdwallet使条目安全地保留,只能通过登录命令进行访问。 There is no function to get an entry in cleartext. 没有获取明文条目的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM