15.10 - PERMANENT - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
Release Number
December 2015
Content Type
Programming Reference
Publication ID
English (United States)

Number of bytes to be reserved for permanent storage for this user. The space is taken from unallocated space in the database or user of the immediate owner.

You must specify a value for this option. There is no default.

A global temporary table requires a minimum of 512 bytes from the PERM space of its containing user or database. This space is used for its table header.

You cannot specify any other options for the new user until after you specify the PERMANENT and PASSWORD options.

The only significant difference between a Teradata Database user and a database is that you can specify a password for a user, but not for a database.
You can enter the number of bytes as an integer, decimal, or floating point value or as a constant expression whose evaluation determines the number of bytes. You can also enter the value using exponential notation. For example, you can write one thousand as either 1000 or 1E3.
To create a user without database component, specify a value of 0 bytes for PERMANENT space. You must still specify a SPOOL space value for the user.
Optional keyword that redundantly specifies the unit for the amount of space allowed.
Any SQL expression that does not make any column references. Specifying an appropriate constant expression for the PERM space size of a user enables Teradata Database to assign an optimal quantity of PERM space that scales to the size of your system by allocating PERM space on a per AMP basis.
When you specify a PERM space size based on a constant expression, the assigned size does not automatically scale if, for example, you add more AMPs to your system.

Example: Using a Constant Expression to Specify the PERM and SPOOL Space for a User

The following request creates PERM space for a user with a size based on the constant expression 2,000,000 (HASHAMP()+1) and SPOOL with a size based on the same constant expression, 2,000,000 (HASHAMP()+1). The expressions calculate the number of AMPs in the current system and scales the PERM and SPOOL space for the sls120639 user to that size.

     CREATE USER sls120639 AS
       DEFAULT DATABASE = it_dev,
       PASSWORD = (EXPIRE = 0),
       PERM = 2000000*(HASHAMP()+1),
       SPOOL = 2000000*(HASHAMP()+1);