Creating a temporary dbspace
To specify where to allocate the temporary files, create temporary dbspaces.
About this task
To define temporary dbspaces:
Procedure
-
Use the onspaces utility with the -c -d -t options.
For more information, see Creating a dbspace that uses the default page size.
Or, use the create tempdbspace command with the SQL administration API admin() or task() function.
For more information, see create tempdbspace argument: Create a temporary dbspace (SQL administration API).
- Use the DBSPACETEMP environment variables
or the DBSPACETEMP configuration parameter to specify the dbspaces
that the database server can use for temporary storage.
The DBSPACETEMP configuration parameter can contain dbspaces with a mix of page sizes.
For further information about DBSPACETEMP, see the topics about configuration parameters in the Informix® Administrator's Reference.
- If you create more than one temporary dbspace, the dbspaces should be located on separate disks to optimize the I/O.
What to do next
After you have created a temporary dbspace, you must make the database server aware of the existence of the newly created temporary dbspace by setting the DBSPACETEMP configuration parameter, the DBSPACETEMP environment variable, or both.
onspaces -c -t -d temp_space -p /dev/raw_dev1 -o 5000 -s 5120
EXECUTE FUNCTION task(“create tempdbspace", “temp_space", “/dev/raw_dev1", “5 MB", “5000 KB");
EXECUTE FUNCTION task(“create tempdbspace from storagepool", “temp_space", “5 MB");
For more information, see Temporary dbspaces.