
Signature
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Hi Serge,
By source,I meant the 'CREATE TYPE' statement.
As you mentioned, I search syscat.hierarchies which has no entries.
DATATYPES has entry for the type defined but no details of 'CREATE
TYPE'.
db2look only returns table DDL, not the structure type, something like
this:
CREATE TABLE "myschema"."A1"(F1 address_t, F2 integer) in userspace1;
I expect the 'CREATE TYPE' ddl to be kept somewhere at least for
maintenance purpose, say what if we want to resize the 'street' col in
future? Where can we dig out the structured type DDL?
Thks!
> > Greetings,
> >
[quoted text clipped - 25 lines]
>
> Have you tried db2look. It's teh standard tool that reverse engineers
> SQL from the catalogs. IIRC structired types are supported.
>
> Cheers
> Serge
Serge Rielau - 12 Apr 2005 03:38 GMT
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/core/
r0002051.htm
-e
Extract DDL statements for database objects. DDL for the following
database objects are extracted when using the -e option:
* Tables
* Views
* Automatic summary tables (AST)
* Aliases
* Indexes
* Triggers
* Sequences
* User-defined distinct types
* Primary key, referential integrity, and check constraints
* User-defined structured types
* User-defined functions
* User-defined methods
* User-defined transforms
* Wrappers
* Servers
* User mappings
* Nicknames
* Type mappings
* Function templates
* Function mappings
* Index specifications
* Stored procedures
I'm quite certian I have seen structured type output from db2look....
Cheers
Serge

Signature
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
nekiv90@hotmail.com - 12 Apr 2005 07:53 GMT
My overlook!
Should have used 'db2look -d sample -e' instead of 'db2look -d sample
-t A1 -e'
Thanks!