We recently upgraded from V2R5 to V2R6 and I noticed that when running Fastload and FastExport scripts, it is asking for the user password NUMEROUS times (I do not pass my password within the script).
It appeared to be asking for a password for the initial logon, and then for each session as defined in the script, and then again before logging off. I always set SESSIONS to 4, and it is asking for a password up to 8 times until the script completes.
Obviously, this is annoying, as one mistype and the script fails.
Has anyone encountered this before?
Here is an example script:
.begin export sessions 4;
.export outfile o:\fastexport\export.txt
Mode record format text;
Select prodid (char (11)) ,prodcode (char (6)) From TRAINING.PRODUCT_HELD ;
I find this quite odd! I just tested it again, and indeed it was 7 password requests. It pauses after the first one, then requests 2 through 6 just pop up one after the other. The remainder of the script runs, and then before it logs off, it asks for the password again.
Is there perhaps a flag for load jobs for explicit logging or something like that?
That's just how it works. Since this is only an issue when running "interactively", and longer term the move is toward single sign-on / directory-based authentication, I doubt Teradata will change it.
The utilities simply pass the supplied logon information to CLIv2, and it's the driver that issues the password prompt. The value entered is not passed back to the calling utility nor saved, so each session generates a separate prompt. (In the case of your FastExport, that was one session to create the logtable, one SQL "control" and four data "export" sessions for the export step itself, and one to drop the logtable.)
One could argue that it would be nice for CLI to cache the value entered and re-use it when appropriate rather than re-prompting. It ought to be possible to implement that functionality via the logon user exit, but I think you'd have to include code to do the prompting as well as caching the value; and you'd have to install it on each client machine.