I have a requirement to run database restore commands in parallel from shell scripts. Both the commands should run in different bash sessions in parallel.
The following are the commands I need to run.
sudo su - $user -c "db2 RESTORE DATABASE ${SDBP} FROM '/dbnfs/db2main/backups/${DB2DBP}' TAKEN AT $TIMESTAMPP ON '/data1/DB2/tablespaces/${DB2DBP}' , '/data2/DB2/tablespaces/${DB2DBP}' DBPATH ON '/home/db2inst1' INTO ${DB2DBP} NEWLOGPATH '/data1/activelogs/${DB2DBP}' without rolling forward without prompting 2>&1"
sudo su - $user -c "db2 RESTORE DATABASE ${SDBS} FROM '/dbnfs/db2main/backups/${DB2DBS}' TAKEN AT $TIMESTAMPS ON '/data1/DB2/tablespaces/${DB2DBS}' , '/data2/DB2/tablespaces/${DB2DBS}' DBPATH ON '/home/db2inst1' INTO ${DB2DBS} NEWLOGPATH '/data2/activelogs/${DB2DBS}' without rolling forward without prompting 2>&1"
Let me know how to achieve it.