We will now turn our focus to the traditional but easy to use tool, SQL Assistant (SQLA). We now have a SQLA Java version just like Teradata Studio or Teradata Studio Express.
Setting up Teradata SQLA
Getting ready
For SQLA to work, you need to download it from the developer.teradata.com website and download Teradata Tools and Utilities, also known as TTU. Once downloaded and installed, start making the connection using ODBC, .NET, or JDBC.
Here, we will use SQLA 16.0. It is highly recommended that you use the TTU version that matches or is higher than the major release version number of the Teradata Database that you intend to connect with. So, if you are on Teradata Database 15.10, use TTU 15.10 or 16. TTU 13.10 is not recommended. Now that we have this covered, let's move on to the connection.
How to do it...
Use the following steps to establish a connection:
- Click on the plug icon in the top-left corner; now you can either select file data source or machine data source.
- Click on New... if you don't have a connection file. Select user or system data source:
- Then select the option of Teradata Database ODBC driver 16.00; after this, you will see the screen for providing the name of your data connection and source IP.
- Enter your credentials; you have the option to save the password if you don't want to enter it every time you connect to the database:
Wouldn't it be great to have an option to run SQL using the command-line interface with SQLA?
How it works...
Teradata SQLA allows you to connect to a data source using the ODBC and .NET framework. When you install SQLA from TTU toolkit, make sure to check all the options. You will have two executables:
- TTU_BASE has the following:
- ODBC driver
- BTEQ
- All the loading tools, such as fastexport, fastload, and many others
- Named pipe modules
- Websphere access modules
- .NET data provider
- C preprocessor 2
- Tearadata adminstrator
- SQLA
- Teradata Wallet and many more
- TTU_DBM has the following:
- Index wizard
- BTEQ
- ODBC driver
- Query scheduler admin, client, server
- TSET
- Workload analyzer
- Visual explain
- Teradata Wallet
There's more...
Here are some shortcuts to make your daily job easier:
- F2: It will open query builder, with syntax for all SQL queries
- F5: Execute SQL query
- F6: Explain plan for SQL query
- F9: Execute SQL queries in parallel
- F10: Abort SQL query
- F11: Display last error encountered
- Ctrl + N: New SQL query window
- Ctrl + Q: Format SQL query
- Ctrl + U: Convert to UPPERCASE
- Ctrl + H: Find and replace