Example: Use Constant Expression to Modify PERM, SPOOL, and TEMPORARY Database Spaces - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following statement modifies the PERM space for database production_development to a size based on the constant expression 3,000,000 * (HASHAMP()+1), SPOOL to a size based on the constant expression 3,000,000 * (HASHAMP()+1), and TEMPORARY to a size based on the constant expression 3,000,000 * (HASHAMP()+1). The expressions calculate the number of AMPs in the current system and scale the PERM, SPOOL, and TEMPORARY space for the production_development database to that size.

This is the original definition of database production_development.

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

The following MODIFY DATABASE request changes the PERM, SPOOL, and TEMPORARY space allocations for this database as follows.

MODIFY DATABASE production_development AS
  DEFAULT DATABASE = it_dev,
  PASSWORD = (EXPIRE = 0),
  PERM = 3000000*(HASHAMP()+1),
  SPOOL = 3000000*(HASHAMP()+1),
  TEMPORARY = 3000000*(HASHAMP()+1);