Skip to Main Content
  • Questions
  • Things to check on your first day as a DBA

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Joaquin.

Asked: December 14, 2005 - 4:39 pm UTC

Last updated: January 12, 2006 - 10:51 am UTC

Version: 9.2.0.1

Viewed 1000+ times

You Asked

Hi Tom, long time without posting a question here. I must confess I have been away of the oracle world for the past 9 months (been working as a SQL Server DBA) but I regret that. Thanks God (and friends!) I've got a new job and guess what.. it's on Oracle!

My question for you is as follow: This is going to be my very first job as an Oracle DBA (only DBA tasks, I was before an oracle-propietary software consultant, on which I had to do either things, development and maintenance). And this time its for real, since this is a very big organization i'm gonna work for (a bank). And so I was wondering, what would be the first things, you, as the Oracle DBA of the organization, would do on your first day ? Like, what things you would check and what things you would do on your very first day/week, etc. If you have time, try to write a short list of the things you would check. I will use this as an advice and I will be greatly appreciate for it!

Thank you very much!

and Tom said...



Since the only thing you are not allowed to get wrong as a DBA is recovery - I would want to be taught everything about the current recovery process; how to do it, where everything is, how many copies of backups they have, what machines they test this on regularly.


Learn their data recovery policies and make sure they make sense to you.



Rating

  (16 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Alexander the ok, December 15, 2005 - 9:48 am UTC

I might check out this book for "how to be a dba" type stuff and what the life of a dba is like:

</code> http://www.amazon.com/gp/product/1590594517/qid=1134657097/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/102-9215732-4456915?n=507846&s=books&v=glance <code>

I have it and I really like it so far.

Tom Kyte
December 15, 2005 - 11:10 am UTC

well, it is paired with a really good book :)

Can't beat that horse enough!

Robert, December 15, 2005 - 10:35 am UTC

Tom,

Great advice!!!

Thanks for beating that 'dead horse' some more!

Have you heard anything about the abovementioned book?

Thanks,

Robert.

Tom Kyte
December 15, 2005 - 10:58 am UTC

I have not personally read it, but I have heard only good things about it.

9i Administration Book

reader, December 15, 2005 - 12:01 pm UTC

I have Sam R. Alapati's 9i Administration Book and it is
one of my favorites.



Bookpool.com...

Kashif, December 15, 2005 - 1:59 pm UTC

Hey Tom -

I got an email from Bookpool.com a couple of days ago, and apparently your book was the best-selling book over there that day! It's #2 today. Anyway, so far it has been a great read, I'm glad I bought it. My favorite chapter so far has been the one on locking and latches. The chapter on datatypes was very informative too though. Which reminds me of a quick question I had if you don't mind, should hashes such as the MD5 hash be stored in a RAW column too? I think that's what you were implying in one of the paragraphs about storing binary data. I've always stored them in VARCHAR2 fields, but then I haven't had to deal with multibyte character sets either...

</code> http://www.bookpool.com/.x/SSSSSS_C561S671089D0512131417/bs <code>

Kashif


Tom Kyte
December 15, 2005 - 2:47 pm UTC

the hashes should be raw (as should be encrypted data)

Interesting...

Kashif, December 15, 2005 - 4:38 pm UTC

I just checked the DBA_USERS table and I noticed that Oracle stores the hashed userid password in a VARCHAR2(30) column. I wonder why... Anyway, thanks Tom.

Kashif


Tom Kyte
December 15, 2005 - 5:10 pm UTC

did you notice it is in HEX though?

Sam R. Alapati's 9i Administration Book

mdinh, December 15, 2005 - 7:58 pm UTC

The book is pretty weak containing lots of generalization.

I will sell you my copy if you'd like.

Abour Recovery Book

Girish, December 15, 2005 - 11:48 pm UTC

Hi Tom,

You stress so much on recovery and why dont you write a book on Backup and Recovery like expert one to one
I am sure it will be a big hit like your earlier books

