Thursday, September 13, 2007

How to list tables in another schema?

db2 > List tables for schema s1
db2> list tables for schema s2
db2> list tables for schema s3

or to list for all schemas

db2> list tables for all

or

db2 > Select TABSCHEMA, TABNAME, DEFINER from SYSCAT.TABLES where tabschema
IN ('S1','S2','S3')
tabschema is the schema name & Definer is the user name

EXTRA
to check store procedure
db2 > select PROCSCHEMA, PROCNAME from SYSCAT.PROCEDURES where procname = 'RPT_REGUSER_LOGIN_I' or procschema = 'IBSADMIN';

ref

No comments: