Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2010
    Posts
    4

    Unanswered: Table dependecies

    Hi

    I want to see what is the dependencies on some tables in a DB2 database.
    I specificaly want to see which stored procedures are dependent on a table.

    thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Look in syscat.routinedep.

    Andy

  3. #3
    Join Date
    Jul 2010
    Posts
    4

    Table dependecies

    Select r.ROUTINESCHEMA, r.ROUTINENAME,r.routinetype,r.specificname,D.BName ,D.BType,pgd.bname
    from syscat.routineDEP D,SYSCAT.ROUTINES R, syscat.PACKAGEDEP pgd
    where d.SPECIFICNAME = R.specificname and ROUTINETYPE = 'P'
    and d.BNAME = pgd.PKGNAME and pgd.BTYPE = 'T'
    fetch first 20000 rows only

    can anybody tell me if I GOT it

  4. #4
    Join Date
    Jul 2010
    Posts
    4

    Table dependecies

    Thanks Winner, is that why your are called Winner,
    I have just posted what I think the solution is, maybe you can check if I am a winner as well

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I am a Winner because that is my actual name. To see what Stored Procedures are dependent on a table, you only need syscat.routinedep and syscat.routines.

    Andy

  6. #6
    Join Date
    Jul 2010
    Posts
    4

    Table dependecies

    Thanks for your help

Posting Permissions

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