DB2: To run script and spool output

 db2 -td -vf pcr.sql | tee pcr.txt


-vf is verbose output


To run script with @ (special character)

-  At the top of the script , set schema wcs@

set schema wcs@

-  At end of the script, replace last semicolon (;) with @

END@


Now Run the script using the command below:

$ db2 -td@ -vf pcr.sql | tee pcr.txt

Comments

Popular posts from this blog

Oracle: To clean up WRI$_ADV_OBJECTS