All Forums Connectivity
BRIANH 9 posts Joined 06/16
12 Aug 2016

I have run several tests using BTEQ and have altered between logging on using an IP and a name in the Windows hosts file.
I have noticed that the logon process takes an extended period of time when using the name vs the IP. These are relevant entries...  Anyone have any idea where the time is being spent? Am I forcing a logon to a specific vproc using the name and if so, where does the direct IP send the logon request ?
hosts file           localhost  teraclicop1
BTEQ logons
.logon,xxxxxx    -----> ~ 1 sec
.logon teracli/tester,xxxxxx ------------------->  ~ 7 - 8 sec's

dnoeth 4628 posts Joined 11/04
15 Aug 2016

The delay is caused by the lookup to find an ip-address for teracli., the COP discovery:
BTEQ/CLI adds COP1 to the hostname and resolves it to an p-address, if successful the number is increased to COP2 and the process is repeated until resolution fails.
Depending on the name resolution settings in your network environment this failing lookup might need a few seconds (e.g. using a DNS server on the internet).
To solve it you can add an environment variable which specifies the maximum number of nodes to resolve, e.g. SET TERACLI = 1 (note: the hostname must be in upper case)


BRIANH 9 posts Joined 06/16
16 Aug 2016

Hi Dieter.... thanks for your response...  I'm not familiar with setting an environment variable. Since I'm running BTEQ in Windows 10 in a .BAT file do I send this to BTEQ like 'SET TERACLI=1' or somehow do I send this to CLI? Since I have only one entry in my HOSTS file I have no way of knowing how many COPn entries are actually being tested prior to CLI eventually failing the connection resolution. FYI I'm running Teradata under VMware as a guest host system - Linux.  Try as I might I couldn't find any documented examples of how to set the env. variable... 
thanks Brian

dnoeth 4628 posts Joined 11/04
16 Aug 2016

You simply add a new line SET TERACLI=1 to the batch file before calling BTEQ.
To modify environment variables on a user/system level, see


You must sign in to leave a comment.