mini how to fast export

Upload: manimala-vidyasagar

Post on 06-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Mini How to Fast Export

    1/6

    Teradata FastExport

    Introduction to FastExportFastExport can work on Unix, AIX, Solaris, Windows 95/2000/NT/XP where client systems areconnected to Teradata RDBMS through network. It also runs on Channel-attached client systemswith VM and MVS operating systems. FastExport runs in two modes : Interactive and Batch. OneFastExport command begins on a new line with a dot ( .) character and ends with a semicolon ( ; )character. These commands perform two kinds of activities when called. The first kind of command is for Support activities such as establish sessions with RDBMS and set the executingenvironment and so on. The second kind is for Task activities which specify the actual processingthat takes place for each FastExport task.

    Using FastExport

    In interactive mode, FastExport use terminal screen and keyboard as the standard output andinput streams. In batch mode, you can use > and < redirect the standard output / input streams. If you want to invoke FastExport in interactive mode, use command :

    c:\ncr\fexq

    You can invoke it in batch mode by using commandc:\ncr\fexq [options] < infile > outfile

    Here, infilename is a FastExport job script file which includes all FastExport commands and SQLstatements. The outfile is the output file. But it is not the export data file. We need to specify theexport data file by using FastExport command EXPORT OUTFILE. The options include :

    -b /* only print the brief info which can beused to determine success or failure. */

    -c characterset_name /* the name can be ASCII ( 255 ) and -c characterset_code KANJISJIS_0S ( 119 ) */

    -e filename /* specifies a file into which FastExportwrite error message */

    -r FastExport Command /* the FastExport Command may be RUNFILE, so you can run a job script */

    -M /* maximal number of sessions */-N /* minimal number of sessions */

    When FastExport is executed, it will check whether you specify the above options with fexq command. If not, it will check whether some option parameters are specified in job scripts. If notagain, then check FastExport configuration file. At last, it will use the default setting. So you canwrite a configuration file to specify these options, the name of the file must be fexpcfg.dat

  • 8/2/2019 Mini How to Fast Export

    2/6

    and it must be placed under the current directory for your FastExport utility software. Or youneed to use an environment variable FEXPLIB to specify the directory.

    In network-attached environment, if you want to terminate the FastExport, please executeLOGOFF command and press CTRL+C. If you want to restart the FastExport jobs, yourFastExport will utilize the log table in working database specified by LOGTABLE.

    FastExport Example

    In this example, we will export the data from the table, students , in the databasestudent_info whose owner is user john . For specify the default environment setting,

    we create a configuration file, fexpcfg.dat , for the job and let FEXPLIB point to itsdirectory. See the following two figures :

  • 8/2/2019 Mini How to Fast Export

    3/6

    Then we need to edit the FastExport job script file, fexp_script , which is under the directorywhere FastExport works on.

  • 8/2/2019 Mini How to Fast Export

    4/6

    Because we specify the format of the file which contains the values used as SELECT constraintas BINARY, we need to use some tools such as VC++ studio to edit a binary file. See thefollowing figures :

  • 8/2/2019 Mini How to Fast Export

    5/6

    Now, we can run FastExport to finish the jobs described in fexp_script .

    Because we set BRIEF as off in the configuration file, we can see many messages printed on thescreen of the client terminal. One message is shown that a log table for FastExport alreadycreated in the database student_info . Then we can see the exported data in the file,fexp_expdata .

    After executing the export job, we also get the MultiLoad script file mloadscript as thefollowing

  • 8/2/2019 Mini How to Fast Export

    6/6