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 - Database Administration » Database configuration » Database options » Alphabetical list of database options

max_temp_space option

Controls the maximum amount of temporary file space a connection can use.

Allowed values
Integer [ k | m | g | p ]
Default

0

Scope
  PUBLIC role For current user For other users
Allowed to set permanently? Yes, with SET ANY SYSTEM OPTION Yes, with SET ANY SYSTEM OPTION Yes, with SET ANY SYSTEM OPTION
Allowed to set temporarily? Yes, with SET ANY SYSTEM OPTION Yes (current connection only), with SET ANY SYSTEM OPTION No
Remarks

This option allows you to specify the maximum amount of temporary file space a connection can use before the request fails because it exceeds the temporary file space limit. The temp_space_limit_check option must be set to On (the default) for the max_temp_space option to take effect.

The default value 0 indicates that there is no fixed limit on the amount of temporary file space a connection can request. Any other value specifies the number of bytes of temporary file space a connection can use. You can use k, m, or g to specify units of kilobytes, megabytes, or gigabytes, respectively. If you use p, the argument is a percentage of the total amount of temporary file space available.

For connections that request temporary file space, the database server checks the limit against the setting of the max_temp_space option to make sure that the request is under the maximum size. If the connection requests more temporary space than is allowed, the request fails and the error SQLSTATE_TEMP_SPACE_LIMIT is generated.

Example

Set a 1-GB limit for a connection:

SET OPTION PUBLIC.max_temp_space = '1g';

Both of the following statements set a 1-MB limit for a connection:

SET OPTION PUBLIC.max_temp_space = 1048576;
SET OPTION PUBLIC.max_temp_space = '1m';

Use five percent of the total temporary space available:

SET OPTION PUBLIC.max_temp_space = '5p';