Académique Documents
Professionnel Documents
Culture Documents
(INTEGER),
in_transdate
in_accno
(INTEGER),
in_trans_id
(CHAR(10)),
in_trans_amt
(DECIMAL(12,2))
FILE = TestFloadData;
Local to a session - it exists throughout the entire session, not just a single query.
It must be explicitly created using the CREATE VOLATILE TABLE syntax.
It is discarded automatically at the end of the session.
There is no data dictionary involvement.
What is the index? How many types of indexes are available in Teradata
database?
A database index is a data structure that is used to access rows from a table without
having to search the whole table and hence improves the speed of data retrieval operations
from database table.
In the Teradata Database, an index is made up of one or more columns in a table. Once
Teradata Database indexes are selected, they are maintained by the system.
In the Teradata Database, there are two types of indexes -:
1-Primary Indexes
2-Secondary Indexes
The Index can be created at the time of table creation or can be created after creation of
table by using the Create Index statement.
Fallback in Teradata
Fallback is a Teradata database feature that protects data in the case of an AMPvproc
failure. Fallback guarantees the maximum availability of data. We can specify Fallback
protection at the table or database level. It ensures high availability of the applications.
Fallback protects our data by storing a second copy of each row of a table on a different
AMP in the same cluster(cluster has more than one AMPs).Fallback provides AMP fault
1.
2.
Node in Teradata
A Node is a term used in Teradata for a processing unit under the control of a single
operating system.
The Node is where the processing occurs for the Teradata Database.
In other words we can say that a Node is the basic building block of a Teradata Database
system which contains a large number of hardware and software components.
Hardware components of Node are
CPU
System disk
Memory
System bus
Ethernet
LAN Cables
Software components of Node are
AMP
PE
Application
Gateway
Channel Driver
PDE
OS
There are two types of Teradata Database systems mentioned below:
SMP(symmetric multiprocessing) - An SMP Teradata Database has a single node that
contains multiple CPUs sharing a memory pool.
MPP(massively parallel processing) - Multiple SMP nodes working together comprise a
larger, MPP implementation of a Teradata Database.In MPP nodes are connected with BYNET,
which allows multiple virtual processors on multiple nodes to communicate with each other.
.QUIT
and save it with name test.scr
Step 2:
To Execute The Script:
Start BTEQ, then enter the following BTEQ command to submit a BTEQ script:
Format
.run file = <bteqscriptname>
Example :.run file= test.scr
10
SKIPDOUBLE
= OFF ALL
SKIPLINE
= OFF ALL
SUPPRESS
= OFF ALL
TDP
= L7544
TIMEMSG
= DEFAULT
TITLEDASHES
= ON for the normal report.
UNDERLINE
= OFF ALL
[SET] WIDTH
= 80
last_name
,first_name
,hire_date
,salary_amount
FROM
WHERE
ORDER BY
employee
department_number = 200
first_name;
11
Database names and User names must be unique within the Teradata Database.
Table, view, macro, trigger, index and stored procedure names must be unique within
a Database or User.
Column names must be unique within a Table.
The syntax for fully qualifying a column name is:
Databasename.Tablename.Columnname
NAME
DEPARTMENT.NAME
FINANCE.DEPARTMENT.NAME
(unqualified)
(partially qualified)
(fully qualified)
12
tablename;
GO TO
DO LOOP
OPEN FILE
CLOSE FILE
END OF FILE
SQL statements are not case sensitive, unless indicated.
SQL statements can be entered into multiple lines
13
Data Definition Language (DDL) DDL is used to define and create database
objects such as tables, views, macros, databases, and users.
2.
Data Manipulation Language (DML) DML is used to work with the data,
including - inserting data rows into a table, updating an existing row, deleting the existing
rows or performing queries on the data.
3.
Data Control Language (DCL) - Used for administrative tasks such as granting and
revoking privileges to database objects or controlling ownership of those objects.
Data Definition Language (DDL) Examples
CREATE
DROP
ALTER
INSERT
UPDATE
DELETE
REVOKE
GIVE
CREATE TABLE
employee
(employee_number
INTEGER
,department_number SMALLINT
,salary_amount
DECIMAL (10,2)
14
department;
This query would return all columns and all rows from the department table.
1.
Time
Time
Time
Time
Throughput
Throughput
Throughput
Throughput
Throughput
15
16
Keys
Indexes
Teradata?
TASM stands for Teradata Active System Management .
TASM is made of several tools which are useful for DBA and developer to define the rules
(filters, throttles etc.) that control the allocation of resources to workloads running on a
system.
Tools are also provided to monitor workloads in real time and to produce historical reports of
resource utilization by workloads.
Below are the three products of TASM that are used to create and manage workload
definitions:
17
Below are the characteristics of a hot standby node :Each multi-node system has at least one clique.
A node that is a member of a clique.
Does not normally participate in the trusted parallel application
Can be brought into the configuration when a node fails in the clique.
Eliminates the need for a restart to bring a failed node back into service.
18
19