Deploying Teradata Database Developer Tier on Azure

In this video walkthrough, I show how to deploy Teradata Database Developer Tier from Azure Marketplace, access Teradata Viewpoint management UI, install and use Teradata Studio GUI on Windows, and connect to Teradata database using bteq command line via SSH.

Video Walkthrough

Tip: Play the video full screen.

Teradata on Azure

Create Database

Following is a simple script to create a tiny (4MB) database and test table (see syntax reference). Since I didn’t specify FROM database_name option, the database owner of the newly created database is the currently logged in user (e.g. dbc). With option PERMANENT=4000000 we specify that the database should reserve 4,000,000 bytes for permanent storage. This space is taken from unallocated space in the database or user of the immediate owner (in my case “dbc”). With option SPOOL=4000000 we specify the number of bytes allowed for spool and volatile temporary tables in the database. With option FALLBACK PROTECTION we specify whether to create and store a duplicate copy of each table created in the new database. In our case, I have included it just as an example since we are running a single node and having a duplicate copy of each table would not help if the node is down.

CREATE DATABASE arsen AS PERMANENT = 4000000, SPOOL = 4000000, FALLBACK PROTECTION; DATABASE arsen; CREATE TABLE t1 (id INT, name VARCHAR(255)); INSERT INTO t1 (id, name) VALUES (1, 'name1'); SELECT * FROM t1;

Teradata BTEQ

BTEQ (Batch Teradata Query) is a command line utility that can be used for both batch and interactive mode. In this example, I briefly show how to use BTEQ as a query tool. Establish SSH connection to the database node, sudo to become root, and run bteq as follows.

azureuser@SMP001-01:~> sudo -i
SMP001-01:~ # bteq

Teradata BTEQ from LINUX. PID: 25534
Copyright 1984-2017, Teradata Corporation. ALL RIGHTS RESERVED.
Enter your login or BTEQ command:

UserId: dbc
Password: *********

*** Logon successfully completed.
*** Teradata Database Release is
*** Teradata Database Version is
*** Transaction Semantics are BTET.
*** Session Character Set Name is 'ASCII'

*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:
database arsen;

BTEQ -- Enter your SQL request or BTEQ command:
select * from t1;

BTEQ -- Enter your SQL request or BTEQ command:
insert into t1 (id, name) values (2, 'name2');

BTEQ -- Enter your SQL request or BTEQ command:
select * from t1;

Thank you for watching and reading!

Please leave feedback and questions below or on Twitter

Image for post
Image for post

Originally published at on November 5, 2017.

Principal Engineer / Architect, FastTrack for Azure at Microsoft

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store