Question : db2

Hi ,

How to see the syscatalog(SYSCAT) information stored by my database ?
For example if I create a schema by name Test , how to get the information about Test ?


Thanks and regards
Vishwanath

Answer : db2

You can also use freeware tools ExecuteQuery & DBVisualizer to schema details. Schema is a object by itself in database which is used to group objects of various types under it.

At command line:

db2 list tables for schema <schema_name>
db2 list tables for schema SYSCAT

In command line processor you can drop the first word db2 in above commands.

SYSCAT also has tables called views, indexes etc.

we need to connect to database and then give

"db2 select schemaname from syscat.schemata ".....

this will list all the schema's available corresponding to the database. You can include more columns in SELECT list as well introduce other clauses like WHERE, GROUP By, ORDER BY etc. to this query.
Random Solutions  
 
programming4us programming4us