Starting an Access Module Export Job Without Teradata OleLoad
To successfully export data using the Teradata OLE DB Access Module without the Teradata OleLoad GUI (that is, using a Teradata utility), a job script must reference a previously saved access module job that designated Teradata Database as the data source in the Select a source field of the OleLoad GUI.
Depending on the information designated in the job script, one of the following occurs:
Using BTEQ
To export from Teradata Database using BTEQ
1 Select Start >Programs >Teradata Client >BTEQ to open Teradata BTEQ from the Windows desktop.
2 For the EXPORT command, specify OLEDB_AXSMOD as the DLL for the Teradata OLE DB Access Module.
3 For the FILE parameter and operating specification, use one of the following, where an .amj file is a previously saved access module job:
FILE Parameter |
Operating Specification |
Outcome |
"<pathname>.amj" |
'noprompt' |
Script runs if no errors exist. If errors exist, the script fails. |
"<pathname>.amj" |
'<blank>' |
The Teradata OLE DB AXSMOD dialog box opens so you can run the script using the access module. |
"UNTITLED" |
'noprompt' |
Script fails. Instead, specify an .amj file name instead of UNTITLED. |
"UNTITLED" |
'<blank>' |
The Teradata OLE DB AXSMOD dialog box opens. |
BTEQ Export Example
.LOGON bubbater/dbc,dbc ;
database bubba ;
.EXPORT indicdata file="C:\fexp.amj" AXSMOD OLEDB_AXSMOD 'noprompt';
SELECT col1, col2 from tst10k ;
.EXPORT reset
.LOGOFF;
Using FastExport
To export from Teradata Database using FastExport
1 Select Start >Programs >Teradata Client >FastExport to open Teradata FastExport from the Windows desktop.
2 For the EXPORT command, specify OLEDB_AXSMOD as the DLL for the Teradata OLE DB Access Module.
3 For the .EXPORT OUTFILE and operating specification, use one of the following, where an .amj file is a previously saved access module job:
FILE Parameter |
Operating Specification |
Outcome |
"<pathname>.amj" |
'noprompt' |
Script runs if no errors exist. If errors exist, the script fails. |
"<pathname>.amj" |
'<blank>' |
The Teradata OLE DB AXSMOD dialog box opens so you can run the script using the access module. |
"UNTITLED" |
'noprompt' |
Script fails. Instead, specify an .amj file name instead of UNTITLED. |
"UNTITLED" |
'<blank>' |
The Teradata OLE DB AXSMOD dialog box opens. |
FastExport Example
.LOGTABLE job_account_Log;
LOGON perform/test,test ;
DATABASE test2 ;
.BEGIN EXPORT SESSIONS 4 ;
SELECT name, salary FROM job_account ;
.EXPORT OUTFILE "Untitled" AXSMOD Oledb_Axsmod 'noprompt';
.END EXPORT ;
.LOGOFF ;
Using Teradata PT
To export data from Teradata Database using Teradata PT, ensure that the Teradata PT job script uses the following specifications:
For information about exporting data from Teradata Database using Teradata PT, see “Extracting Data” in the Teradata Parallel Transporter User Guide (B035‑2445).