home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / datatl25.zip / DCTDSGN.Z / EWSQDMBP.QRY < prev    next >
Text File  |  1997-09-11  |  2KB  |  65 lines

  1. #NAME#
  2. DA_DB2390BufferpoolUsage
  3. #DESCRIPTION#
  4. The DB2/390 bufferpool usage impact analysis query returns the names of the DB2/390 databases, table spaces and index spaces which use the bufferpool specified in the WHERE clauses.
  5.  
  6. View type:  DAQDB2390Bufferpool
  7.  
  8. Modifications:
  9. The query uses a SQL UNION clause to provide a more compact result table. 
  10.  
  11. Change the search criteria of the Bufferpool name using the = (equals), IN or LIKE elements in each SQL WHERE clauses.
  12. #MODIFIED#
  13.  
  14. #VERSION#
  15.  
  16. #SQL STATEMENT#
  17. SELECT
  18.   b.db2390Bufferpool,
  19.   b.bufferPoolNo,
  20.   b.inRelationalSystem..relationalSystem,
  21.   r.db2390Database as relatedObject,
  22.   'DB2/390 Database' as partType
  23. FROM OUTER
  24.   DAQDB2390Bufferpool b,
  25.   (b.usedByDatabase) r,
  26.   PartView p
  27. WHERE
  28.   b.db2390Bufferpool LIKE '<>%' AND
  29.   r.db2390Database=p.baseName AND
  30.   p.partType='DSRMRDDatabase'
  31. UNION
  32. SELECT
  33.   b.db2390Bufferpool,
  34.   b.bufferPoolNo,
  35.   b.inRelationalSystem..relationalSystem,
  36.   r.db2390Tablespace as relatedObject,
  37.   'DB2/390 Tablespace' as partType
  38. FROM OUTER
  39.   DAQDB2390Bufferpool b,
  40.   (b.usedByTablespace) r,
  41.   PartView p
  42. WHERE
  43.   b.db2390Bufferpool LIKE '<>%' AND
  44.   r.db2390Tablespace=p.baseName AND
  45.   p.partType='DSRMRDTablespace'
  46. UNION
  47. SELECT
  48.   b.db2390Bufferpool,
  49.   b.bufferPoolNo,
  50.   b.inRelationalSystem..relationalSystem,
  51.   r.db2390Index as relatedObject,
  52.   'DB2/390 Index' as partType
  53. FROM OUTER
  54.   DAQDB2390Bufferpool b,
  55.   (b.usedByIndex) r,
  56.   PartView p
  57. WHERE
  58.   b.db2390Bufferpool LIKE '<>%' AND
  59.   r.db2390Index=p.baseName AND
  60.   p.partType='DSRMRDIndex'
  61. ORDER BY
  62.   1 ASC,
  63.   5 ASC,
  64.   4 ASC;
  65.