See the Basic Teradata® Query Reference, B035-2414 for detailed information on how to use BTEQ.
- Change directory to the BTEQ directory.
- Start BTEQ:
bteq
Output similar to the following appears:Teradata BTEQ 20.00.00.00 for platform. PID nnnn. Copyright 1984-2023 Teradata. All rights reserved. Enter your logon or BTEQ command:
- Log on to Analytics Database:
.logon dbcpath/username
Enter the BTEQ logon command with a logon ID. Include the dbcpath if the Vantage dbcpath is not the default i_dbcpath specified in clispb.dat.
- When prompted, enter the password.For example, if Analytics Database has a dbcpath of Finance, the username is fml, and the password is fml, type:
- .logon Finance/fml
- Password: fml
Output similar to the following appears:*** Logon successfully completed. *** Teradata Database Release is 20.00.00.00 *** Teradata Database Version is 20.00.00.00 *** Transaction Semantics are BTET. *** Session Character Set Name is 'ASCII'. *** Total elapsed time was 1 second. BTEQ -- Enter your SQL request or BTEQ command:
For information about security and connecting to Analytics Database, see Teradata Vantage™ - Analytics Database Security Administration, B035-1100. - Submit a sample Teradata SQL query:
SELECT time;
If the test passes, output similar to the following appears.*** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. Time -------- 11:09:11
- To view the version numbers for BTEQ and the key Teradata software it depends on, use the following BTEQ command:
.SHOW VERSIONS
which produces output similar to the following:.SHOW VERSIONS BTEQ Version 20.00.00.00 for platform CLIV2 : 20.00.00.00 COPERR.H : 20.00.00.00 COPTYPES.H : 20.00.00.00 DBCAREA.H : 20.00.00.00 DBCERR.H : 20.00.00.00 DBCHQEP.H : 20.00.00.00 MOSIIF.H : 20.00.00.00 PARCEL.H : 20.00.00.00 PIOM : 20.00.00.00 TDICU : 20.00.00.00 TDWALLET : 20.00.00.00 Database : 20.00.00.00 BTEQ linking date is Jun 29 2023.
- Log off of Analytics Database and exit BTEQ.