Regds
Girish

Tom Kyte
December 16, 2005 - 8:17 am UTC

for me, it is a short book, here goes:


chapter 1:
practice recovery.

end of book


There are many books on the features available to you, the ones I use are free on otn.

Other things for First day of a DBA

MEHMOOD, December 15, 2005 - 11:49 pm UTC

Tom has given a nice answer as usual :).

I would add more things, like never underestimate their currect strategies for the Oracle Database Administration. Suppose if they are not using the RMAN, there might be some good reason for that, same for not using the Partitioning, RAC etc. And as new DBAs get older in the company, then they come to know, why this all is happening.

Don't only find out

Des Browning, December 16, 2005 - 9:59 am UTC

But practise various recovery scenarios, so you have an idea what to do in each case - often the pressure is on and you don't always have the time to think things through as thoroughly as you would like. I found the following web document very useful when I first started, though I offer no guarantees for it:-

</code> http://www.uaex.edu/srea/bkupreco.htm <code>

In recovery situations you need to do 1 thing first - back up the damaged database before you start recovery so that you can at least get back to the start point if your recovery goes wrong. Then you need to establish what state the database is in, and decide what point you want to get back to.

Backup and recovery

A reader, December 16, 2005 - 12:50 pm UTC

Tom,
You always say that practice backup and recovery. The problem is that practice will teach me how to recover but not necessarily the fundamental behind what I am doing. I can follow a set of steps to recover. I might be able to recover perfectly but still may not know why I did what I did.

You know so much about the concepts behind backup and recovery. If you write a book (maybe a small handbook) which details various failure scenarios, what needs to be done to recover in those scenarios and most importantly, the reasoning behind those recovery steps, it will be great.

Maybe if all your followers request, you might consider doing it?

Thanks


Tom Kyte
December 16, 2005 - 1:12 pm UTC

... I might be able to recover
perfectly but still may not know why I did what I did. ...


then how the heck did you know to do it?





To 'A Reader'

Doug Burns, December 16, 2005 - 4:27 pm UTC

"The problem is that practice will teach me how to recover but not necessarily the fundamental behind what I am doing. I can follow a set of steps to recover. I might be able to recover perfectly but still may not know why I did what I did."

In my experience, what will happen is that as you practice, you'll get it wrong. By getting it wrong, you learn. I've found that the reason people understand so little about recovery is that you don't get to *do it* often enough in many companies. That's why a backup and recovery course is a rewarding experience - you get to play around, make mistakes and learn. The same applies to regular recovery tests.

Even if someone filled your head with every single concept behind backup and recovery, you wouldn't truly understand it until you've done it yourself.

Just my 2 cents, pence or whatever your currency of choice.

Tom Kyte
December 16, 2005 - 4:40 pm UTC

well said

I remember trying this stuff out for the first time way long ago. restore entire backup - cannot recover forward to current point in time. do it over and over and over. Then I "got it", I restored the control file - database thought it was caught up, ahh, now I understand....

Recovery

Jeff, December 16, 2005 - 7:32 pm UTC

I find that I am doing recoveries all the time. When managing large enviroments, with multiple projects, you get all the practice you can handle. There are howerver, still times when things go wrong. I find that because I do it all the time, getting around difficulties becomes easier.

It is a great feeling KNOWING that you can survive any failure.


A reader, December 17, 2005 - 12:49 am UTC

...and I believe that all of you who practiced recovery did so without reading any concepts manual or without referring to any documentation at all? I am amazed that everyone is up in arms against me. If concepts are so unimportant, why have we seen Tom advise numerous times to to readers to go through the concepts manual? Tom, you have a lucid style of explaining things with examples and experience that make understanding so easy. Oracle documentation is about as much fun as reading 1040 instructions (yeah it is tax time). If backup and recovery are practiced with concepts explained by Tom Kyte, it would make better DBAs. However, if you don't want to write in this area, that is fine. It was just a suggstion, no offense.

