--Query the corresponding view of the specific content.
Select varchar (text) | | '; ' from Syscat. views where VIEWNAME like '%v$_% '
--generates a statement that deletes a view.
Select ' Drop View ' | | viewname| | '; ' from Syscat. Views where VIEWNAME like '%v$_% '
--Do you want to find all the patterns in the entire database? The following statement can implement:
--The query table corresponds to the permissions situation
DB2 =>select * FROM Syscat.tabauth
--View db's corresponding permissions situation
DB2 =>select * FROM Syscat.dbauth
--The Query column corresponds to the permissions
DB2 =>select * FROM Syscat.colauth
--Get the current DB2 version
DB2 =>select * FROM Sysibm.sysversions
--How do I view the stored procedures of a database?
DB2 =>select * from SYSCAT. Procedures
--How do I see constraints on a table?
DB2 =>select * from SYSCAT. CHECKS WHERE tabname =
--How do I see the reference complete constraint for a table?
DB2 =>select * from SYSCAT. REFERENCES WHERE tabname =
--How do you know the bufferpools situation?
DB2 =>select * from SYSCAT. Bufferpools
--How do you know how many tables a user has?
DB2 =>select * from SYSIBM. Systables WHERE creator= ' USER '
--How do I know the function under the user?
DB2 =>select * from IWH. Userfunction
DB2 =>select * from SYSIBM. Sysfunctions
--How do I know the view number under the user?
DB2 =>select * from Sysibm.sysviews WHERE creator= ' USER '
--How to know the number of trigger under the user?
DB2 =>select * from SYSIBM. Systriggers WHERE schema= ' USER '
--How do you know the status of Tablespace?
DB2 =>select * from SYSIBM. Systablespaces
How do---know about the sequence situation?
DB2 =>select * from SYSIBM. Syssequences
--How to know the status of index?
DB2 =>select * from SYSIBM. sysindexes
--How do you know the status of a table's fields? Note: The table name is capitalized and the pattern is capitalized
DB2 =>select * from SYSIBM. syscolumns WHERE tbname= '
How do---Know the DB2 data type?
SELECT * FROM SYSIBM. Sysdatatypes
--How do you know the bufferpools situation?
SELECT * FROM SYSIBM. Sysbufferpools
--How do I view the package for a database?
SELECT * FROM Syscat.packages
--How do I view the stored procedures of a database?
DB2 =>select * from SYSCAT. Procedures
DB2 =>select * from Sysibm.sysprocedures