IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extracting SQL creation script.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nethaji_mainframer

New User


Joined: 12 Dec 2011
Posts: 3
Location: India

PostPosted: Fri Apr 13, 2012 12:10 pm
Reply with quote

I have lost the creation script for a Table. Is there is a way to retreive the creation script?. I am using DB2 V9.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10903
Location: italy

PostPosted: Fri Apr 13, 2012 12:26 pm
Reply with quote

if You lost the sources of the CREATE table and all the related stuff..
than it' s gone

You can retrieve the info needed to reCREATE the table and all the related stuff
by querying the DB2 catalog tables

for just the table columns something along
Code:
SELECT COLNO, NAME, COLTYPE, LENGTH, NULLS FROM SYSIBM.SYSCOLUMNS
WHERE TBNAME = 'table in question'
ORDER BY COLNO

is a starting point
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Apr 16, 2012 2:49 pm
Reply with quote

or use a tool like
- Data Studio (free)
- BMC change Manager (not so free)
- ...
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Apr 16, 2012 8:16 pm
Reply with quote

or Platinum RC/Query can also be used to create DDL's
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
No new posts JCL sort card for file creation condi... DFSORT/ICETOOL 4
No new posts Extracting Compression Statistics fro... PL/I & Assembler 2
Search our Forums:


Back to Top