Working with Utilities in TeraData

UTILITIES

A utility is nothing but application (or) a script (or) collection of statements As a block, it is a tool , which LOADS And UNLOADS The Data There many utilities available our of them the very important are

BTEQ- Load/Unload

FAST LOAD-LOAD

MULTILOAD-LOAD

TPUMP-LOAD

TPT[Tera data parallel Transporter]- Load/Unload

TPT API- Load/unload

OLE LOAD- LOAD/UNLOAD

Etc.

 

Utilities Modes

Every Utility RUNS in 2ways

  1. Interactive mode
  2. Batch mode

 

a) Interactive mode

Here one by one statement executed after opening the utility window

 

b) Batch mode

2Collection of statements as a script executed here

2live open any editor like note pad, word pad etc. and writes the collection of statement

2We can save this script any extension[Tat.ddt, out etc]But tera data Recommending the below extension to differentiate one script to another script

 

Utilities Execution

There are 3 ways

  1. Open the utility and Run one by one statement
  2. Go to the corresponding utility and execute the utility script Run command Run File= <File name>;
  3. This is standard way

 

IN WINDOWS

BTEQ –  Start  2 Run  2 cmdàBTEQ<[Script path]>[Log file path]

FLOAD –   Start  2 Run  2 cmd 2 FLOAD LOAD<[Script path]>[Log file path]

TPUMP –   Start  2 Run 2 cmd 2 TPUMP <[Script path]>[Log file path]

FEXP –   Start  2 Run  2 cmd  2FEXP <[Script path]>[Log file path]

Mload: Start  2 Run  2 cmd  2 Mload <[Script path]>[Log file path]

 

IN UNIX

BTEQ –    $Sh> BTEQ<[ Script path]/TEE< LOG FILE PATH >(OR)

BTEQ –    $Sh> BTEQ<[ Script path >[LOG FILE PATH]

FLOAD –    Sh> FASTLOAD<[ Script path]/TEE< LOG FILE PATH >(OR)

FLOAD –    $Sh> FASTLOAD <[ Script path >[LOG FILE PATH]

MLOAD –    $Sh> Mload <[ Script path]/TEE< LOG FILE PATH >(OR)

MLOAD –    $Sh> Mload <[ Script path >[LOG FILE PATH]

TPUMP –   $Sh> TPUMP <[ Script path]/TEE< LOG FILE PATH >(OR)

TPUMP –    $Sh> TPUMP <[ Script path >[LOG FILE PATH]

FEXP –    $Sh> FEXP <[ Script path]/TEE< LOG FILE PATH >(OR)

FEXP –    $Sh> FEXP <[ Script path >[LOG FILE PATH]

 

 Note

TEE Display the LOG Information on the console  as well as Re- Directs it to the specified file

 

Uses of Log file

–   Ensuring Script success or fail

GO TO LOGFILE LOG File And Read the Last Statement which contains the Return code, According to the return code we have to take appropriate action

 

Return codes and symbols

0 2  Job complete normally

2 2  User alert to Log on to the Tera data DBS

4 2  Working

8 2  User error

12 2  Fatal error[Connection Related Issues possible here]

16 2  If no MSG destination is available or typical error

 

Note

2  Each Return code belongs to set of error codes

2  In Unix to know the script ran success or not without [opening log ile]

 

Open log file

If[$?]=0 means script success

If[$?]=other than o means script fail

 

Utility commands and keywords

  1. Generally utility commands storks with’.’[DOT]
  2. Generally SQL Statements End with;

comment notation/*  */BTET Mode

—ANSI Mode

Some Important commands and key works

  1. .ERRORCODE
  2. .ACTIVITY COUNT
  3. .ERROR LEVEL
  4. .REMARK
  5. .REPEAT

 

All utilities

  1. .ACCEPT
  2. .SET
  3. .DISPLAY
  4. .ROUTE MESSAGES
  5. .IMPORT
  6. .EXIT
  7. .QUIT
  8. .OS CLS
  9. .SHOW CONTROLS
  10. .QUIET ON/OFF
  11. .LOG ON
  12. .LOG OFF

 

ADDITONAL COMMANDS WITH OUT’’[DOT]

  1. TENACITY
  2. SLEEP
  3. CHECK POINT
  4. SESSION
  5. PACK
  6. RECORD
  7. USING
  8. DEFINE
  9. LAYOUT
  10. ERRLIMIT
  11. RECORD
  12. .ERRQOUL
  13. DECLARE
  14. OS<Command NAME>– PARTICULAR OS COMMAND

 

Note

Refer to the material for more syntax, example of this command in the tera data new and advanced material page

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Working with Utilities in TeraData"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Support


    Please leave a message and we'll get back to you soon.
    Three + 6