15.00 - Chapter 31 Update Space (updatespace) - Teradata Database

Teradata Database Utilities

Product
Teradata Database
Release Number
15.00
Content Type
Configuration
Publication ID
B035-1102-015K
Language
English (United States)
Last Update
2018-09-25

The Update Space utility, updatespace, recalculates the permanent, temporary, or spool space used by either of the following:

  • A single database and its individual tables
  • All databases in a system and their individual tables
  • Update Space accomplishes this by performing the following:

  • Examining storage descriptors and adding up space for each table.
  • Setting values in CurrentPermSpace, CurrentTempSpace, or CurrentSpoolSpace in the DATABASESPACE table for each table and for the containing database as a whole.
  • The following table lists the difference between the Update DBC and Update Space utilities.

     

    The utility …

    Recalculates the …

    Update DBC

    maximum allowed values for permanent, temporary, and spool space.

    Update Space

    current usage for permanent, temporary, and spool space.

    Use Update Space only to correct inconsistency in the DATABASESPACE table, which might occur as the result of rare types of system failures.

    For descriptions of the DBASE and DATABASESPACE tables and columns, see Data Dictionary.

    For more information on the Update DBC utility, see Chapter 30: “Update DBC (updatedbc).”

    Scenarios Runs From

    Update Space runs from Database Window or comparable interface to the Teradata Database console subsystem, such as cnsterm.

    For general information on starting the utilities from different interfaces, see Appendix B: “Starting the Utilities”

    Scenarios Syntax

    Update Space presents a command-line environment that allows the entry of the UPDATE command, which has the following syntax.

     

    Syntax element …

    Specifies …

    TEMPORARY

    to update only the temporary space.

    ALL

    to update all the space.

    SPOOL

    to update only the spool space.

    Note: Spool space can be calculated for a single database only.

    PSPOOL

    to update only the spool space that persists across restarts.

    SPACE FOR

    specifies the name of the database(s) for which space is to be recalculated.

    ALL DATABASES

    all the databases in a system.

    dbname

    the name of a single database.

    Scenarios Usage Notes

    To exit the Update Space utility, type q or quit with no semicolon terminator, on the command line.

    Non-standard database names that contain special characters must be enclosed within double quotation marks. Special characters are most punctuation characters and whitespace characters. The delimiting double quotation marks are not counted as part of the name length, and are not stored in the Data Dictionary tables.

    To include a double quotation mark character as part of a database name, precede it with another double quotation mark character.

    For example:

     

    Desired Database Name

    Required Update Space Notation

    Current Salary

    "Current Salary"

    D'Augusta

    "D'Augusta"

    db1 db @#$%

    "db1 db @#$%"

    db1."db2

    "db1.""db2"

    Db!@     ""

    "Db!@      """""

    Example  

    Enter Command

    update all space for all databases;
     
    Updating space for DBC
    Space updated for DBC
    Updating space for SYSTEMFE
    Space updated for SYSTEMFE
    Updating space for RESCRIBE
    Space updated for RESCRIBE
    Updating space for CRASHDUMPS
    Space updated for CRASHDUMPS
    Updating space for PUBLIC
    Space updated for PUBLIC
    Updating space for DEFAULT
    Space updated for DEFAULT
    Updating space for TDPUSER
    Space updated for TDPUSER
    Updating space for SYS_CALENDAR
    Space updated for SYS_CALENDAR
    Updating space for SYSADMIN
    Space updated for SYSADMIN
    Updating space for ALL
    Space updated for ALL

    Example  

    Enter Command
    update temporary space for public;
     
    Updating space for PUBLIC
    Space updated for PUBLIC