Executing DB2 commands from Windows command prompt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SrivalliBapathi
    New Member
    • Aug 2007
    • 1

    Executing DB2 commands from Windows command prompt

    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
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

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

    Regards, Bernd

    Comment

    • naval123
      New Member
      • Aug 2007
      • 14

      #3
      HI ...

      You can use "command window" instead of CLP


      Naval

      Comment

      Working...