Hi,
Redirect restore is a 3 step process as you may be aware.
In the second step we need to set the containors.
Here with attached the script which generate the set statements for redirected restore.
You can run the script in the server from where you have taken the backup.
(I assume you are restoring in to different server).
select
case tbspacetype
when ('S') then
'set tablespace containers for '
concat char(tbspaceid )
concat ' using (path '''
concat s.tbspace concat ''');'
else
'set tablespace containers for '
concat char(tbspaceid )
concat ' using (file '''
concat s.tbspace
concat ''' '
concat coalesce(char(tmp.size),'5000')
concat ');'
end
from syscat.tablespaces s
left outer join
(select sum(npages) + 2500 as size, tbspace from syscat.tables group by tbspace
union all
select sum(nleaf) + 2500 as size, index_tbspace as tbspace from syscat.tables t, syscat.indexes x
where t.tabschema=x.tabschema and t.tabname = x.tabname
group by index_tbspace
) as tmp
on s.tbspace = tmp.tbspace
order by tbspaceid
;