Tom Kyte
December 17, 2005 - 11:14 am UTC

You know where I learned from? Your 1040 form. I find the concepts, backup and recovery manuals to be quite lucid and readable.


My last comment on the subject

Doug Burns, December 18, 2005 - 5:35 am UTC

To a Reader ....

I wasn't going to bother following up, but ....

"...and I believe that all of you who practiced recovery did so without reading any concepts manual or without referring to any documentation at all?"

I read the documentation and practiced. There were no other concepts guides about backup and recovery at the time as far as I know. I learnt the most important and persistent lessons when I made mistakes.

"I am amazed that everyone is up in arms against me."

Well as there are only a couple of comments after your comment and one of them is mine I'll assume I'm part of 'everyone'. I don't see how you can describe the comments as being up in arms against you. Actually, I was trying to be helpful by saying that practice was an essential part of learning about backup and recovery and that I've found a lot of people find a good course helpful in this area.

"If concepts are so unimportant, why have we seen Tom advise numerous times to to readers to go through the
concepts manual?"

They are essential. That's why there's a manual explaining them

</code> http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm <code>

Whether the manual or a commercial book is the easiest way to learn is down to the individual but my own opinion is that both approaches require some practice to work best. I've seen people do recovery exercises on courses who have read books a little, been DBAs for a year or two and watched as the concepts finally made some sense to them.

"Tom, you have a lucid style of explaining things with examples and experience that make understanding so easy. Oracle documentation is about as much fun as reading 1040 instructions (yeah it is tax time). If backup and
recovery are practiced with concepts explained by Tom Kyte, it would make better DBAs."

There was no problem with asking if Tom would be writing a book on the subject and I'm sure it would be excellent if he was interested in it. I was just trying to help you by suggesting that the best book in the world wouldn't take away the need to practice a lot. Fair enough, you don't like the suggestion which is your choice. Sorry if that offended you in some way!

To Jeff

"When managing large enviroments,
with multiple projects, you get all the practice you can handle."

It definitely depends on the kind of site you work at. In some roles, particularly more development-orientated or with *tons* of databases, you never seem to *stop* doing recovery ;-) But some production DBAs managing a couple of dozen databases often don't get enough recovery opportunities if their managers don't feel that practice is important enough.

To: A Reader

Robert, December 19, 2005 - 10:24 am UTC

Here is course of action which I believe has helped me.

1. Read the Backup and Recovery manual(s).
2. Set up a small 'test' database.
3. Take a cold backup of it and store this backup somewhere 'safe'. (include the controlfile).
4. Now make a list of every type of backup/recovery scenario you can think of (e.g.: lost datafile, lost controlfile, missing archivelog, full recovery, partial recovery to a point in time, recovery using backup controlfile to a previous incarnation, etc.... whatever you can think of).
5. Now take hot backup(s) of database ...And try to recovery in each scenario you listed. Add or modify scenarios as you get feedback from your experience... Make them as complicated as you like.
6. WHEN YOU GET STUCK... Try to find answers to your problem in the manuals, on AskTom, on Metalink, etc.
7. Whenever you get things messed up beyond fixing... then restore from the cold backup and start over again.

Do this for both RMAN and manual backup/recovery.
Keep doing this until you feel comfortable with each scenario.

This approach has helped me to feel more confident in my backup/recovery skills.

Regards,

Robert.



hot backup recovery

deviprasad, January 11, 2006 - 5:39 pm UTC

We would like to know how to take oracle hot backup and recovery in windows machine briefly step by step

Tom Kyte
January 12, 2006 - 10:51 am UTC

fortunately, we document that stuff. See the RMAN guide for your release (which you did not mention)

step by step

1) connect to database using rman
2) issue "backup database;"

of course, there are lots of options you might be using - configuring channels and such - but you'll want to get up to speed on what rman is/does first.