Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » System procedures » Alphabetical list of system procedures

sa_disk_free_space system procedure

Reports information about space available for a dbspace, transaction log, transaction log mirror, and/or temporary file.

Syntax
sa_disk_free_space( [ p_dbspace_name ] )
Parameters
  • p_dbspace_name

    Use this VARCHAR(128) parameter to specify the name of a dbspace, transaction log file, transaction log mirror file, or temporary file. The default is NULL.

    If there is a dbspace called log, mirror, or temp, you can prefix the keyword with an underscore. For example, use _log to get information about the transaction log file if a dbspace called log exists.

    Specify SYSTEM to get information about the main database file, TEMPORARY or TEMP to get information about the temporary file, TRANSLOG to get information about the transaction log, or TRANSLOGMIRROR to get information about the transaction log mirror.

Result set
Column name Data type Description
dbspace_name VARCHAR(128)

This is the dbspace name, transaction log file, transaction log mirror file, or temporary file.

free_space UNSIGNED BIGINT The number of free bytes on the volume.
total_space UNSIGNED BIGINT

The total amount of disk space available on the drive where the dbspace resides.

Remarks

If the p_dbspace_name parameter is not specified or is NULL, then the result set contains one row for each dbspace, plus one row for each of the transaction log, transaction log mirror, and temporary file, if they exist. If p_dbspace_name is specified, then exactly one or zero rows are returned (zero if no such dbspace exists, or if log or mirror is specified and there is no log or mirror file).

Privileges

You must have EXECUTE privilege on the system procedure, as well as the MANAGE ANY DBSPACE system privilege.

Side effects

None

Example

The following example uses the sa_disk_free_space system procedure to return a result set containing information about available space.

CALL sa_disk_free_space( );
dbspace_name free_space total_space
system 10952101888 21410402304
translog 10952101888 21410402304
temporary 10952101888 21410402304