Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR

NCR Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR, 1998. - 315 p.
Download (direct link): inntroduktionteradata1998.pdf
Previous << 1 .. 50 51 52 53 54 55 < 56 > 57 58 59 60 61 62 .. 76 >> Next


The previous section explained the concept of databases and users in the Teradata RDBMS environment. This section explains how to create a database from DBC. Before you can create tables, views, users, or macros, you must first create a database. The SQL statement for creating a database is CREATE DATABASE.

Suppose you wanted to create the Personnel database for the Employee and Department tables. The SQL to create the Personnel database looks like this:

CREATE DATABASE Personnel FROM F&A

AS PERMANENT = 10000000 BYTES,

SPOOL = 100000000 BYTES FALLBACK,

ACCOUNT = 'Administration'

12-4

Introduction to the Teradata RDBMS for UNIX
System Administration Space Allocation: Databases and Users
The explanation for the components of this statement are as follows.
Component Description
AS Introduces a clause that specifies one or more database parameters.
FROM Introduces an owner database whose disk space is allocated to create the new database.

IF . . . THEN . . .
you do not specify an owner database disk space allocation comes from the database of the user entering the statement.
you specify an owner database you must either have the CREATE DATABASE privilege on that database or be its owner.

PERMANENT Specifies the allocation of disk space to the new database.

SPOOL Specifies a space limit for spool files, which are

temporary files used to store the interim results of a Teradata SQL statement until they can be examined by a user or application program.

IF . . . THEN . . .
you do not specify the SPOOL parameter the system allocates spool space from the owner database.

FALLBACK Specifies that, in addition to the primary copy of the

rows of all database tables, a secondary (fallback) copy is to be distributed among the disks of all AMPs in the RDBMS.

FALLBACK is the default value.

ACCOUNT Identifies the department or budget responsible for

accumulated disk space used by the new database. This information is used for accounting purposes only.

IF . . . THEN . . .
you do not specify an account name the system uses the account name of the owner database.

Introduction to the Teradata RDBMS for UNIX

12-5
System Administration

Space Allocation: Databases and Users

This section explains how to create a user.

Creating Users

The SQL statement for creating a user is CREATE USER. The statement authorizes a new user identification (user name) for the RDBMS and specifies a password for user authentication. Because the system creates a database for each user, the CREATE USER statement is very similar to the CREATE DATABASE statement.

The SQL to create user Jones in the F&A database looks like this:

CREATE USER Jones FROM F&A

AS PERMANENT = 1000000 BYTES,

SPOOL = 1000000 BYTES PASSWORD = Jan,

FALLBACK,

ACCOUNT = 'Administration'

STARTUP = 'DATABASE F&A;'

;

The optional STARTUP clause specifies one or more Teradata SQL statements that the system can execute automatically when the user establishes a session. Any user who performs this statement must have a CREATE USER privilege on the owner database or be its owner.

The system automatically grants the new user all privileges on tables, views, and macros created in this space.

12-6

Introduction to the Teradata RDBMS for UNIX
Introduction

System Administration

Accounting

Accounting

This topic introduces the accounting options available for the Teradata RDBMS.

Among the areas covered are:

• Session management

• Account usage and security violation logging

Introduction to the Teradata RDBMS for UNIX

12-7
System Administration

Session Management

Session Management

Before any accounting can occur, a user must be logged onto the Introduction Teradata RDBMS.

To do this, a user must establish a session.

To establish a session, the user logs on to the RDBMS.

Establishing a Session

The procedure varies depending on the client system, the operating system, and whether the user is an application programmer or a user in an interactive terminal session using BTEQ or a third party query processing product.

Logon parameters can include any of the following:

Logon Parameters

• Optional identifier for the RDBMS, called a tdpid

• User name

• Password

• Optional account number.

A session is established once the RDBMS accepts the user name, Session Requests password, and account number and returns a session number to the

process.

Subsequent Teradata SQL requests generated by the user and responses returned from the RDBMS are identified by:

• Host id

• Session number

• Request number.

The context for the session also includes a default database name which is the same as the user name.

When the session ends, the system discards the context and accepts no further Teradata SQL statements from the user.

12-8

Introduction to the Teradata RDBMS for UNIX
System Administration

Account Usage
Previous << 1 .. 50 51 52 53 54 55 < 56 > 57 58 59 60 61 62 .. 76 >> Next