1

I'm trying to execute the DB2MOVE command at a db2 prompt console in a windows 7 machine (I have db2 client installed, with proper catalogs and nodes created and tested.).

The steps I made was:

  • Open the console (cmd)
  • Run the db2cmd command (it is on path) and it opens a new console window
  • Run the db2 tool which puts me into the db2 console window
  • Connect to a existent database: connect to mydb user x using x
  • Try to run the db2move command

db2move MYDB COPY -sn MYSCHEMA -tf C:/Users/MYUSER/Desktop/exp.lst -co 
  TARGET_DB TESTDB USER user USING pass SCHEMA_MAP ((MYSCHEMA, MYSCHEMA_TEST)) PARALLEL 2

ps.: there is no enter on the command line

The error I'm getting is:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "db2move MYDB COPY -sn" was found following "BEGIN-OF-STATEMENT". Expected tokens may include: "". SQLSTATE=42601
db2 =>

I'm strictly following the rules on the docs what am I missing?

4
  • 2
    db2move is an OS command, not the CLP command. You run it in the db2cmd window.
    – mustaccio
    Commented Mar 24, 2016 at 17:07
  • @mustaccio 'db2move' is not recognized as an internal or external command, operable program or batch file. Do I need to install anything in specific other than the client? Commented Mar 24, 2016 at 17:14
  • 2
    If I remember correctly, db2move is part of the server installation, it may not be available if you only install a client.
    – mustaccio
    Commented Mar 24, 2016 at 17:18
  • @mustaccio You are right I just logged into our server (linux) and could confirm your statement it is available at the server. I will try to run my command there to see what happens. You should add this last comment as an answer since it is the real problem here. Thank you. Commented Mar 24, 2016 at 18:08

1 Answer 1

-3

In order to get the DB2 command window (DB2 CLP) in Windows, you can either Windows key + R and type db2cmd or Start > All Programs > IBM DB2 DB2COPY1 > DB2 Command Line Processor and then you can execute different db2 commands, like.

db2ilist --> List instances db2level --> DB2 Version db2licm -A --> DB2 License

etc.

Regards,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.