Asked By
Jody Akerly
80 points
N/A
Posted on - 01/31/2013
I am on a UNIX workstation, how can I execute a db2 command line run script from windows command prompt? Some commands don't work if executed directly on cmd prompt.
Db2 command line run script
1. Enter "db2" on the command line or could be directly run by using DB2 scripts containing DB2 commands preceded by "db2"
DB2 provides scripts for creating and running SQL statements.
If your CLP script is, ran. db2. And your database name is "sample" then,
To run the script on windows, run these commands.
-
First connect to the sample database:
db2 connect to sample
-
Then enter the following command:
db2 -vf ran. db2 -t
Db2 command line run script
Hello,
Knowing the ID of "db2profile" you will be able to login in to Linux. The ID could be found in the db2 .profile. The instance should be db2inst1 if you did not change it when you were installing db2. Now, that you know how to get the ID use it to login as an administrator and type db2 at the console. In case you are not able to run db2, then you have to check.profile otherwise, on your console type the following to connect to you database: db2 connect to (Enter the name of your database here) db2 UPDATE CONTACT SET EMAIL_ADDRESS = (Enter your email account here).
I hope this is useful.