Monday, March 2, 2009

ORACLE guys just love to torture us

The Boss sent me 6 ORACLE dump files. He asked me to import them into the database at our office. I know nothing about importing dump files. I never worked with them.


So I opened the import utility. Entered my Username and password. I expected something like this. Give me the file you need to import and ORACLE will import it.


This is what I get

Import file: EXPDAT.DMP >

So I typed in the first file. (It seems that the text after the colon : is the default value.) Then pressed enter. I got this

Enter insert buffer size (minimum is 4096): 10240 >


What the!? I didn't know what buffer to put, so I just pressed enter, then I got.

List contents of import file only (Y/N): N >

Well.. enter

Ignore create errors due to object existence (Y/N): N >

Ok ignore, please import.. I beg you. Enter.

Import grants (Y/N): Y >

For God sake, Enter.

Import table data (Y/N): Y >

For the love of God. Enter

Import entire export file (Y/N): Y >

What kind of question is that? of course I need the entire file I definitely don't want the half of it . Enter.

Username:

I just specified my Username up there, but OK I will type it again, Enter!

Enter table names. Null list means all tables for user Enter table name or . if done:

Well here is the thing I don't know what's inside that file how can I enter the table names
? Enter!

Yes! I am done! thanks God.


Why don't they make these questions as parameters and save us time.
Just because ORACLE is for DBAs doesn't mean that they have to slam us every possible option and make it that complicated.

People will say yes there are a lot of options in ORACLE its not that easy. But that also doesn't mean that they have to give us every single option. We will search for it when we need it. Hollywood remember? Don't call us, we'll call you? (That's also a very great OO strategy I'll post something about it later)


Edit:
For those guys who end up in this page from google looking for the import command here is a much simpler why to do it with one line.

imp system/pass@servicenet file=C:\dumps\thedump.dmp fromuser=owner touser=owner

But, (there is always a but) you have to drop all your tables that have the same name first (thanks Yaseen), I don't know if there is an option to do that. But what I know is this. A job which need 5 minutes, I took an hour to do it.


Perhaps you will notice that ORACLE is developed by left brained programmers as I mentioned here.

4 comments:

  1. You don't really have to drop all of the schema when using that one line command, unless there's a table in the schema that has a similar name to a table inside the dump.

    You could specify which tables you want to import with the one line commands using:
    tables=USER.TABLENAME, USER.TABLENAME2, etc..

    ReplyDelete
  2. Ops You are right,
    by Schema i was trying to say if you importing tables already exists you will get an error.

    Thanks Yaseen for the command
    It will prove to be of use.

    ReplyDelete
  3. What a lousy boss! either give you the syntax to load the dump & save your time, or he can do it himself!

    ReplyDelete
  4. lol
    I'll make sure to tell him that.

    Thanks for your comment Boss.

    ReplyDelete

Share your thoughts

Note: Only a member of this blog may post a comment.