We are currently deploying a new user interface and navigational structure on our Community. These design changes align with our new Teradata Access portal and provide a more cohesive experience for our users.
I'm using a BTEQ script called from a Korn Shell Script toi automate the process of running SQL via BTEQ on Unix. The user simply types the shell script name followed by their SQL input file name and the script seds the file name into the BTEQ script. No problems there I've gotten it to work just fine.
Here is the issue. we can't have user passwords in a file. It can't even been in a very temporary file that lasts the life of the BTEQ job and then gets deleted.....
Is there any way to get BTEQ to prompt the end user for the password? I've tried just leaving out the password and putting everything else in the .logon command but I only get an error message
Well....... I guess by the nuber of views that this is something of interest to a great many of us..... but based on all the feedback (or lack thereof) from the Teradata team working with us for a UDB to Teradata conversion I'm guessing this just isn't possible right now.
Unfortuantely Teradata is pushing more people to SQL Assistant at the same time our company is trying to eliminate all client installed apps....
alternatively you can use the 'ftppwd' utility in UNIX. where in, you could store your personalized pairs of DBServername and Passwd and retrive them, dynamically from the BTEQ script. hope dis would help.
I'll definitely give that a shot. Gets around my password issue very nicely. Thanks also to the person who sent the other suggestion! You will become plan B if I have trouble getting nicolas' idea to work.
Well it worked up to a point. Since we pass the userid and password on the same line as the BTEQ command when you do a ps -ef you get the eniter command line back! That's right with the userid and password!
Ooops. On Solaris we got around this by creating a link that points to the bteq file and executing the link. The link is about 50 bytes long and it overflows the ps CMD buffer on Solaris.
On AIX the CMD buffer is huge. It just keeps wrapping so we aren't able to overflow it with the "whack it with a hammer" approach above. Sigh....
Anyone know how to shorten up the CMD buffer that the ps command access on AIX?
Just wanted to update this thread with the final script. This script allows for versioning the output files and an alternate directory to place the output in. Meets our need of not storing passwords in a file on the system.
if [ $# -lt 1 ];then echo usage: `basename $0` yourjob.sql + optional directory echo For output in current directory: tdsql yourjob.sql echo For output in specified location: tdsql yourjob.sql /camsrvr/largefile/userid/ exit 9 fi
dir="" if [ $# -gt 1 ];then dir=$2 fi
# File name for output tt=$1 ex1="out" out1="$dir$tt.$ex1" i=1 while [ -f $out1 ] do out1="$dir$tt.$ex1.$i" (( i = $i + 1 )) done echo >$out1
#File name for nohup output tl=$1 ex3="log" log="$1.$ex3" i=1 while [ -f $log ] do log="$tl.$ex3.$i" (( i = $i + 1 )) done