By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,553 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,553 IT Pros & Developers. It's quick & easy.

Executing DB2 commands from Windows command prompt

P: 1
Hi,

Please help me, if theres a way we can execute DB2 commands directly from the windows cmd prompt window instead of executing those from DB2 CLP window.
I need to connect to a DB2 database and run a .sql script. I should have these commands in a batch file that should be executed from windows cmd prompt.

The cmds that wrk from DB2 CLP window are -
db2 connect to <database> user <user_name> using <passwd>
db2 -td! -vf <file_name>

These cmds doesn't work if we execute them directly from the windows cmd prompt window.

Thanks and Regards
Srivalli
Aug 29 '07 #1
Share this Question
Share on Google+
2 Replies


docdiesel
Expert 100+
P: 297
Hi,

try the "db2cmd" command. This opens a cmd windows with db2 environment, so that the commands you listed should work.

Regards, Bernd
Aug 29 '07 #2

P: 14
HI ...

You can use "command window" instead of CLP


Naval
Aug 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.