TTP output file not getting zipped when .gz is used as file extension - response (1) by SteveBovy
Teradata Utilities installation - forum topic by hema.ananth
Hi All,
I have installed Teradata Express VMware. Able to connect to the DB using bteq and SQL Assistant.
Now Trying to install Teradata utilities (Windows Client installation Package) in my Windows 7 PC and access the DB in Linux VM. When i try to install utilities it says unable to find the instance of teradata.
Kindly guide me on how to install the utilities and access the DB.
Thanks in advance,
Hemalatha S
TPT Vs other ETL Utilities - response (7) by ratchetandclank
vincent91, Please check "-h" option in the TPT.
TPT SelectStmt - response (5) by jacek.adamowicz
Hi,
I'm using TPT 14.00.00.03, both on Windows and AIX. I am exporting data using $EXPORT template.
It seems that escaping single quotes by doubling them does not work for SelectStmt. I am not able to provide any string literal in SELECT.
I am specyfying in a script (just a sample, that anyone can exercise):
Set SelectStmt = 'SELECT DatabaseName,TableName,TableKind from dbc.tables where databasename=''DBC'';';
and the TPT gives me an error message coming from RDBMS:TPT_INFRA: TPT05014: RDBMS error 3706: Syntax error: expected something between a string or a Unicode character literal and the word 'DBC'.
When I look into DBQL, I see the same error message and the SQL that I see in QueryText column contains doubled single quotes:SELECT DatabaseName,TableName,TableKind from dbc.tables where databasename=''DBC'';
From old forum posts it seems that it worked for previous versions.
Jacek
TPT SelectStmt - response (6) by feinholz
I have never seen the escaping fail.
Therefore, please upgrade to the latest version of 14.00 (efix #3 is a very old version of the 14.0 release) and see if that fixes your problem.
Fast Export producing unreadable text file - response (13) by sandeepganga
From my understanding it worked good when the data types used were not date/number
convert it to char as workaround
let consider below example,
show table dbc1.testdate;
*** Text of DDL statement returned.
*** Total elapsed time was 1 second.
---------------------------------------------------------------------------
CREATE SET TABLE dbc1.testdate ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
date_col DATE FORMAT 'YY/MM/DD',
key_col NUMBER)
PRIMARY INDEX ( date_col );
BTEQ -- Enter your SQL request or BTEQ command:
sel * from dbc1.testdate;
sel * from dbc1.testdate;
*** Query completed. 4 rows found. 2 columns returned.
*** Total elapsed time was 1 second.
date_col key_col
-------- ----------------------------------------
01/03/30 3
01/01/10 1
20/02/02 50
01/02/20 2
tac_viewpoint1:/opt/teradata/client/14.10/bin # cat fs.fxp
.LOGTABLE utillog ;
.logon client05/dbc1,dbc1;
.BEGIN EXPORT
SESSIONS 2;
.EXPORT OUTFILE ttyyuueerr;
sel * from dbc1.testdate;
.END EXPORT;
.LOGOFF;
tac_viewpoint1:/opt/teradata/client/14.10/bin #
tac_viewpoint1:/opt/teradata/client/14.10/bin # fexp <fs.fxp
========================================================================
= =
= FastExport Utility Release FEXP.14.10.00.04 =
= Platform LINUX =
= =
========================================================================
= =
= Copyright 1990-2013 Teradata Corporation. ALL RIGHTS RESERVED. =
= =
========================================================================
**** 06:21:06 UTY2411 Processing start date: TUE DEC 02, 2014
========================================================================
= =
= Logon/Connection =
= =
========================================================================
0001 .LOGTABLE utillog ;
0002 .logon client05/dbc1,;
**** 06:21:07 UTY8400 Teradata Database Release: 14.00.06.05
**** 06:21:07 UTY8400 Teradata Database Version: 14.00.06.06
**** 06:21:07 UTY8400 Default character set: ASCII
**** 06:21:07 UTY8400 Current RDBMS has UDT support
**** 06:21:07 UTY8400 Current RDBMS has Large Decimal support
**** 06:21:07 UTY8400 Current RDBMS has Statement Info Parcel support
**** 06:21:07 UTY8400 Current RDBMS has FEXP w/o Spooling support
**** 06:21:07 UTY8400 Current RDBMS has TASM support
**** 06:21:07 UTY8400 Maximum supported buffer size: 1M
**** 06:21:07 UTY8400 Data Encryption supported by RDBMS server
**** 06:21:07 UTY1008 RDBMS failure: 3807, Object 'SYSLIB.DBSRETRYABLEERRORS'
does not exist.
**** 06:21:07 UTY6687 Warning: The job will use its internal retryable error
codes.
**** 06:21:08 UTY6211 A successful connect was made to the RDBMS.
**** 06:21:08 UTY6217 Logtable 'DBC1.utillog' has been created.
========================================================================
= =
= Processing Control Statements =
= =
========================================================================
0003 .BEGIN EXPORT
SESSIONS 2;
0004 .EXPORT OUTFILE ttyyuueerr;
0005 sel * from dbc1.testdate;
0006 .END EXPORT;
========================================================================
= =
= FastExport Initial Phase =
= =
========================================================================
**** 06:21:08 UTY8700 Options in effect for this FastExport task:
. Sessions: 2 session(s).
. Mode: INDICATOR
. Blocksize: 64330 bytes.
. Outlimit: No limit in effect.
**** 06:21:08 UTY8715 FastExport is submitting the following request:
Select NULL from DBC1.utillog where (LogType = 220) and (Seq = 1) and
(FExptSeq = 0);
**** 06:21:08 UTY8715 FastExport is submitting the following request:
SET QUERY_BAND='UTILITYNAME=FASTEXP;' UPDATE FOR SESSION;
**** 06:21:08 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD FOR BT;BEGIN FASTEXPORT;
**** 06:21:08 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD FOR sel * from dbc1.testdate;
**** 06:21:08 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD END;
**** 06:21:10 UTY8705 EXPORT session(s) requested: 2.
**** 06:21:10 UTY8706 EXPORT session(s) connected: 2.
**** 06:21:10 UTY8715 FastExport is submitting the following request:
BT;BEGIN FASTEXPORT;
**** 06:21:10 UTY8715 FastExport is submitting the following request:
SELECT MiscInt1 (INTEGER), MiscInt2 (INTEGER), MiscInt3 (INTEGER),FExptSeq
(INTEGER), FExptCkpt (VARBYTE(1024)) from DBC1.utillog WHERE (LogType =
210) and (Seq = 1) and (FExptSeq IN (SELECT MAX(FExptSeq) from DBC1.utillog
where (LogType = 210) and (Seq = 1)));
**** 06:21:10 UTY8715 FastExport is submitting the following request:
SELECT MiscInt1 (INTEGER), MiscInt2 (INTEGER), MiscInt3 (INTEGER),FExptSeq
(INTEGER), FExptCkpt (VARBYTE(1024)) from DBC1.utillog WHERE (LogType =
212) and (Seq = 1) and (FExptSeq IN (SELECT MAX(FExptSeq) from DBC1.utillog
where (LogType = 212) and (Seq = 1)));
**** 06:21:10 UTY8715 FastExport is submitting the following request:
sel * from dbc1.testdate;
**** 06:21:10 UTY8724 Select request submitted to the RDBMS.
**** 06:21:10 UTY8725 Select execution completed. 1 data blocks generated.
**** 06:21:10 UTY8756 Retrieval Rows statistics:
Elapsed time: 00:00:00 (hh:mm:ss)
CPU time: 0 Seconds
MB/sec: N/A
MB/cpusec: N/A
**** 06:21:10 UTY8715 FastExport is submitting the following request:
INS DBC1.utillog (LogType, Seq) VALUES (220, 1)
**** 06:21:10 UTY8715 FastExport is submitting the following request:
END FASTEXPORT;ET;
**** 06:21:11 UTY8710 Processing complete for this FastExport task.
========================================================================
= =
= FastExport Task Complete =
= =
========================================================================
**** 06:21:12 UTY1024 Session modal request, 'SET
QUERY_BAND='UTILITYNAME=FASTEXP;' UPDATE FOR SESSION;', re-executed.
**** 06:21:12 UTY8722 4 total records written to output file.
0007 .LOGOFF;
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 06:21:12 UTY6216 The restart log table has been dropped.
**** 06:21:12 UTY6212 A successful disconnect was made from the RDBMS.
**** 06:21:12 UTY2410 Total processor time used = '0.61 Seconds'
. Start : 06:21:05 - TUE DEC 02, 2014
. End : 06:21:12 - TUE DEC 02, 2014
. Highest return code encountered = '0'.
tac_viewpoint1:/opt/teradata/client/14.10/bin # cat ttyyuueerr
¨
¾i
JPÿÿ
,j
tac_viewpoint1:/opt/teradata/client/14.10/bin #
######################
######################
convert the data types to char and retry
######################
######################
BTEQ -- Enter your SQL request or BTEQ command:
select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from dbc1.testdate;
select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from dbc1.testdate;
*** Query completed. 4 rows found. 2 columns returned.
*** Total elapsed time was 1 second.
to_char(date_col,'DD/MM/YYYY') to_char(key_col)
------------------------------ ----------------------------------------
30/03/3001 3
10/01/2001 1
02/02/2020 50
20/02/2001 2
BTEQ -- Enter your SQL request or BTEQ command:
tac_viewpoint1:/opt/teradata/client/14.10/bin # cat fs.fxp
.LOGTABLE utillog ;
.logon client05/dbc1,dbc1;
.BEGIN EXPORT
SESSIONS 2;
.EXPORT OUTFILE ttyyuueerr;
select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from dbc1.testdate;
.END EXPORT;
.LOGOFF;
tac_viewpoint1:/opt/teradata/client/14.10/bin #
tac_viewpoint1:/opt/teradata/client/14.10/bin # fexp <fs.fxp
========================================================================
= =
= FastExport Utility Release FEXP.14.10.00.04 =
= Platform LINUX =
= =
========================================================================
= =
= Copyright 1990-2013 Teradata Corporation. ALL RIGHTS RESERVED. =
= =
========================================================================
**** 06:26:19 UTY2411 Processing start date: TUE DEC 02, 2014
========================================================================
= =
= Logon/Connection =
= =
========================================================================
0001 .LOGTABLE utillog ;
0002 .logon client05/dbc1,;
**** 06:26:20 UTY8400 Teradata Database Release: 14.00.06.05
**** 06:26:20 UTY8400 Teradata Database Version: 14.00.06.06
**** 06:26:20 UTY8400 Default character set: ASCII
**** 06:26:20 UTY8400 Current RDBMS has UDT support
**** 06:26:20 UTY8400 Current RDBMS has Large Decimal support
**** 06:26:20 UTY8400 Current RDBMS has Statement Info Parcel support
**** 06:26:20 UTY8400 Current RDBMS has FEXP w/o Spooling support
**** 06:26:20 UTY8400 Current RDBMS has TASM support
**** 06:26:20 UTY8400 Maximum supported buffer size: 1M
**** 06:26:20 UTY8400 Data Encryption supported by RDBMS server
**** 06:26:20 UTY1008 RDBMS failure: 3807, Object 'SYSLIB.DBSRETRYABLEERRORS'
does not exist.
**** 06:26:20 UTY6687 Warning: The job will use its internal retryable error
codes.
**** 06:26:21 UTY6211 A successful connect was made to the RDBMS.
**** 06:26:21 UTY6210 Logtable 'DBC1.utillog' indicates that a restart is in
progress.
========================================================================
= =
= Processing Control Statements =
= =
========================================================================
0003 .BEGIN EXPORT
SESSIONS 2;
0004 .EXPORT OUTFILE ttyyuueerr;
0005 select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from dbc1.testdate;
0006 .END EXPORT;
========================================================================
= =
= FastExport Initial Phase =
= =
========================================================================
**** 06:26:21 UTY8700 Options in effect for this FastExport task:
. Sessions: 2 session(s).
. Mode: INDICATOR
. Blocksize: 64330 bytes.
. Outlimit: No limit in effect.
**** 06:26:21 UTY8715 FastExport is submitting the following request:
Select NULL from DBC1.utillog where (LogType = 220) and (Seq = 1) and
(FExptSeq = 0);
**** 06:26:23 UTY8715 FastExport is submitting the following request:
SET QUERY_BAND='UTILITYNAME=FASTEXP;' UPDATE FOR SESSION;
**** 06:26:23 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD FOR BT;BEGIN FASTEXPORT;
**** 06:26:23 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD FOR select to_char(date_col,'DD/MM/YYYY'),to_char(key_col)
from dbc1.testdate;
**** 06:26:23 UTY8715 FastExport is submitting the following request:
CHECK WORKLOAD END;
**** 06:26:25 UTY8705 EXPORT session(s) requested: 2.
**** 06:26:25 UTY8706 EXPORT session(s) connected: 2.
**** 06:26:25 UTY8715 FastExport is submitting the following request:
BT;BEGIN FASTEXPORT;
**** 06:26:25 UTY8715 FastExport is submitting the following request:
SELECT MiscInt1 (INTEGER), MiscInt2 (INTEGER), MiscInt3 (INTEGER),FExptSeq
(INTEGER), FExptCkpt (VARBYTE(1024)) from DBC1.utillog WHERE (LogType =
210) and (Seq = 1) and (FExptSeq IN (SELECT MAX(FExptSeq) from DBC1.utillog
where (LogType = 210) and (Seq = 1)));
**** 06:26:25 UTY8715 FastExport is submitting the following request:
SELECT MiscInt1 (INTEGER), MiscInt2 (INTEGER), MiscInt3 (INTEGER),FExptSeq
(INTEGER), FExptCkpt (VARBYTE(1024)) from DBC1.utillog WHERE (LogType =
212) and (Seq = 1) and (FExptSeq IN (SELECT MAX(FExptSeq) from DBC1.utillog
where (LogType = 212) and (Seq = 1)));
**** 06:26:25 UTY8715 FastExport is submitting the following request:
select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from dbc1.testdate;
**** 06:26:25 UTY8724 Select request submitted to the RDBMS.
**** 06:26:25 UTY8725 Select execution completed. 1 data blocks generated.
**** 06:26:25 UTY8756 Retrieval Rows statistics:
Elapsed time: 00:00:00 (hh:mm:ss)
CPU time: 0.01 Seconds
MB/sec: N/A
MB/cpusec: 0.00619888
**** 06:26:25 UTY8715 FastExport is submitting the following request:
INS DBC1.utillog (LogType, Seq) VALUES (220, 1)
**** 06:26:25 UTY8715 FastExport is submitting the following request:
END FASTEXPORT;ET;
**** 06:26:26 UTY8710 Processing complete for this FastExport task.
========================================================================
= =
= FastExport Task Complete =
= =
========================================================================
**** 06:26:27 UTY1024 Session modal request, 'SET
QUERY_BAND='UTILITYNAME=FASTEXP;' UPDATE FOR SESSION;', re-executed.
**** 06:26:27 UTY8722 4 total records written to output file.
0007 .LOGOFF;
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 06:26:28 UTY6216 The restart log table has been dropped.
**** 06:26:28 UTY6212 A successful disconnect was made from the RDBMS.
**** 06:26:28 UTY2410 Total processor time used = '0.62 Seconds'
. Start : 06:26:19 - TUE DEC 02, 2014
. End : 06:26:28 - TUE DEC 02, 2014
. Highest return code encountered = '0'.
tac_viewpoint1:/opt/teradata/client/14.10/bin #
tac_viewpoint1:/opt/teradata/client/14.10/bin # cat ttyyuueerr
30/03/30013
10/01/20011
02/02/202050
20/02/20012
tac_viewpoint1:/opt/teradata/client/14.10/bin #
#########################
#########################
Thanks,
sandeep.
GANGA SANDEEP KUMAR
How to skip BOM (Byte Order Mark )in BTeq scripts - forum topic by arbiswas
Hi Experts,
My script (generated by automated process) has BOM characters. After generation, I need to run it in Bteq. The script is faling because of BOM character. Is there any command / provison / setting in Bteq so that I can recognize / skip the BOM character while execution.
Thanks and Regards,
Arindam
Mload utility is loading unexpected data into table - forum topic by ksaikrishna
Hi All,
I have build below Mload script to load the data into table.Sample data and final output in table also given below
.LOGTABLE tdbname.Logtable001_mld;
.logon <Dbname>/usename,password;
drop table dbname.Employee;
drop table dbname.WT_Employee;
drop table dbname.ET_Employee;
drop table dbname.UV_Employee;
create table dbname.Employee(
EmpNo SMALLINT,
DeptNo SMALLINT,
Salary DECIMAL (8,2)
)
unique primary index(EmpNo ) ;
.BEGIN MLOAD TABLES dbname.Employee;
.LAYOUT Record_Layout;
.FIELD EmpNo * SMALLINT;
.FIELD DeptNo * SMALLINT;
.FIELD Salary * DECIMAL (2,2);
.DML LABEL insdml;
INSERT INTO dbname.Employee (EmpNo,DeptNo, Salary)VALUES(:EmpNo,:DeptNo, :Salary);
.IMPORT INFILE /home/WBTstudents/wbt7412/cust_multi_load_1.txt
format text
LAYOUT Record_Layout
APPLY insdml;
.END MLOAD;
.LOGOFF;
.QUIT;
Sample data in file :
201012000.52
221012000.52
DAta in table after loading :
12,338 12,337 0.49
12,850 12,337 0.49
BTEQ issue with loading CLOB ! - forum topic by ma255076
hello,
im kinda new to the tools, I got an issue running my BTEQ script with a ,CLOB column.
when I run it , I get "Teradata Database returned an invalid LOB token"
__________________
.IMPORT VARTEXT ';' LOBCOLS=1 FILE=GIS_SAMPLE.txt;
.QUIET ON
.REPEAT *
USING(
OBJECTID VARCHAR (100),
POINTSARRAY CLOB AS DEFERRED)
INSERT INTO Yaya.GIS_sample(
OBJECTID,
POINTSARRAY
)
VALUES (
:OBJECTID,
:POINTSARRAY
);
.quit;
___________________
TPT ODBC Operator - response (1) by feinholz
Starting in TPT 15.0 we bundle the DataDirect drivers with TPT.
You will need to download the latest efix patches in order to use those bundled drivers.
Mload utility is loading unexpected data into table - response (1) by Fred
.LAYOUT describes the input data, not the table into which you are loading. Your input file is text, not binary.
Looks like in your case EmpNo may be CHAR(4), DeptNo may be CHAR(2), and Salary may be CHAR(7)?
How to skip BOM (Byte Order Mark )in BTeq scripts - response (1) by Fred
Did you tell BTEQ the input script was Unicode, e.g. with -c UTF16 option on the command line?
TPT and Windows PowerShell - forum topic by raestadilla
Hi!
I'm trying to run a TPT job using Windows PowerShell but I'm getting this error:
PS C:\Teradata\TPT> Get-Content .\district.tpt | tbuild -f
Error launching tbuildexe.exee": The system cannot find the file specified. (2)
When I use BTEQ scripts, I'm not having any problems.
And maybe to clarify, can you run a TPT job directly from powershell?
Thanks!
RA
TPT and Windows PowerShell - response (1) by raestadilla
Got the answer on my question.
Definitely tpt works on powershell but you need to use a different command which is:
tbuildexe.exe -f script_name.tpt
This will work fine in 32-bit environments but if you're using 64 bit, you need to create a new environment variable named TWB_ROOT that contains C:\Program Files (x86)\Teradata\Client\15.00\Teradata Parallel Transporter\ path.
thanks!
TPT and Windows PowerShell - response (2) by feinholz
Please do NOT use tbuildexe.exe to run TPT!
That is not the right approach and we will not support you when you do this.
TWB_ROOT is NOT an environment variable that the user should be setting at all.
The proper command is "tbuild".
"tbuild" actually maps (links) to a program called "tptlaunch".
"tptlaunch" sets up the environment for the rest of TPT.
Again, do NOT use tbuildexe.exe.
tbuild with -v option - forum topic by islanderman
Hi, I wanted to run the tbuild command using the local variables file. Currently I have it running successfully without the -v option, but the local file is in the same path as the tpt script I'm running. If I use the -v option with the path to the file and file name, it says it can't find the file, but it lists the directory where the script is running, not where I code the script to check. The -f option works with finding the load file, but the -v option is not. Am I not using the proper option?
$loadfile = "/opt/teradata/client/conf/LoadTable.load";
$attrfile = "/opt/teradata/client/conf/LoadTable.attr";
path of script is "/opt/teradata/client/bin";
tbuild -f $loadfile -v $attrfile
error is
TPT_INFRA: TPT02019: Error: opening file '/opt/teradata/client/bin/LoadTable.attr': "No such file or directory" (error code 2).
TPT ODBC Operator - response (2) by toadrw
Great news! Thank you!
Trimming spaces from fields - forum topic by u156531
I'm using SQL Assistant to output the results from a query to a file. Is there an option in SQL Assistant to trim the leading and trailing blanks when sending the SQL results to a file? I was hoping to accomplish this without coding a trim function to every field.
Thanks, Mark
Mload utility is loading unexpected data into table - response (2) by ksaikrishna
Hi Fred,
I amend the code as you suggested .Still i am facing the same issue.
Can some one help me on this ?
Thanks,
Sai
How to skip BOM (Byte Order Mark )in BTeq scripts - response (2) by arbiswas
No, I didn't. So what should i write in the command line so that I can skip BOM present in the script? Thanks - Arindam
The zip/gzip support was added to 13.10 in efix 08.
Their were some additional fixes in efix 020. Please upgrade to the currentlatest 13.1o efix.
Thanks