Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2011
    Posts
    38

    Unanswered: parameters for db2 command line

    How can I get a list of all paramters that can be used with db2 command line and a description of what each one does?

    When I want to run a SQL query stored in a file, I do db2 -tsfv FILE.sql but I don't know for sure what -t -s -v and -f do. I think -f is to say a file is used and -t is to make sure new line characters don't confuse db2. But my efforts to find a documentation (such as man db2 or db2 --help) where to no avail.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can download the PDF version of DB2 LUW Command Reference Manual for the specific release you are using (9.7, 10.1, 10.5). Or you can find it in the DB2 InfoCenter website. Try Google to find these on the web.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Apr 2011
    Posts
    38
    Thanks. I have been looking at the Info Center but I cannot find where they discuss the parameters. I was not aware of the PDFs; I will check that out too.

    I find it quite unfortunate that the db2 command line program doesn't come with a man page or some form of help functoinality itself.

  4. #4
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    cannot find?

    search "command line processor options"...or even "clp options"

    IBM Knowledge Center

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by merik View Post

    I find it quite unfortunate that the db2 command line program doesn't come with a man page or some form of help functoinality itself.
    It actually does:

    Code:
    $ db2 ? options
    db2 [option ...] [db2-command | sql-statement |
        [? [phrase | message | sqlstate | class-code]]]
    option: -a, -c, -d, -e{c|s}, -finfile, -i, -lhistfile, -m, -n, -o,
            -p, -q, -rreport, -s, -t, -td;, -v, -w, -x, -zoutputfile.
    
     Option  Description                               Default Setting
     ------  ----------------------------------------  ---------------
       -a    Display SQLCA                             OFF
       -c    Auto-commit                               ON
       -d    Retrieve and display XML declarations     OFF
       -e    Display SQLCODE/SQLSTATE                  OFF
       -f    Read from input file                      OFF
       -i    Display XML data with indentation         OFF
       -l    Log commands in history file              OFF
       -m    Display the number of rows affected       OFF
       -n    Remove new line character                 OFF
       -o    Display output                            ON
       -p    Display db2 interactive prompt            ON
       -q    Preserve whitespaces and linefeeds        OFF
       -r    Save output report to file                OFF
       -s    Stop execution on command error           OFF
       -t    Set statement termination character       OFF
       -v    Echo current command                      OFF
       -w    Display FETCH/SELECT warning messages     ON
       -x    Suppress printing of column headings      OFF
       -z    Save all output to output file            OFF
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Apr 2011
    Posts
    38
    Amazing! Thanks for sharing it. I guess I am too used to linux standards for documentation.

Posting Permissions

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