Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm on a Windows machine with Oracle Client 11.1.0, and am going to import a database dump. I'm importing from the command line with the "imp" command.

Is there an option to time how long the import takes? I've searched around but haven't found anything for that yet.

Thanks in advance!

share|improve this question
6  
Are you asking "Is there a way to determine before I start the import approximately how long it will take?" Or are you asking "Is there a way to time how long it actually took to run the import?" Or are you asking something else? –  Justin Cave Sep 10 '12 at 18:52
add comment

2 Answers

If you just want to time how long it takes, you could call it via a batch file like this:


echo %DATE% %TIME% >> time.log
imp parfile=./file.par etc etc
echo %DATE% %TIME% >> time.log

Once everything has run through, have a look at the time.log file and work out the difference between the 2 values.

share|improve this answer
add comment

Short answer: NO.

The import does several things. One is creating tables and inserting data in it. Next come the indexes, constraints, triggers and other objects. There is no such thing as a prediction as how long it would take. For the reading of data, if the indexes, triggers and constraints don't play a role, you can assume this is a linear process, where normally 1GB takes 10 times the time of reading 100MB. For the other stuff this does not work but for the creation of a specific index - for example - you could check v$session_longops to find the time_remaining for that index creation. You still don't know what is next. To find what is next, you could create an sql file that contains the ddl that is to be executed. This could help in giving an idea what is still left to do.

Don't forget to specify a large buffer for imp.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.