View previous topic :: View next topic
|
Author |
Message |
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Dear DBA ON zO/S,
what will you give me for an answer? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
no, there isn't. And even with most of the tools (I know). you're still f*cked. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
Cool .
learning is good thing
But sharing the knowledge is the best thing.
I will give you treat when we meet. |
|
Back to top |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
db2sysdba.zos wrote: |
If you know the answer Kindly let me know. |
Already did |
|
Back to top |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
ok.
I think dbzTHEdinosauer knew the answer. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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
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 |
|
Back to top |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
GuyC has already answered your question twice. |
|
Back to top |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
that's what I am asking is there any optimised way to find out without restoring the whole dump? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
We do have some grumpy old men around here - i too am one
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Recover the DB2 catalog? Not recommended as it might be a bit disruptive to other users.
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 |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
@ sushanth bobby
Thanks for your idea.
But if everywhere it dropped .
(Just a knowledge purpose I want to learn) |
|
Back to top |
|
|
db2sysdba.zos
New User
Joined: 04 Oct 2011 Posts: 25 Location: INDIA
|
|
|
|
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 |
|
|
|