Results 1 to 6 of 6

Thread: db2look usage

  1. #1
    Join Date
    Jul 2009
    Location
    Sydney
    Posts
    13

    Unanswered: db2look usage

    Hi,

    I am trying to reconstruct a UDF so I'm attempting to use db2look

    I have
    > db2look -d mydb -e

    the error which I am 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 "db2look" was found following
    "BEGIN-OF-STATEMENT". Expected tokens may include: "DECLARE".

    which seems a bit weird to me

    might this be because I don't have access to system tables? shouldn't the error message be a bit more descriptive if that is the case?

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    From CLP:

    db2 => !db2look -d sample -e
    -- USER is: DB2ADMIN
    -- Creating DDL for table(s)
    -- This CLP file was created using DB2LOOK Version "9.7"
    -- Timestamp: 2009/11/18 11:02:11
    -- Database Name: SAMPLE
    -- Database Manager Version: DB2/NT Version 9.7.0
    -- Database Codepage: 1208
    -- Database Collating Sequence is: IDENTITY

  3. #3
    Join Date
    Jul 2009
    Location
    Sydney
    Posts
    13
    that worked

    sorry if this is a really dumb question, but what is the ! for?

    and why isn't it in the docs? (or is it and I'm just not seeing it?)

    does it have something to do with my setup?

  4. #4
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    I can't remember how I leaned "!".

    But, I found a description in
    DB2 Database for Linux, UNIX, and Windows

    db2 - Command line processor invocation command
    .....
    The shell command (!), allows operating system commands to be executed from the interactive or the batch mode on UNIX based systems, and on Windows operating systems (!ls on UNIX, and !dir on Windows operating systems, for example).
    Last edited by tonkuma; 11-17-09 at 23:21.

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you back out of the DB2 comand prompt to windows command line then you don't need the !. db2look is not an SQL command, it is a program.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Jul 2009
    Location
    Sydney
    Posts
    13
    oh I see - that makes total sense...

    ! thanks

Posting Permissions

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