Prerequisite
Make sure you have BTEQ installed on your machine.
To install BTEQ, visit https://downloads.teradata.com/. Under Top Downloads, select your operating system for Tools and Utilities. Download the Base package suitable for your system, it is a format similar to TTU 20.00.08.00 OS – Base, where OS is your operating system.
After the download is complete, do one of the following:- Linux: Extract the zip tar file into a temporary folder and run the Linux rpm.
- Windows: Extract the zip file into a temporary folder and run setup.exe.
MacOS: Extract the zip file into a temporary folder and run TeradataToolsAndUtilitiesversion.pkg.
- Make sure you have the options for Specifying tdextroutine Options and Environment Variables set before running the BTEQ scripts.
- Enter bteq on your command prompt or terminal.
- Run the following command under bteq:
.RUN FILE=migrated_script.bteq
The migrated_script.bteq is the SQL script that was migrated using XRMigrationTool. Make sure to put the relative path of the script while running .RUN FILE command.
An alternate way to run the script:bteq < migrated_script.bteq