Backup Table of Contents File

In addition to the backup file, spdsbkup creates a table of contents file using the name file_TC_ddmmmyyyy_hhmmss. The TC in the filename identifies it as a table of contents file. If the table of contents file is created in the same SPD Server operation, the timestamp for the backup file and the table of contents file are identical. The table of contents file does not have an SPD Server file extension. Unlike the backup file, the table of contents file is a regular system file and cannot be extended. The table of contents file size is constrained only by the native operating system's file size limit.
The table of contents file contains the following information for each table that is backed up:
  • Columns 1–32 contain the table name. If the file is a domain ACL file, these columns contain the ACL name.
  • Columns 33–232 contain the backup filename.
  • Columns 233–250 contain the last full backup date, using the SAS datetime18. format.
  • Columns 251–258 contain the incremental backup sequence number, since the last full backup. For example, the value 2 indicates that this is the second incremental backup since the last full backup.
  • Columns 259–268 contain the number of rows that were backed up.
  • Column 269 contains F for a full SPD Server backup, or I for an incremental backup.
  • Columns 270–277 contain the number of indexes that were backed up during a full SPD Server backup. This field contains the value 0 if an incremental backup is being performed.
  • Column 278 is a Boolean ACL file indicator. Column 278 contains a T if a domain ACL file is being backed up, or an F if a table is being backed up. If the ACL file indicator is set to T, columns 1–32 are configured for ACL names.
The table of contents file is formatted so that it can be used as a table of contents for a SAS backup file. The table of contents file uses the following SAS format:
format lastfull datetime18.;
 input @1 table $32. @33 bk_file $200.
 @233 lastfull datetime18. @251 inc_seq 8.
 @259 rows 10. @269 bk_type $1.
 @270 num_idx 8.,
 @278 acls $1.; 
After you perform each SPD Server backup, you should append the resulting table of contents file to the SAS table of contents backup file. This step saves the backup history and will assist you when you restore the tables.
For example, if you want to determine which backup files you need to restore a specific table, you could create the following SQL query, using the date of the last full backup:
select bk_file from foo.bkup_toc
where table = "dset"
and datepart(lastfull) >= 'ddmmmyyyy'd;