LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > NullTerminator
User Name
Password

Notices

Rate this Entry

IBM AS400 DB2 Catalog Views

Posted 11-29-2012 at 08:57 AM by NullTerminator

Various objects are available to query the underlying meta data.
select * from qsys2.sysviews where view_owner ='xyz' and TABLE_NAME = 'tab1'
select * from qsys2.systables where table_owner ='xyz' and TABLE_NAME NOT LIKE 'SYS%'

-- Stored Procedures, SIMILAR RESULTS from sysroutines
select * from qsys2.sysprocs where routine_schema ='xyz' and ROUTINE_NAME NOT LIKE 'SYS%'

Other catalog views
SYSINDEXES
SYSKEYS
SYSPROCS
SYSROUTINES
SYSTRIGGERS

THERE ARE ALSO ANUMBER OF VIEWS UNDER
SYSIBM.VIEWS
SYSIBM.SCHEMATA_S
SYSIBM.AUTHORIZATIONS
but I am not so certain of their usefulness

self search CatalogQueries.sql possibly from custrolo
Posted in Uncategorized
Views 772 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration