The DB2/30 Database contents query returns the name of the DB2/390 tables, tablespaces and indexes which are contained in the specified Database name. It also returns the name of the storage group and bufferpool used by the database.
View type: DAQDB2390Database
Modifications:
The query uses a SQL UNION clause to provide a more compact and readable table. In order to change the search criteria, you must change it for each subselect statement in the UNION. Change the search criteria of the database name using the = (equals), IN or LIKE elements in the SQL WHERE clause.
#MODIFIED#
#VERSION#
#SQL STATEMENT#
SELECT DISTINCT
d.db2390Database,
d.containsTable..db2390Table as contains,
'Table' as contentType,
d.usesStoragegroup..db2390Storagegroup,
d.usesBufferpool..db2390Bufferpool,
d.inPhysicalDesign..db2390PhysicalDesign,
d.roShareFlag,
d.ccsid,
d.databaseDescription,
p.lastUpdate,
p.addDate
FROM OUTER
DAQDB2390Database d,
PartView p,
PartView p1
WHERE
d.DB2390Database LIKE '<>%' AND
d.DB2390Database=p.baseName AND
d.containsTable..db2390Table=p1.baseName AND
p1.partType='DSRMRDTable' AND
p.partType='DSRMRDDatabase'
UNION
SELECT DISTINCT
d.db2390Database,
d.containsTablespace..db2390Tablespace as contains,
'Tablespace' as contentType,
d.usesStoragegroup..db2390Storagegroup,
d.usesBufferpool..db2390Bufferpool,
d.inPhysicalDesign..db2390PhysicalDesign,
d.roShareFlag,
d.ccsid,
d.databaseDescription,
p.lastUpdate,
p.addDate
FROM OUTER
DAQDB2390Database d,
PartView p,
PartView p1
WHERE
d.DB2390Database LIKE '<>%' AND
d.DB2390Database=p.baseName AND
d.containsTablespace..db2390Tablespace=p1.baseName AND