derby.storage.tempDirectory The derby.storage.tempDirectory property defines the location on disk for temporary file space needed by for performing large sorts and deferred deletes and updates. derby.storage.tempDirectory property tmp directorysetting location for

Temporary files are automatically deleted after use and are removed when the database restarts after a crash. The temporary directory named by this property will be created if it does not exist, but will not be deleted when the system shuts down. The path name specified by this property must have file separators that are appropriate to the current operating system.

This property allows databases located on read-only media to write temporary files to a writable location. If this property is not set, databases located on read-only media might get an error like the following:

ERROR XSDF1: Exception during creation of file c:\databases\db\tmp\T887256591756.tmp for container ERROR XJ001: Java exception: 'a:\databases\db\tmp\T887256591756.tmp: java.io.IOException'.

This property moves the temporary directories for all databases being used by the system. makes temporary directories for each database under the directory referenced by this property. For example, if the property is set as follows:

derby.storage.tempDirectory=C:/Temp/dbtemp

the temporary directories for the databases in C:\databases\db1 and C:\databases\db2 will be in C:\Temp\dbtemp\db1 and C:\Temp\dbtemp\db2, respectively.

The temporary files of two databases running concurrently with the same name (for example, C:\databases\db1 and E:\databases\db1) will conflict with each other if the derby.storage.tempDirectory property is set. This will cause incorrect results, so users are advised to give databases unique names.

Default

A subdirectory named tmp under the database directory.

For example, if the database db1 is stored in C:\databases\db1, the temporary files are created in C:\databases\db1\tmp.

Example -- system-wide property derby.storage.tempDirectory=c:/Temp/dbtemp -- database-wide property CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( 'derby.storage.tempDirectory', 'c:/Temp/dbtemp')
Dynamic or static

This property is static; you must restart for a change to take effect.