2.4 Open Files During a Back Up

TSAs make every precaution to ensure that the engine receives no corrupt data. If the engine must backup files that are opened by other applications, a special TSA is needed to perform this task. File system TSAs generally do not back up files that are already opened.

The engine controls the mode of opening a data set by passing a mode parameter to NWSMTSOpenDataSetForBackup. The TSA provides the required open modes to ensure data integrity. Whenever a file is backed up, it should either be successfully locked and protected or be opened in a way that denies write access to other applications as the file is backed up.

SMS provides two modes that circumvent lock and write protection. These modes are NWSM_NO_LOCK_NO_PROTECTION and NWSM_OPEN_READ_ONLY. The engine should only use these modes when data integrity is not required.