Book Image

Teradata Cookbook

By : Abhinav Khandelwal, Viswanath Kasi, Rajsekhar Bhamidipati
Book Image

Teradata Cookbook

By: Abhinav Khandelwal, Viswanath Kasi, Rajsekhar Bhamidipati

Overview of this book

Teradata is an enterprise software company that develops and sells its eponymous relational database management system (RDBMS), which is considered to be a leading data warehousing solutions and provides data management solutions for analytics. This book will help you get all the practical information you need for the creation and implementation of your data warehousing solution using Teradata. The book begins with recipes on quickly setting up a development environment so you can work with different types of data structuring and manipulation function. You will tackle all problems related to efficient querying, stored procedure searching, and navigation techniques. Additionally, you’ll master various administrative tasks such as user and security management, workload management, high availability, performance tuning, and monitoring. This book is designed to take you through the best practices of performing the real daily tasks of a Teradata DBA, and will help you tackle any problem you might encounter in the process.
Table of Contents (19 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Setting up Teradata SQLA


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.

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.

Note

SQLA can informally be referred to as a lightweight version of Studio or Express; you will find it easier to navigate and use.

 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:

  1. Click on the plug icon in the top-left corner; now you can either select file data source or machine data source.
  2. Click on New... if you don't have a connection file. Select user or system data source:
  1. 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.
  2. 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