Redirected restore of DB2 using the Tivoli Storage Manager API fails with SQL2062N Reason code: "-50" or SQL2025N An I/O error "-50" occurred on media "TSM"
SQL2062N Reason code: "-50" or SQL2025N An I/O error "-50" occurred on media "TSM"
The COMMTIMEOUT value on the Tivoli Storage Manager Server was not sufficient to allow the DB2 processing to build the data containers to hold the restore data.
Resolving The Problem
Exceeding the COMMTIMEOUT setting on the Tivoli Storage Manager Server is a common problem during DB2 redirected restores. The problem occurs because DB2 spends time rebuilding the containers that the backup data will be restored into. For large databases, this process can take over an hour, and the Tivoli Storage Manager session will remain in a SendW state for this time period which is counted against the COMMTIMEOUT option.
For the restore to be successful, increase the COMMTIMEOUT on the Tivoli Storage Manager Server using the command SETOPT COMMTIMEOUT. This value should be increased to at least 3600, and may need to be set over 10000 seconds for very large (over 200GB) databases.
NOTE: If this is a LANFREE restore, the error might be reported as a -72. In this case, the COMMTIMEOUT and IDLETIMEOUT values would need to be increased on the Storage Agent. It may also be necessary to increase the RESOURCETIMEOUT value within the Tivoli Storage Manager Server dsmserv.opt file.
23 June 2018