If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > controlling db2look output

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-26-07, 23:46
jezemine jezemine is offline
another indirection layer
 
Join Date: May 2004
Location: Seattle
Posts: 1,312
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.
__________________
elsasoft.org
Reply With Quote
  #2 (permalink)  
Old 01-29-07, 22:57
jezemine jezemine is offline
another indirection layer
 
Join Date: May 2004
Location: Seattle
Posts: 1,312
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...
__________________
elsasoft.org
Reply With Quote
  #3 (permalink)  
Old 01-30-07, 03:09
guyprzytula guyprzytula is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 01-31-07, 01:34
jezemine jezemine is offline
another indirection layer
 
Join Date: May 2004
Location: Seattle
Posts: 1,312
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.
__________________
elsasoft.org
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On