Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    2

    Question Unanswered: Encount db21004E while run the db2cmd

    Hello,

    db2cmd -c -i -w db2 -tvf c:\\program files\myscript\script.sql

    The command above will encount
    DB21004E You cannot specify both an input file and a command when invoking the Command Line Processor.

    The problem is caused by the space in the path. So i tried
    db2cmd -c -i -w db2 -tvf "c:\\program files\myscript\script.sql"
    and
    db2cmd -c -i -w "db2 -tvf c:\\program files\myscript\script.sql"

    Still the same error.

    How can i fix it?

    My environment:
    OS: w2k
    C:\Documents and Settings\Administrator>db2level
    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09010" with
    level identifier "02010107".
    Informational tokens are "DB2 v9.1.0.356", "s060629", "NT32", and Fix Pack "0".
    Product is installed at "C:\IBM\SQLLIB" with DB2 Copy Name "DB2COPY1".


    Joeyee
    Last edited by joeyee; 12-18-07 at 10:06.

  2. #2
    Join Date
    Jun 2006
    Posts
    471
    create sonewhere a small bat file that will be called and executes the db2 -tvf command
    eg.C:\temp>type test.bat
    db2 -tvf "c:\program files\test.sql"
    db2cmd -w c:\temp\test
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    To guyprzytula,

    Thanks for your solution.

    But do you think it is the limitation of the db2? Is there any other solutions which won't create a bat file? I just want to keep my original style of calling the db2cmd.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •