You should create a spool space reserve from the space available to user DBC, to ensure that there is adequate space to execute queries.
The following procedure sets the spool space reserve at 20% of total available DBC space, which you may need to adjust later, depending on the number of simultaneous queries and the size of the tables in the database.
- Determine the perm space owned by user DBC, for example:
SELECT SUM(MAXPERM) FROM DBC.DISKSPACE WHERE DataBaseName = 'dbc';
- Calculate a value in bytes equal to 20% of the DBC space (the figure obtained in step 1) to set aside as spool space reserve, for example:
(6347.75 GB) *(.20) = 1269.55 GB
- Create the Spool Reserve database and allocate perm space according the figure you calculated, for example:
CREATE DATABASE Spool_Reserve FROM DBC AS PERM = 1269.55 GB NO FALLBACK NO BEFORE JOURNAL NO AFTER JOURNAL ;Specifying spool space in a CREATE USER or CREATE PROFILE statement defines the portion of the overall available spool that is available to users or profile members.
For information on peak spool space utilization (Peak Spool), see Data Dictionary.