SATMP environment variable

Specifies the location of temporary files used by the database server and the SQL Anywhere command line utilities that require a temporary directory.

Syntax
SATMP=directory-name
Remarks

SQL Anywhere creates two types of temporary files: database server-related temporary files (created on all platforms), and communications-related temporary files (created only on Unix for both the client and the server).

The SATMP environment variable specifies the location of temporary files used by the database server and the SQL Anywhere command line utilities that require a temporary directory. It is useful when running the database server as a service because it enables you to hold the temporary file in a directory that cannot be accessed by other programs.

If the location of the temporary file is not specified with the -dt option when the database server is started, then the database server checks the value of the SATMP environment variable to determine where to place the temporary file. If the SATMP environment variable does not exist, then the first of the TMP, TMPDIR, or TEMP environment variables to exist is used. On Unix, if none of the above environment variables exist, /tmp is used.

On Windows Mobile, you can specify the directory to use as the server's temporary directory in the registry.

For information about the temporary file location on Windows Mobile, see Registry settings on Windows Mobile.

On Unix, both the client and the database server must set SATMP to the same value when connecting via shared memory.

For information about securing shared memory connections on Unix, see Security tips.

If you want to restrict the permissions of the temporary files created by the database server or client on Unix, you must set this environment variable to a directory that is not in the following list:

When SATMP is set to a directory that is not listed above, the database server searches up the given directory path looking for directories owned by the current user with permissions set to 770, 707, or 700. If the permissions are not set to one of these values, files are created with permissions set to 777. For each directory that is found, the database server removes the appropriate permissions (other, group, and other+group, respectively) from the permission mask used to create temporary files.

Caution

Setting SATMP to a directory that is not included in the list above may affect the ability of users using different Unix accounts to connect to the database server over shared memory.

See also
Using shared memory connections with older software

In SQL Anywhere version 9 and earlier, the environment variable ASTMP is equivalent to SATMP. If you are using shared memory to connect version 9 and version 10 software, you must set the SATMP and ASTMP environment variables to specify the (same) location of the temporary directory.