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

Dropped table DDL


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

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 7:26 pm
Reply with quote

Hi All,

I didn't face this situation.
But I would like to know is there any way/method to get the DDL for the dropped table without using any tool on DB2 on z O/S.

Thanks in advance.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 04, 2011 7:40 pm
Reply with quote

Dear DBA ON zO/S,

what will you give me for an answer?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 7:42 pm
Reply with quote

no, there isn't. And even with most of the tools (I know). you're still f*cked.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 7:45 pm
Reply with quote

dbzTHEdinosauer wrote:
Dear DBA ON zO/S,

what will you give me for an answer?

It is indeed funny that a user called sysdba.zos asks such a question.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 7:52 pm
Reply with quote

Quote:
Currently, <company> employs 120,000 employees (March 31, 2011). The company recorded total revenue of $6.98 billion (IT revenues stood at $ 5.2 billion) for the year ended March 31, 2011 while net income for the same year was $1.19 billion. We believe in sustained growth by being a partner to industry leaders, attracting the best leaders, offering industry-leading expertise and continue our steadfast global presence.
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 7:53 pm
Reply with quote

Cool icon_biggrin.gif .
learning is good thing
But sharing the knowledge is the best thing.
I will give you treat when we meet. icon_smile.gif
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 7:56 pm
Reply with quote

I am a beginner in DB2 on z O/S.
I have tried some naming convention for creation of userid for this website.
All the combinations went in vain.
That'sy I chossed db2sysdba.zos.

If you know the answer Kindly let me know.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 8:02 pm
Reply with quote

db2sysdba.zos wrote:
If you know the answer Kindly let me know.
Already did
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 8:10 pm
Reply with quote

ok.

I think dbzTHEdinosauer knew the answer.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 04, 2011 8:11 pm
Reply with quote

Quote:
I have tried some naming convention for creation of userid for this website.

are You ashamed of using Your name ?

...or your name is prone to duplicates as
German Schmidt ( the second in rank , the first had a german special char )
English Smith, Johnson, Williams
Italian Rossi, Bianchi
French Martin, Bernard
.....
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 8:15 pm
Reply with quote

Sorry If I am wrong

what is there in username?

I am here to learn new things about db2 on z o/s.

Kindly let me know if you guys realy about concern on my username.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 04, 2011 8:19 pm
Reply with quote

we really do not give a shit about it, but if You do not want to be the object of picky comments

from Your profile
Quote:
Mainframe Skills: DB2

but You agree on ...
Quote:
I am a beginner in DB2 on z O/S.

and then Your signature
Quote:
DBA ON zO/S

do not claim skills that You do not have

and since You are completely anonymous why do You care about our comments !

You will have to bear them if You want help icon_evil.gif
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 8:25 pm
Reply with quote

Now check my profile.

Changed to "Beginner in DB2"

Hope the person who are all concern with my profile is now happy.

Now Kindly let me know the answer of this Question DB2 experts.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 04, 2011 8:27 pm
Reply with quote

Quote:
Hope the person who are all concern with my profile is now happy.

the profile tells the people willing to reply what kind of reply to give You
if You claim a certain knowledge the responder usually assumes that You know the basics
and the reply will not insist on smaller details

Quote:
Now Kindly let me know the answer of this Question DB2 experts.

did You read the one You already received ...
after You drop a table, it is gone, vaporized, not there any longer, ...
You will have to rewrite the DDL from scratch amen icon_evil.gif

to make the most out of the questions You ask and to forecast the comments You might receive
it would be wise for You to read and meditate on
how to ask questions the smart way
here catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here support.microsoft.com/kb/555375
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Oct 04, 2011 8:29 pm
Reply with quote

GuyC has already answered your question twice.
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 8:34 pm
Reply with quote

Hi all

Check this soln.

say yesterday we took dump of whole Prod. database( we used to do)

today morning we dropped the table.

Can't we get the ddl by restoring the dump?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 04, 2011 8:37 pm
Reply with quote

take the dump is a bit generic...
You will find/recover the data You have lost only and only by restoring everything
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Tue Oct 04, 2011 8:39 pm
Reply with quote

that's what I am asking is there any optimised way to find out without restoring the whole dump?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 8:44 pm
Reply with quote

It might be possible to restore part of the catalog in catalog-lookalikes or unload from catalog imagecopies in sequential files.
and based on the info there retrieve the information to (manually) generate the DDL.
But this is not something you would accomplish in 30minutes.

thus my first answer => F*cked
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 04, 2011 9:13 pm
Reply with quote

if there was a dclgen run on the table
to create a copybook to used as an include member for host variables,
you can start there.

but, you will not have any index info, restrainsts, triggers,
in short you will only have the ddl to describe the columns.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Oct 04, 2011 10:08 pm
Reply with quote

Hello and welcome to the forum,

We do have some grumpy old men around here - i too am one icon_smile.gif

As you have seen, sometimes we get more involved with how the question was asked rather than the question itself. Unfortunate. However, if this helps teach people how to become better are getting informatoin, it is probably worth a few scrapes and bruises . . .

If one pay attention to the lessons, it gets better rather quickly.

Quote:
Now Kindly let me know the answer of this Question DB2 experts.
As to your question - yes it has been answered and no, you cannot do this. How might you "read" something that no longer exists?

Well-managed organizations retain a repository of all of the database definitions that have been placed in use. Even if it is no more than copies downloaded for safekeeping. Once created, there is no good reason to lose anything that is part of the system. If you find yourself working in an environment that there is not proper backups of all of the source, jcl, copybooks, database definitions, etc., strongly encourage that these be put in place.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Oct 04, 2011 10:12 pm
Reply with quote

db2sysdba.zos,

Since you are just looking for the structure, can't you find it in Development/UAT/Model/Acceptance/(whatever that is below production).

Regards,
Sushanth
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Tue Oct 04, 2011 10:27 pm
Reply with quote

Recover the DB2 catalog? Not recommended as it might be a bit disruptive to other users. icon_evil.gif

Check your source libraries for an old DCLGEN that corresponds with the table. That might be enough to get you started.

Otherwise, as others have pointed out, you are SOL.

IMO production DDL should be under the control of a source management system.
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Wed Oct 05, 2011 11:56 am
Reply with quote

@ sushanth bobby

Thanks for your idea.

But if everywhere it dropped .

(Just a knowledge purpose I want to learn)
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Wed Oct 05, 2011 11:59 am
Reply with quote

dbzTHEdinosauer

thanks dbzTHEdinosauer. I didn't think in this point of view.

I will look into this.

If I have any further doubts I will ask you.

Once again thanks for new idea.
[/b]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Inserting into table while open selec... DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top