TPT Template operators with LDAP authentication

Tools
Enthusiast

TPT Template operators with LDAP authentication

I have coded a simple TPT script using operator templates ($EXPORT, $INSERT and $LOAD) to copy data of Table A from TDSERVER-A to TDSERVER-B. TDSERVER-A and TDSERVER-B use LDAP based authentication. TPT (TBUILD) raises errors when I run the script either by initializing LogonMech, UserName, UserPassword variables for Source/Target operators in JobVars file  or when I run the script by overriding the mentioned variables using ATTR option inline in the TPT script. The error messages I noticed are given below. The strange thing is I was able to run the same script in a different TD env that does not use LDAP based authentication. Did anyone experience similar issue ? Are there any tweaks that should be done in the TPT script to use operator templates successfully with LDAP authentication? Any input is appreciated.  

Error Msgs:

Teradata Parallel Transporter Version 14.00.00.08

TPT_INFRA: TPT05014: RDBMS error 8017: The UserId, Password or Account is invalid.

TPT_INFRA: TPT04032: Error: Schema generation failed for table 'DBNAME.TABLENAME' in DBS 'T7DEV':

  "GetTableSchema" status: 48.

Job script preprocessing failed.

Job terminated with status 12.

37 REPLIES
Enthusiast

Re: TPT Template operators with LDAP authentication

TPT script needs to be modified manually to run with LDAP credentials.  I used to edit 2-3 lines to make it working. Please share the script.

Enthusiast

Re: TPT Template operators with LDAP authentication

As mentioned, I did modify the script by specifying LogonMech variable in two ways (1. Thru Job Vars file, 2. Overriding the variable in ATTR section of each operator code block). Again, I am noticing error when I use only operator templates (Ex: $LOAD, $EXPORT, etc) in the script. Did your changes work for operator templates ($LOAD, $EXPORT) or regular operators (LOAD_OPERATOR, EXPORT_OPERATOR) ?  

Teradata Employee

Re: TPT Template operators with LDAP authentication

Please provide your script and job variable file (and command line contents, if you entered job variable information there as well).

Thanks!

-- SteveF
Enthusiast

Re: TPT Template operators with LDAP authentication

Please see TPT script showing one of the options I mentioned in my earlier message i.e by overiding User, Password, TDPID, LogonMech variables using ATTR option in APPLY statement.

***************Script (get_Data.txt) Starts Here**************

DEFINE JOB load_source_to_target_table

DESCRIPTION 'This job is to export source table and load to target table using operator templates'

(

STEP STEP_LOAD

(

APPLY $INSERT

TO OPERATOR(

$LOAD [1]

ATTR

(

TdpId = 'TDSERVERB',

LogonMech = 'LDAP',

UserName = 'USERA',

UserPassword = 'PWORD1',

PrivateLogName = 'TABLEA' || '.load.log',

TargetTable = 'DBNAME.TABLEA',

LogTable = 'TABLEA_log'

)

)

SELECT *

FROM OPERATOR

(

$EXPORT[1]

ATTR

(

TdpId = 'TDSERVERA',

LogonMech = 'LDAP',

UserName = 'USERA',

UserPassword = 'PWORD1',

PrivateLogName = 'TABLEA' || '.export.log',

SelectStmt='lock row for access sel * from DBNAME.TABLEA;'

)

);

);

);

***************Script Ends Here**************

tbuild -f get_Data.txt

Thanks !!

Teradata Employee

Re: TPT Template operators with LDAP authentication

I believe when you use templates, you need to use the template job variable names.

For example:

TargetTdpId

TargetUserName

TargetUserPassword

TargetLogonMech

TargetLogonMechData

-- SteveF
Enthusiast

Re: TPT Template operators with LDAP authentication

Thanks for the response. I think I noticed following error when when I tried running script by specifying Source/Target TdpId, Username, Password,LogonMech as shown in below script. I have also earlier tried with and without using LogonMechData (Ex: <NetworkUserId>@@<NetworkPassword> user=<TeradataUserId>) in my first script forwarded earlier but was still noticing errors.

Error Msgs:

