Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313

    Unanswered: controlling db2look output

    I have two questions:

    1) is there any way to filter the output of db2look when using the -t or -v flags?

    In particular, if I use -t to say I want the DDL for a single table, it gives me the DDL for that table, as well as any views, sprocs, etc that depend on it, which I don't want. I want only the table ddl.

    Is there any way to specify this? I carefully read the cmd line args here but can't seem to find any switch that would do it:

    http://publib.boulder.ibm.com/infoce...e/r0002051.htm

    here's my cmd line:

    db2look -e -d "SAMPLE" -i "jesse" -w "password" -z "JESSE" -t "DEPARTMENT"

    2) also, is there any way to tell db2look that I only want the ddl for a particular sproc or function? it seems it's only possible to ask for a particular table or view with the -t or -v switches (which don't work as I would expect btw, see above), and not any other type of object.

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    does nobody know whether this is possible? I'll have to assume that it's not. if so I am less than impressed with db2look...

  3. #3
    Join Date
    Jun 2006
    Posts
    471

    db2look

    just a tool to copy a dbase schema not a user program...
    you could direct the output to a file and use awk 'CREATE TABLE'/';'
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    not sure what you mean by "not a user program". Don't all programs have users? A program without a user has no reason to exist. In the case of db2look, the user is generally a DBA.

    In any case, thanks for the suggestion - I was hoping to avoid having to parse the script myself but it's apparent that's necessary.

Posting Permissions

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