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

Connecting to the Teradata system


Now, before starting up with our very first query, you need to know that express works in the ANSI TMODE. You need to change to TERA mode manually. 

Additionally, you can have a multiple connections to the same database connection or a different one.

Note

TERADATA MODE is not Case sensitive, where as ANSI MODE is CASE sensitive. Also, in TERADATA MODE each transaction is committed implicitly and in ANSI MODE transaction has to be committed explicitly.

How to do it...

  1. Let's execute our very first query:
/*Sample query*/
sel * from dbc.dbcinfo;
  1. The output of the preceding query will give us the current version of the Teradata Database system. Yes, we are on 15.10.03.07:

This is a heavy tool, so it will consume more resources from your PC compared to the handy and breezy SQL Assistant. We'll be exploring SQL Assistant in the later part of this chapter.

There's more...

Humans and software—we judge them on the basis of their characteristics. Let's explore some of the important options available with Teradata Studio Express.

Using Studio tool options

Here are some of the tool options that we will cover:

  • SQL compare: Comparing two text documents is the basic necessity of the coding community. There are many tools for this job. However, when you have a built-in feature for it, you don't need to go anywhere else. You ask how to use it? Click on the Project Explorer tab (next to the Data Explorer tab). Right-click on the SQL tab and create SQL text files that you need to compare. Select both files and select the Compare With | Each Other option. The text that is different will be highlighted and shown:

Different text highlighted in the Text Compare  

  • Code assist and syntax checking: Forgot the names of the tables in the database, a column name, or the syntax of your statement? Express will prompt as you type. Type EXEC for macro execution with the code assist ON and you will get a series of options that will go with the main command. Now, when you write a database name followed by a dot, it will give you a list of tables to choose from that database:
  • Object Viewer: This works in a similar to the traditional tool SQL Assistant; however, it can help to get more details for your object of interest. If you have Studio, it will have even more options for admin use. Right-click on any object from the Explorer. You will see all the options affiliated with the object you need:

Options affiliated with the selected option

There are many other options at your disposal that you can explore.