Hi All,
I have written a db2 scripts and running that on Linux using the below command
$ db2 -td@ -vf Script..sql
Below is the sample Script.
--===============
CONNECT TO database USER user1 Using passwd @
SQL STATEMENT @
SQL STATEMENT @
SQL STATEMENT @
--===================
When I need to run this script on three different databases DB1, DB2 and DB3, I am updating the first line of the script every time, to run it on another database.
Is there any way to run the db2 script after logging into the db2 prompt (as in Oracle) so that script update will not be required while running it on another Database?
Any help is appreciated.
Neeraj