Teradata Parallel Transporter Version 14.00.00.08

TPT_INFRA: TPT04128: Error: The job variables supported for providing DBS logon

   parameters are unassigned, and the job script does not provide logon parameters.

   TPT cannot logon to a DBS to generate a required schema.

Script:

DEFINE JOB load_source_to_target_table

DESCRIPTION 'This job is to export source table and load to target table using operator templates'

(

STEP STEP_LOAD

(

APPLY $INSERT

TO OPERATOR(

$LOAD [1]

ATTR

(

TargetTdpId = 'XXX',

TargetLogonMech = 'LDAP',

TargetUserName = 'XXX',

TargetUserPassword = 'XXX',

PrivateLogName = 'XXX' || '.load.log',

TargetTable = 'DBNAME.TABLEA',

LogTable = 'DBNAME.TABLEA_log'

)

)

SELECT *

FROM OPERATOR

(

$EXPORT[1]

ATTR

(

SourceTdpId = 'XXX',

SourceLogonMech = 'LDAP',

SourceUserName = 'XXX',

SourceUserPassword = 'XXX',

PrivateLogName = 'XX' || '.export.log',

SelectStmt='lock row for access sel * from DBNAME.TABLEA;'

)

);

);

);

Teradata Employee

Re: TPT Template operators with LDAP authentication

Take a look at <install_dir>/templates (where <install_dir> is the top level directory where TPT is installed).

You will see the templates.

Each template file will contain the job variables for the various operators.

You need to specify all of the correct names.

In the script you sent, "TargetTable" does not have the correct job variable name for that template. Same with "SelectStmt" in the Export operator specification.

Please make sure *all* of your job variables are of the correct name.

Then try to run the job and let me know what you get.

-- SteveF
Enthusiast

Re: TPT Template operators with LDAP authentication

I appreciate your time for looking at this issue. I have run tests and actually still notice same error. (I have run tests with and without using SourceLogonMechData and TargetLogonMechData Job Variables but noticed same error). Please see below TPT script and Job Variables used in my tests.  Thanks !!

-----------TPT Script----------------------

DEFINE JOB load_source_to_target_table

DESCRIPTION 'This job is to export source table and load to target table using operator templates'

(

STEP STEP_LOAD

(

APPLY ( $INSERT )

TO OPERATOR(

$LOAD [1]

)

SELECT *

FROM OPERATOR

(

$EXPORT[1]

);

);

);

-----------End Script-------------

---------Job Variables--------------

SourceTdpId = 'tdxxxA',

SourceUserName ='xxxx',

SourceUserPassword='xxxx',

SourceDBTable='DBNAME.TABLEA',

SourceLogonMech='LDAP',

/*SourceLogonMechData='XXX@@pword user=xxxx',*/

ExportSelectStmt='lock row for access sel * from ' || @SourceDBTable ||' ;',

ExportMaxSessions=30,

ExportPrivateLogName='tablea.export.log',

TargetTdpId = 'tdxxxB',

TargetUserName ='xxxx',

TargetUserPassword='xxxx',

/*TargetLogonMechData='XXX@@pword user=xxxx',*/

LoadTargetTable= 'DBNAME.TABLEA',

TargetTable='DBName.TABLEA',

TargetLogonMech='LDAP',

LoadLogTable = 'dbname.tablea_log',

LoadErrorTable1 = 'dbname.tablea_err1',

LoadErrorTable2 = 'dbname.tableb_err2',

LoadPrivateLogName = 'tablea.load.log',

LoadMaxSessions=30

---------Job Variables--------------

----------Error Details---------

Teradata Parallel Transporter Version 14.00.00.08

TPT_INFRA: TPT05014: RDBMS error 8017: The UserId, Password or Account is invalid.

TPT_INFRA: TPT04032: Error: Schema generation failed for table 'DBNAME.TABLEA' in DBS 'tdxxxB':

  "GetTableSchema" status: 48.

Job script preprocessing failed.

----------Error Details---------

Teradata Employee

Re: TPT Template operators with LDAP authentication

Does the password contain special characters, e.g. @?

If so, use escape sequence: \@