0

I have written a Multiload script to Load Data in TeraData Database and the commands in the script is like:

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

Jay
  • 111
  • 1
  • 4
  • 13
  • 1
    [Teradata Wallet](http://downloads.teradata.com/download/tools/teradata-wallet-for-windows) is intended for this purpose, I believe, although I've never used it. – Andrew Mar 30 '17 at 18:09

2 Answers2

1

You can create a logon file and run it in your MLOAD script using the following command
.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;

  • But still The password is getting stored in the text file. If you are in a prod system and executing this file there are great chances of security breach. So I asked is there any other way to directly execute logon command and then execute this script. – Jay Apr 01 '17 at 13:02
  • 1
    You can restrict access to the directory where the logon file is stored.. that's how we are doing in our production system.. – Mani Bharataraju Apr 01 '17 at 13:23
  • You may put the tdwallet string into your logon-file. Thus, even if a user has access to the logon-file, he can't use it e.g. on his local machine. – ULick Apr 22 '17 at 11:43
0

Restrict access to logonfile.txt, though only the user can read it

chmod go-rwx logonfile.txt

or use tdwallet

.LOGON 192.168.1.1/dbc,$tdwallet(dbc)

tdwallet keeps the entries safely away, only access via logon command. There is no function to get an entry in cleartext.

ULick
  • 969
  • 6
  • 12
  • My Load file is getting generated by a Java Program. Also I need to put the password in tdwallet using the same/diff Java Program. But when I tried adding an item in tdwallet using Java, it did not ran. Do you have any solution for this? – Jay Apr 20 '17 at 07:44
  • Adding an entry (password) to tdwallet is done via command line `tdwallet add` and it is then asking for terminal input. You can't use a pipe or a parameter for the password input. Only option would be `expect` (don`t know about a java equivalent for that). – ULick Apr 22 '17 at 11:33