Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Extracting SQL creation script.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Extracting SQL creation script.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Fri Apr 13, 2012 12:26 pm    Post subject: Reply to: Extracting SQL creation script.
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    Post subject:
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: 1013
Location: India

PostPosted: Mon Apr 16, 2012 8:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts How to detect file creation event? vasanthz All Other Mainframe Topics 5 Fri May 20, 2016 1:33 am
No new posts Extracting Information from DD Statem... Charles Wolters All Other Mainframe Topics 7 Wed Apr 13, 2016 10:21 pm
No new posts New DB2 tables creation kishpra DB2 3 Tue Feb 02, 2016 7:00 pm
No new posts USS Shell script:Convert hex to binar... RSR2015 All Other Mainframe Topics 0 Fri Sep 18, 2015 2:00 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us