Antwort: Re: [DB2-L] CREATE TABLE ABC.table like XYZ.table question

Roy Boxwell

Antwort: Re: [DB2-L] CREATE TABLE ABC.table like XYZ.table question
sadly DB2LOOK is a little buggy.....but it might do what you need....
(After you remove the V8 stuff of course!)

Roy Boxwell
SOFTWARE ENGINEERING GMBH
-Product Development-
Robert-Stolz-Strasse 5
40470 Duesseldorf/Germany
Tel. +49 (0)211 96149-0
Fax +49 (0)211 96149-35
E-mail [login to unmask email]
Homepage www.seg.de

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Ruediger Kurtz

AW: [DB2-L] CREATE TABLE ABC.table like XYZ.table question
(in response to Roy Boxwell)
Georg,

I wonder whether you got a 'Catalog Tool' somewhere (such as "IBM DB2 Administration Tool" e.g.) ; those usually have a DDL-Generator that you could use.

Hth Ruediger

-----Ursprüngliche Nachricht-----
Von: DB2 Data Base Discussion List [mailto:[login to unmask email] Im Auftrag von Bruce, Mae
Gesendet: Montag, 11. Dezember 2006 16:39
An: [login to unmask email]
Betreff: Re: [DB2-L] CREATE TABLE ABC.table like XYZ.table question

Maybe the DB2PLI8 program could help you some. It has a DDL option. It
isn't shipped with DB2 but it can be downloaded.
http://www-1.ibm.com/support/docview.wss?rs=64&context=SSEPEK&dc=DB520&u
id=swg21206998&loc=en_US&cs=UTF-8&lang=en

It uses a table name as input so you wouldn't just be able to give it a
database name and it create everything in the db; you would have to tell
it each table name and each view name (I think).

Hope this helps.
Mae

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Peter, Georg
Sent: Monday, December 11, 2006 8:13 AM
To: [login to unmask email]
Subject: [DB2-L] CREATE TABLE ABC.table like XYZ.table question


DB2 for z/OS v7

Fellow Collegues,

I have to "clone" 172 tables, 298 views and about 224 indexes for an
"extra-copy" of an existing application.

The worst thing is that I do not have a cloning tool. And I do not have
the complete DDL especially for the 172 CREATE TABLE's.

When I run "CREATE TABLE ABC.table like XYZ.table..." I will get an
exact copy of the table XYZ.table - correct ?

But what happens with the primary key of this table ? Will this primary
key build also automatically ? Or do I have to ALTER the table (= adding
a PK) later ?

Some good ideas for me ?

Thanks in advance for any advice you may be able to provide.

With kind regards - mit freundlichen Gruessen,
G e o r g H . P e t e r
------------------------------------------------------------------
Datenzentrale Baden-Wuerttemberg
Development and Product Support (E3)
Krailenshaldenstrasse 44, 70469 Stuttgart, Germany, Europe
e:mail [login to unmask email]
Phone 0049-711-8108-271
PC-Fax 004971189696071
Internet (only in german language):http://www.dzbw.de
----------------------------------------------------------------------
>"Next time you think you're perfect - try walk on water!"<


Abonnieren Sie den monatlichen Infobrief der Datenzentrale
Baden-Wurttemberg und erfahren Sie regelma?ig die neuesten Nachrichten
uber aktuelle Projekte und Entwicklungen. Melden Sie sich an mit diesem
Link http://www.datenzentrale.de/Info-Brief

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

harby ariza

Re: AW: [DB2-L] CREATE TABLE ABC.table like XYZ.table question
(in response to Ruediger Kurtz)

_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________



I believe if you happen to have a db2 udb unix instance and you catalog your OS/390 database/subsystem to be able to access/connect from the unix server you should be able to use the db2look command (db2 udb unix) and it'll create all tables/ddl for you. Even using a db2 instance on windows should work as well. I'll try tomorrow and let you know.

harby.


________________________________

From: DB2 Data Base Discussion List on behalf of Kurtz, Rüdiger
Sent: Tue 12/12/2006 6:05 PM
To: [login to unmask email]
Subject: [DB2-L] AW: [DB2-L] CREATE TABLE ABC.table like XYZ.table question



Georg,

I wonder whether you got a 'Catalog Tool' somewhere (such as "IBM DB2 Administration Tool" e.g.) ; those usually have a DDL-Generator that you could use.

Hth Ruediger

-----Ursprüngliche Nachricht-----
Von: DB2 Data Base Discussion List [mailto:[login to unmask email] Im Auftrag von Bruce, Mae
Gesendet: Montag, 11. Dezember 2006 16:39
An: [login to unmask email]
Betreff: Re: [DB2-L] CREATE TABLE ABC.table like XYZ.table question

Maybe the DB2PLI8 program could help you some. It has a DDL option. It
isn't shipped with DB2 but it can be downloaded.
http://www-1.ibm.com/support/docview.wss?rs=64&context=SSEPEK&dc=DB520&u
id=swg21206998&loc=en_US&cs=UTF-8&lang=en

It uses a table name as input so you wouldn't just be able to give it a
database name and it create everything in the db; you would have to tell
it each table name and each view name (I think).

Hope this helps.
Mae

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Peter, Georg
Sent: Monday, December 11, 2006 8:13 AM
To: [login to unmask email]
Subject: [DB2-L] CREATE TABLE ABC.table like XYZ.table question


DB2 for z/OS v7

Fellow Collegues,

I have to "clone" 172 tables, 298 views and about 224 indexes for an
"extra-copy" of an existing application.

The worst thing is that I do not have a cloning tool. And I do not have
the complete DDL especially for the 172 CREATE TABLE's.

When I run "CREATE TABLE ABC.table like XYZ.table..." I will get an
exact copy of the table XYZ.table - correct ?

But what happens with the primary key of this table ? Will this primary
key build also automatically ? Or do I have to ALTER the table (= adding
a PK) later ?

Some good ideas for me ?

Thanks in advance for any advice you may be able to provide.

With kind regards - mit freundlichen Gruessen,
G e o r g H . P e t e r
------------------------------------------------------------------
Datenzentrale Baden-Wuerttemberg
Development and Product Support (E3)
Krailenshaldenstrasse 44, 70469 Stuttgart, Germany, Europe
e:mail [login to unmask email]
Phone 0049-711-8108-271
PC-Fax 004971189696071
Internet (only in german language):http://www.dzbw.de
----------------------------------------------------------------------
>"Next time you think you're perfect - try walk on water!"<


Abonnieren Sie den monatlichen Infobrief der Datenzentrale
Baden-Wurttemberg und erfahren Sie regelma?ig die neuesten Nachrichten
uber aktuelle Projekte und Entwicklungen. Melden Sie sich an mit diesem
Link http://www.datenzentrale.de/Info-Brief

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm




_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in reliance
upon this information, by persons or entities other than the intended recipient is
prohibited.

If you have received this in error, please contact the sender and delete this e-mail
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute
the information contained in this e-mail and any attached files, with the permission
of the sender.

This message has been scanned for viruses with Symantec Scan Engine and cleared by
MailMarshal.
_______________________________________________________________________________________

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm