Db2 command line run script

Asked By 80 points N/A Posted on -
qa-featured

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.

SHARE
Best Answer by Williams Todd
Answered By 0 points N/A #156683

Db2 command line run script

qa-featured

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.

  1. First connect to the sample database:

    db2 connect to sample 
  2. Then enter the following command:

    db2 -vf ran. db2 -t 

 

Best Answer
Best Answer
Answered By 0 points N/A #156684

Db2 command line run script

qa-featured

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.

Login/Register to Answer

Related Questions