setting up hosts file entries in such a way to avoid giving TPID in BTEQ scripts

Database

setting up hosts file entries in such a way to avoid giving TPID in BTEQ scripts

Hi all,

There are teradata databases(DEV, PROD) running on two different nodes with two different ipaddresses.

I need to execute my BTEQ,Fload scripts from one appnode(a.b.c.d).

in a.b.c.d appnode i've given the hosts file entries like this

#prod entries
1.2.3.4 xxxxxx prodcop1 dbccop1
1.2.3.5 xxxxxy prodcop2 dbccop2

#dev
3.4.5.6 qqqqq devcop1 dbccop3

in my odbc.ini file i've given entries like this:

[dev]
DSNTraceEnable=NO
Driver=/usr/odbc/drivers/tdata.so
Description=NCR 3600 running Teradata V1R5.2
DBCName=3.4.5.6
LastUser=
Username=
Password=
Database=
DefaultDatabase=devdata

If I try to run the bteq scripts on appnode i'm getting following error

*** Error 3004 User identification is not authorized.
*** Error: Logon failed!

I'm not specifying my TPId at the script level.

like

bteq
.logon username,passwd;
select * from emp;
.quit;

and I do not want to specify TP Id explicitly at the script level due to security reasons.

can you suggest a solution for the above problem..

Thanks

Raj

1 REPLY
Teradata Employee

Re: setting up hosts file entries in such a way to avoid giving TPID in BTEQ scripts

I find it odd that you mention inclusion of TDPID as a security issue but you're OK with including username and password both in clear text.

BTEQ uses CLI so ignores odbc.ini. And you should never specify the same TDPID prefix (dbc in your example) for multiple systems in /etc/hosts entries.

But to answer your question, you can have multiple clispb.dat files, each with a different value for default i_dbcpath (prod and dev, in your example, instead of dbc). Change the COPLIB environment variable to specify the path in which the appropriate clispb.dat can be found, before you invoke BTEQ.