Skip to content
  • HOME
  • BIGDATA
    • Hive
    • Hadoop
    • Spark
  • RDBMS
    • MS SQL Server
    • Teradata
    • MySQL
  • PROGRAMMING
    • JAVA
  • SCRIPTING
    • Python
    • Shell Script
  • PROJECTS
  • CONTACT US

Teradata BTEQ Logon command

By emanator | 17th October 2021
0 Comment

Teradata BTEQ utility is one of the most powerful and efficient tools of the Teradata system to perform many operations. In this post, we will see how the BTEQ logon is working.

BTEQ Logon example

Let us see a sample script with bteq logon command. The logon command is followed but the bteq logoff command.

bteq <<!
.LOGON TeradataServer/username,password
.IF ERRORCODE > 0 THEN .EXIT 1
.LOGOFF
!

Let us break the above BTEQ commands and understand each of them

COMMAND DESCRIPTION
bteq <<! This will invoke the BTEQ utility. ‘<<!’ represents the beginning of the statement blocks
.LOGON TeradataServer/username,password This is the main BTEQ LOGON command. This command will log you into the Teradata system with the credentials you have provided.
.IF ERRORCODE > 0 THEN .EXIT 1 This statement will exit the BTEQ if there is an error in the code
.LOGOFF This will log off the current user from Teradata
! This represents the end of statements

Also read,

  1. BTEQ export table to file
  2. ERROR handling in BTEQ
  3. IF ELSE check in BTEQ
  4. BTEQ Export without header
Category: Teradata Tags: bteq login in teradata, errorcode in bteq, Teradata bteq, teradata bteq logon
Post navigation
← INSTR function in Teradata Java parse SQL Select query using JSQLParser →

Categories

  • BigData
    • Hadoop
    • Hive
    • Spark
  • PROGRAMMING
    • JAVA
    • Python
  • RDBMS
    • MS SQL Server
    • MySQL
    • Teradata
  • SCRIPTING
    • Shell Script
  • SUBJECTS
    • Data Structures
  • TECHNOLOGY

Recent Posts

  • Java parse SQL Select query using JSQLParser
  • Teradata BTEQ Logon command
  • INSTR function in Teradata
  • INDEX function in Teradata
  • Concatenation of strings in Teradata
techieshouts.com
Home | About us | Privacy policy | Contact us
Iconic One Theme | Powered by Wordpress