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 16.10.00.02 from LINUX. PID: 25534
Copyright 1984-2017, Teradata Corporation. ALL RIGHTS RESERVED.
Enter your login or BTEQ command:
.logon

.logon
UserId: dbc
Password: *********

*** Logon successfully completed.
*** Teradata Database Release is 16.10.00.04
*** Teradata Database Version is 16.10.00.04
*** 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 https://twitter.com/ArsenVlad

Comments (0)

Skip to main content