Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    4

    Unanswered: 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.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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

  4. #4
    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

  5. #5
    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.

Posting Permissions

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