1;m;Tables/Views within Database;Select distinct tabschema from syscat.tables;Schema;1200;
2;m;Tables (only) within Database;Select distinct tabschema from syscat.tables where type = 'T';Schema;1200;
3;m;Packages within Database;Select distinct pkgschema from syscat.packages;Schema;1200;
4;m;Triggers within Database; Select distinct trigschema from syscat.triggers;Schema;1200;
6;m;Indexes within Database;Select distinct indschema from SYSCAT.INDEXES;Schema;1200;
7;u;Users within Database;Select distinct grantee from (select distinct grantee from SYSCAT.TABAUTH union select distinct grantee from syscat.packageauth union select distinct grantee from syscat.dbauth) as a;User;1200;
9;m;Views within Database;Select distinct creator from SYSIBM.SYSTABLES where type = 'V';Schema;1200;
10;m;Tables/Views within Schema;Select tabname, type, substr(remarks,1,50) from syscat.tables where tabschema = ? order by 1;Table;2000;Type;500;Desc;3500;
11;s;Full details of;Select * from syscat.tables where tabschema = ? and tabname = ?;Column;1500;Value;3000;
12;m;Indexes on;Select indname,uniquerule,colnames from syscat.indexes where tabschema = ? and tabname=? order by indname;Index;1500;Type;500;Columns;4000;
13;m;Objects comprising View;Select BSCHEMA, BNAME, BTYPE from SYSCAT.VIEWDEP where viewschema=? and viewname=? order by 1,2;Schema;1200;Name;2000;Type;500;
14;m;Packages using;Select a.pkgschema,a.pkgname, b.remarks,a.tabauth from SYSCAT.PACKAGEDEP a, syscat.packages b where a.pkgschema=b.pkgschema and a.pkgname=b.pkgname and bschema = ? and bname=? order by 1,2;Pkg Schema;1000;Pkg Name;2000;Desc;5000;
15;m;Access list for;Select distinct grantee, selectauth, updateauth, insertauth, deleteauth, alterauth, refauth from sysibm.systabauth where tcreator = ? and ttname=? order by grantee;Userid;1000;Select;800;Update;800;Insert;800;Del;800;Alter;600;Ref;600;
16;m;Views on;Select VIEWSCHEMA, VIEWNAME from SYSCAT.VIEWDEP where bschema=? and bname=? order by 1,2;View Schema;1500;View Name;2500;
17;w;Definition of view;Select substr(TEXT,1,2000) from SYSCAT.VIEWS WHERE VIEWSCHEMA=? AND VIEWNAME=? order by seqno;a;1;
'17;v;Definition of view;Select TEXT, seqno from pcastle.SYSVIEWS WHERE CREATOR=? AND NAME=? order by seqno;Seq;800;Text;5000;
20;c;Column list for;SELECT COLNAME, TYPENAME, length, SCALE, NULLS,remarks,COLNO,default FROM SYSCAT.COLUMNS WHERE TABSCHEMA=? and TABNAME=? order by colno;Name;2000;Type;1000;Length;650;Scale;500;Nulls;500;Desc;3000;Default;2500;
21;s;Details of package;Select * from syscat.packages where pkgschema = ? and pkgname = ?;Column;1500;Value;3000;
22;m;Objects used by Package;Select bschema,bname, btype,tabauth from SYSCAT.PACKAGEDEP where pkgschema=? and pkgname=? order by 1,2;Schema;1500;Name;2000;Type;1000;Tabauth;800;
23;m;Statement in package;Select SECTNO,STMTNO, SEQNO, substr(TEXT,1,200)from SYSCAT.STATEMENTS where pkgschema=? and pkgname=? order by 1,2,3;Section;700;Stmt;600;Seq;500;Text;8000;
24;m;Access list for package;Select GRANTEE, GRANTEETYPE, executeauth, BINDAUTH, CONTROLAUTH from SYSCAT.PACKAGEAUTH where pkgschema=? and pkgname=? order by grantee;Id;1000;Id Type;800;Execute;800;Bind;800;Control;800;
25;t;Details of trigger;Select * from syscat.triggers where trigschema = ? and trigname = ?;Column;1500;Value;3000;
26;m;Triggers on table;Select TRIGSCHEMA,TRIGNAME,VALID,Trigevent,TRIGTIME from SYSCAT.TRIGGERS WHERE TABSCHEMA=? AND TABNAME=?;Schema;1200;Name;1500;Valid;600;Event;600;Time;600;
27;m;Triggers involving table;Select a.TRIGSCHEMA, a.TRIGNAME, b.tabschema,b.tabname,b.valid from SYSCAT.TRIGDEP a, syscat.triggers b where a.trigschema=b.trigschema and a.trigname=b.trigname and a.bschema=? AND BNAME=?;Trg Schema;1000;Trg Name;1000;Tab Schema;1200;Tab Name;1800;Valid;600;
31;m;Tables (only) within Schema;Select tabname, substr(remarks,1,50) from syscat.tables where tabschema = ? and type='T' order by 1;Table;2000;Desc;3500;
32;m;Packages within Schema;Select PKGNAME, valid, remarks, LAST_BIND_TIME,TOTAL_SECT from SYSCAT.PACKAGES where pkgschema=? order by 1;Name;1500;Valid;500;Desc;2500;
33;m;Triggers within Schema;Select TRIGNAME,VALID, REMARKS from SYSCAT.TRIGGERS where trigschema=? order by 1;Name;1500;Valid;500;Desc;2500;
34;d;Contents of;Select TRIGNAME,VALID, REMARKS from SYSCAT.TRIGGERS where trigschema=? order by 1;Name;1500;Valid;500;Desc;2500;
35;m;Parent Tables for;Select REFTABSCHEMA, REFTABNAME, FK_COLNAMES, PK_COLNAMES, deleterule from SYSCAT.REFERENCES WHERE TABSCHEMA =? and TABNAME=?;Schema;1000;Parent Table;1500;Child Cols;2000;Parent Cols;2000;Delete Rule;1000;
36;m;Child Tables for;Select TABSCHEMA, TABNAME, PK_COLNAMES, FK_COLNAMES,deleterule from SYSCAT.REFERENCES WHERE REFTABSCHEMA =? and REFTABNAME=?;Schema;1000;Child Table;1500;Parent Cols;2000;Child Cols;2000;Delete Rule;1000;
37;m;Dependent objects for trigger;Select BSCHEMA, BNAME, BTYPE WHERE from SYSCAT.TRIGDEP WHERE TRIGSCHEMA=? AND TRIGNAME=?;Schema;1000;Name;1500;Type;600;
38;m;Tables within Schema;Select TABNAME,type,CARD,NPAGES from SYSCAT.TABLES WHERE TABSCHEMA=? order by npages desc;Table;2000;Type;500;Rows;800;Pages;800;
39;m;Column sizing for;Select COLNAME,COLCARD,LENGTH,AVGCOLLEN,LOW2KEY,HIGH2KEY from SYSCAT.COLUMNS WHERE TABSCHEMA =? and TABNAME=? order by colno;Name;1500;Distinct;800;Length;800;Avg Len;800;2nd Lowest Value;1500;2nd Highest Value;1500;
40;m;Tablespaces within database;Select distinct tbspace from SYSCAT.TABLESPACES;Tablespace;1500;
41;s;Details of tablespaces;Select * from SYSCAT.TABLESPACES where tbspace=?;Column;1500;Value;3000;
42;m;Indexes within Schema;Select iNDNAME,TABSCHEMA,TABNAME from SYSCAT.INDEXES WHERE INDSCHEMA=?;Name;1800;Tab Schema;1000;Tab Name;1500;
43;s;Details of Index;Select * from SYSCAT.INDEXES WHERE INDSCHEMA=? AND INDNAME=?;Column;1500;Value;3000;
44;m;Tables within Tablespace;Select TABSCHEMA,TABNAME,NPAGES,CARD from SYSCAT.TABLES WHERE TBSPACE=? order by 1,2;Tab Schema;1200;Tab Name;1800;Pages;600;Rows;800;
45;a;Table authorities for user;Select distinct TABSCHEMA,TABNAME,SELECTAUTH, UPDATEAUTH,INSERTAUTH, DELETEAUTH, ALTERAUTH, CONTROLAUTH, REFAUTH, INDEXAUTH from SYSCAT.TABAUTH WHERE GRANTEE=? ORDER BY 1,2;Schema;1000;Name;1800;Select;600;Update;600;Insert;600;Delete;600;Alter;600;Control;600;References;600;Index;600;
46;m;Package authorities for user;Select distinct PKGSCHEMA,PKGNAME,EXECUTEAUTH,BINDAUTH, CONTROLAUTH from SYSCAT.PACKAGEAUTH WHERE GRANTEE=?;Schema;1000;Package;1500;Execute;800;Bind;800;Control;800;
47;m;Database authorities for user;Select distinct CONNECTAUTH,CREATETABAUTH,BINDADDAUTH,DBADMAUTH,NOFENCEAUTH, IMPLSCHEMAAUTH from SYSCAT.DBAUTH WHERE GRANTEE=?;Connect;1000;Create Tab;1000;Bind Add;1000;Dbadm;1000;No Fence;1000;Implicit Schema;1200;
48;v;Definition of view;Select substr(TEXT,1,2000) from SYSCAT.VIEWS WHERE VIEWSCHEMA=? AND VIEWNAME=? order by seqno;a;1;
49;m;Views within Schema;Select name, type, substr(remarks,1,50) from sysibm.systables where creator = ? and type = 'V' order by 1;Table;2000;Type;500;Desc;3500;
50;b;Table authorities for;Select TABSCHEMA,TABNAME,GRANTOR,SELECTAUTH, UPDATEAUTH,INSERTAUTH, DELETEAUTH, ALTERAUTH, CONTROLAUTH, REFAUTH, INDEXAUTH from SYSCAT.TABAUTH WHERE GRANTEE=? ORDER BY 1,2;Schema;1000;Name;1800;Grantor;800;Select;600;Update;600;Insert;600;Delete;600;Alter;600;Control;600;References;600;Index;600;
78;m;Schema authorities for user;Select distinct SCHEMANAME,CREATEINAUTH,ALTERINAUTH,DROPINAUTH from SYSCAT.SCHEMAAUTH WHERE GRANTEE=?;Schema;1200;Create;800;Alter;800;Drop;800;