All Forums Tools
tdforumuser 15 posts Joined 05/11
26 Dec 2013
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.
 

Harpreet Singh 101 posts Joined 10/11
27 Dec 2013

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.

tdforumuser 15 posts Joined 05/11
27 Dec 2013

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) ?  

feinholz 1234 posts Joined 05/08
27 Dec 2013

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

--SteveF

tdforumuser 15 posts Joined 05/11
27 Dec 2013

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 !!

feinholz 1234 posts Joined 05/08
27 Dec 2013

I believe when you use templates, you need to use the template job variable names.
 
For example:
 
TargetTdpId
TargetUserName
TargetUserPassword
TargetLogonMech
TargetLogonMechData
 

--SteveF

tdforumuser 15 posts Joined 05/11
27 Dec 2013

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;'
)
);
);
);
 

feinholz 1234 posts Joined 05/08
27 Dec 2013

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

tdforumuser 15 posts Joined 05/11
06 Jan 2014

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---------
 

Fred 1096 posts Joined 08/04
08 Jan 2014

Does the password contain special characters, e.g. @?
If so, use escape sequence: \@

tdforumuser 15 posts Joined 05/11
08 Jan 2014

No, password did not have special characters.

feinholz 1234 posts Joined 05/08
08 Jan 2014

The automatic schema generation part of TPT's "simplicity" does not currently support LDAP.
You will have to provide the schema in the script until this can be fixed.
 

--SteveF

tdforumuser 15 posts Joined 05/11
09 Jan 2014

Thanks for the update

tdforumuser 15 posts Joined 05/11
18 Jan 2014

Any info on which upcoming release this feature would be available ? 

feinholz 1234 posts Joined 05/08
20 Jan 2014

No. It has not been scheduled yet.
 

--SteveF

KM185041 2 posts Joined 11/10
29 Oct 2014

Hi Steve,
Is it fixed in TPT 14.10.0.05 patch version thru "TPT Simplicity to support LDAP logon" jira ?
Thanks

feinholz 1234 posts Joined 05/08
29 Oct 2014

Yes, it looks like 14.10.00.05 does have the fix for this issue.
(Yes, you have the correct jira.)

--SteveF

KM185041 2 posts Joined 11/10
11 Nov 2014

Thanks for the confirmation Steve.

sridharanm 1 post Joined 12/13
20 Nov 2014

Hello all,
 
I am using TPT wizard, when defining target it is asking host and username and pwd. but unale to connect getting error as
Teradata jdbc database error, error code  1000 ; seems  permission denied. but same username and pws tired in sql assistant working fine but not with tpt wizard.
 
any suggestion it would be great.
 

JeffSmith 3 posts Joined 07/11
29 Sep 2015

Hello, I am using Version 15.00.00.00 and getting the same error TDFORUMUSER was getting.  TPT_INFRA  TPT05014: RDBMS error 8017: The UserId, Password or Account is invalid.  Do we know if the error has been corrected or did it resurface is the new version?  thanks.

feinholz 1234 posts Joined 05/08
29 Sep 2015

It was fixed in 15.00.00.01.
 

--SteveF

JeffSmith 3 posts Joined 07/11
29 Sep 2015

Thanks Steve, I didn't see that version in the tools section.   

JeffSmith 3 posts Joined 07/11
29 Sep 2015

Do you know if it is available?  thanks

feinholz 1234 posts Joined 05/08
29 Sep 2015

That patch has been out on the patch server for quite a while now.
Always download the latest, though.

--SteveF

wagnersantos 7 posts Joined 02/14
04 Nov 2015

Hi All,
I'm having a problem with Schema generation.  Anyone can help me?
----- TPT ERROR MSG ----

Teradata Parallel Transporter Version 15.00.00.04 64-Bit

TPT_INFRA: TPT05004: CLI error 235 in connecting session (function ConnectSession).

      MTDP: EM_GSSINITFAIL(235): call to gss_init failed. Inaccessible read A name is required but was passed as NULL.

TPT_INFRA: TPT04032: Error: Schema generation failed for table 'MyDB.TargetTable' in DBS 'DEV1':

  "GetDelimitedFileSchema" status: 48.

 

Job script preprocessing failed.
----- TPT FILE----

DEFINE JOB MOVE_DATA_WITHOUT_LANDING_TO_DISK

DESCRIPTION 'MOVE DATA WITHOUT LANDING THE DATA TO DISK'

(

      /*** DEFINE SCHEMA TPT_SCHEMA DELIMITED 'MyDB.TargetTable'; ***/

      DEFINE SCHEMA TPT_SCHEMA DELIMITED @LoadTargetTable;

      APPLY $INSERT @LoadTargetTable TO OPERATOR ($LOAD)

      SELECT * FROM OPERATOR ($EXPORT);

);

Note: I try these two "DEFINE SCHEMA" on TPT file.

 

---- TPT PAR FILE ----

 SourceTdpId                 = @host_source

,SourceUserName              = @user

,SourceUserPassword          = @pass

,SourceLogonMech             = 'ldap'

,ExportPrivateLogName        = 'LOAD_EXP_expt_log'

,ExportSelectStmt            = 'LOCK ROW FOR ACCESS SEL top 10 * FROM MyDB.TargetTable;'

