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 > finding sql for existing indexes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-07, 17:09
cgjoker cgjoker is offline
Registered User
 
Join Date: Jan 2007
Posts: 4
finding sql for existing indexes

Hi there.

I have some indexes created on my tables. How do I find the sql for them?

Db2 v.8

thx.
Reply With Quote
  #2 (permalink)  
Old 01-22-07, 17:13
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
db2look command. See the Command Reference manual.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-23-07, 07:53
vini_srcna vini_srcna is offline
Registered User
 
Join Date: May 2006
Posts: 82
If you have BMC Software Administrative Products installed at your site, you can view the DDL of the INDEX. By the way why do you need the DDL of index..? If you need to know the combination of keys involved i think you can query the catalog tables. I dont know about db2lookup.

Question to Marcus:
Is db2lookup available on all the platforms..? I wanted to know whether it works on Z/OS platform..?

Any suggestions would be greatfull. Thank you
Reply With Quote
  #4 (permalink)  
Old 01-23-07, 09:57
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
db2look

about z/os I don't know, but you can run db2look -d dbname -e -l -x -o outname on a remote client for a remote database
you need to add -w password -i userid
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #5 (permalink)  
Old 01-23-07, 11:48
cgjoker cgjoker is offline
Registered User
 
Join Date: Jan 2007
Posts: 4
db2look

the db2look utility actually worked perfectly.

I was able to see all sql pertinent to the database.

thanks.
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