1.21 We are trying to RESTORE a database on top of an existing version of the database but the RESTORE fails with the error message

RESTORE ENCOUNTERED ERROR TRYING TO ALLOCATE DISC SPACE: SSM ERROR: -1 (S/R 1945)

COMDB04 .OBJECT .CAD NOT RESTORED: DISC ALLOCATION FAILURE

We have gotten around this problem by purging the entire COMDB database with DBUTIL and then restoring the entire database from tape. For what it is worth, DISCFREE C shows we have 20% free space before purging the database. What is happening here?

The problem: RESTORE purges the old file only after completely restoring the new version.

Goetz Neumann and Bijo Kappen of HP elaborated:

RESTORE creates the file it is currently fetching from tape in the NEW domain. Thus it is invisible to LISTF, as it has not been inserted into the directory yet. It will only remove the original file from the permanent domain after it successfully gets all the data from the tape, then the NEW file is saved into the directory as the last step. This is necessary to avoid possible data loss if something prevents the file from restoring completely.

The sectors for the NEW file will be allocated on the volume set where the file belongs based on its volume set restrictions. Thus, on any RESTORE, you will need at minimum as much free permanent disk space on each volume set as the largest file on your backup tape for that volume set. If you do parallel tape device RESTOREs or use the interleave option you will need even more space because RESTORE will be holding multiple NEW files open for a longer period of time.

[Editor’s note: in case you need one, this is a very good reason to be sure you check the results of every RESTORE very carefully. In a worst case scenario, only some datasets will be restored and you will be left with both a logically and physically corrupt database.]