,TargetTdpId                 = @host_target

,TargetUserName              = @user

,TargetUserPassword          = @pass

,TargetLogonMech             = 'ldap'

,TargetTable                 = 'MyDB.TargetTable'

,LoadPrivateLogName          = 'Load_EXP_load_log'

,LoadQueryBandSessInfo       = 'JobName=Load_EXP_update;'

,LoadLogTable                = 'MyDB.TargetTable_LT'

,LoadErrorTable1             = 'MyDB.TargetTable_ET'

,LoadErrorTable2             = 'MyDB.TargetTable_UV'

,LoadWorkTable               = 'MyDB.TargetTable_WT'

,LoadTargetTable             = 'MyDB.TargetTable'

,LoadMaxSessions             = 30

 

---- TBUILD CMD ----
tbuild -f mover.tpt -v mover.par -C -u "host_source='DEV1', host_target='DEV2', user='xxxx', pass=xxxx" -r temp/ -L temp/ -R 2 -j MyDataMover
 
Any suggestion it would be great.
 
-- Wagner Santos

---
Wagner Santos

feinholz 1234 posts Joined 05/08
05 Nov 2015

For some reason, the TdpId or UserName is not being passed down to TeraGSS for some reason.
I am looking into it.
One thing just FYI; remove the -C from the command line.
That forces round-robin processing between Load operator instances, and even though you did not specify the job to run with more than 1 instance of the operator, it is a good idea to not tell TPT to round-robin the data.
The only time you want to round-robin the data to the consumer operator is when you are writing to files and you want an even distribution of rows to multiple files.
 
I also noticed that you are pulling rows from the same table as you are using in the load.
Was that intentional?
 

--SteveF

wagnersantos 7 posts Joined 02/14
05 Nov 2015

Hi Steve,

 

we have a shell function to execute every tbuild command and treat the return, and normally is used to load multiple files. But I'll create an specific removing the -C parameter for this kind of job.

 

About your question the answer is Yes, it's intentional. We're moving some data from a Production Server to a QA Server to realize some tests. That's the reason to use the same table name on both hosts (Prod & QA). 

 

Anyway, thanks for the help.

---
Wagner Santos

wagnersantos 7 posts Joined 02/14
10 Nov 2015

Guys,
Is there a way to run in debug mode?
I could run with TraceAll parameter, but the process didn't create any log.
 

---
Wagner Santos

feinholz 1234 posts Joined 05/08
10 Nov 2015

What information are you trying to get access to?
When you use TraceLevel, it will add a lot of trace information to the regular .out log file.

--SteveF

wagnersantos 7 posts Joined 02/14
10 Nov 2015

Any information about the step exeuted before the error "TPT_INFRA: TPT05004: CLI error 235 in connecting session (function ConnectSession)". I'm trying to find something that is causing this error.
 

---
Wagner Santos

feinholz 1234 posts Joined 05/08
10 Nov 2015

According to the Teradata Messages manual:
 
CLI0235 Connection has not completed
 
Explanation: A query specified a connection number for a session whose Connection function has not yet completed.
 
Notes: None
 
Remedy: Ensure that the Connection function for the session has completed before requesting the query.
 
By itself, this is strange and TPT should never receive that.
However, I think the CLI235 is not really the root cause.
I think the root cause is that some of the logon credentials are not being passed to TeraGSS properly.
We are still looking into it.
However, to answer your original question, by turning on operator trace through TraceLevel, the output will go to the same .out log file as every other TPT piece of output.
 

--SteveF

feinholz 1234 posts Joined 05/08
11 Nov 2015

Ok, I have looked at this some more and it looks like either LDAP may not have been set up correctly, or you are not passing the logon credentials correctly.
 
But still looking into it...

--SteveF

wagnersantos 7 posts Joined 02/14
12 Nov 2015

First of all, thanks for looking this issue into it for me.
I undertand your point about the setup of LDAP or login credentials, however I'm not sure if the credentials are the problem, because all of them were set in tbuild command and parameter file as I show below.

 
,TargetUserName              = @user
,TargetUserPassword          = @pass
,TargetLogonMech                  = 'ldap' 

tbuild -f mover.tpt -v mover.par -C -u "host_source='DEV1', host_target='DEV2', user='USER1', pass='USER1'" -r temp/ -L temp/ -R 2 -j MyDataMover
Thanks so much for the help

---
Wagner Santos

feinholz 1234 posts Joined 05/08
13 Nov 2015

Please generate a COPANOMLOG and send to me.
steven.feinholz@teradata.com
Thanks!

--SteveF

wagnersantos 7 posts Joined 02/14
16 Nov 2015

Sorry for the delay. How can I find or generate this COPANOMLOG?
I'm using Unix AIX  1 7 00F8497E4C00.

---
Wagner Santos

feinholz 1234 posts Joined 05/08
16 Nov 2015

Set the environment variable COPANOMLOG to a path and file name.
CLI will put trace information in that file.
Example:
COPANOMLOG=/tmp/my_cli_log_file.txt
 

--SteveF

wagnersantos 7 posts Joined 02/14
17 Nov 2015

Steve,
I sent to your mail the COPANOMLOG.
 

---
Wagner Santos

You must sign in to leave a comment.