B401 Admin Env

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

Module 1: Database Administration and

Building the Database Environment

After completing this module, you should be able to:


Describe the purpose and function of an administrative
user.
Differentiate between creators, owners (parents), and
children.
Describe how to transfer ownership of databases and
users.

Database Administration
Some of the functions of a Teradata Database Administrator (DBA) include:

User and Database Management


Space Allocation and Usage
Access of Objects (e.g., tables, views, etc.)
Access Control and Security
System Maintenance
System Performance
Resource Monitoring
Data Archives, Restores, and Recovery

Examples of tools available to the Teradata DBA include:

Use of Data Dictionary/Directory tables and views to manage the system


Teradata Administrator Windows administration utility
Teradata Manager suite of Windows tools
Teradata Analyst Toolset Index Wizard, Statistics Wizard, and Teradata SET
Teradata Dynamic Query Manager (DQM)
Database Console Window and System utilities e.g., dbscontrol, ferret, rebuild, etc.
User scripts and 3rd party applications

To do these functions, it is important to understand key concepts such as

Teradata hierarchy and the concepts of ownership (parents and children)

Initial Teradata Database

DBC

All (reserved name)


Sys_Calendar
15 MB

Default (reserved name)


PUBLIC

SysAdmin
40 MB

TDPUSER
SystemFE
60 MB

Current Permanent Space


Maximum Permanent Space
NO BOX = No Permanent Space

Crashdumps
1 GB

Administrative User
DBC
All

Sys_Calendar

Default
PUBLIC

SysAdmin

TDPUSER
SystemFE
Crashdumps

SYSDBA

Current Permanent Space


Maximum Permanent Space

Recommendation: Create a database administrator


which owns most of the PERM space.

Owners, Parents, and Children


DBC

SYSDBA

Human_Resources

Personnel

Benefits

Accounting

Parent or owner
Any object above you in the hierarchy

PR01

PR02

PR03

Child
Any object below you in the hierarchy

Users may own databases and databases may own users.

Creating New Users and Databases


DBC

SYSDBA

Human_Resources

Personnel

PR01

PR02

GRANT DATABASE ON
Human_Resources TO Accounting ;

Accounting

Benefits

CREATE USER Payroll FROM


Human_Resources AS ;

Payroll

The creator is the user who submits the CREATE


statement.

Every object has one and only one creator.

A user (if authorized) may create databases or other


users from someone elses space.

PR03

Transfer of Ownership
DBC

SYSDBA

Human_Resources

Personnel

PR01

PR02

Benefits

PR03

GIVE Payroll TO Accounting;

Accounting

Payroll

PY01

PY02

The GIVE statement is valid to only


transfer databases and users.

To give an object, you must have:


DROP DATABASE privilege on
the object to transfer.

CREATE DATABASE privilege


on the receiving object.

DELETE / DROP Statements


SYSDBA
Human Resources
Personnel
Tables

Views

Macros

DELETE USER Personnel;

DROP USER Personnel;

SYSDBA

SYSDBA

Human Resources

Human Resources

Personnel

Teradata Administrator New System


Teradata
Administrator

GUI interface
to Teradata
hierarchy and
objects.

This example
shows the
default users
and databases
in a newly
initialized
system.

Which database
has the majority
of the Perm
space?
Answer: DBC

Teradata Administrator Hierarchy


Teradata Administrator

This example shows


the hierarchy of a
Teradata system and
the objects in one of
the databases.

This utility also


provides drag and
drop capabilities.

The hierarchy of the


Teradata database is
shown in the left
pane.
Examples of Teradata
Administrator displays
and capabilities will be
shown in various
modules throughout
this course.

Who is the immediate parent


of Teradata_Factory?
Answer: Sysdba

Summary

Initially, system user DBC owns all space in the Teradata Database except that owned by
system users and databases SYS_CALENDAR, SYSADMIN, SYSTEMFE, and
CRASHDUMPS.

The database administrator should create a special administrative user containing most
of the space available which will become the owner of all administrator-defined
application databases and users.

Everyone higher in the hierarchy is a parent or owner. Everyone lower in the hierarchy
is a child.

Every object has one and only one creator. The creator is the user who executes the
CREATE statement.

The GIVE statement enables you to transfer a database or user. The following privileges
are necessary:

DROP DATABASE on the given object.


CREATE DATABASE on the receiving object.

You cannot DROP databases or users that own objects (tables, views, macros, journals
or children databases/users).

Teradata Administrator provides an easy-to-use Windows-based graphical interface to


the Teradata RDBMS Data Dictionary.

Review Questions
1.

True or False.
You should use system user DBC to create
application users and databases.

2.

True or False.
An owner or parent is any object (user or database)
above the current/selected object in the hierarchy.

3.

True or False.
The GIVE statement transfers a database or user
space to a recipient you specify. It does not automatically transfer all
child databases, users, tables, views and macros.

Review Questions
1.

True or False.
You should use system user DBC to create
application users and databases.
False. You should create and logon as an administrative user
to perform these tasks.

2.

True or False.
An owner or parent is any object (user or database)
above the current/selected object in the hierarchy.

3.

True or False.
The GIVE statement transfers a database or user
space to a recipient you specify. It does not automatically transfer all
child databases, users, tables, views and macros.
False. The GIVE statement automatically transfers all child
databases, users, tables, view and macros the transferred object
owns.

You might also like