I'm trying to calculate the elapsed time of Oracle Database startup command. The view V$INSTANCE contains the STARTUP_TIME column which tells at what time the database is started. But, i need way to find the time elapsed from the time we enter startup till the database is opened.

Since, we can't query SYSDATE or SYSTIMESTAMP when the database is not open, im finding it difficult to come up with a logic.

Is there any other way we can get the elapsed time for startup operation?

[oracle@o71 ~]$ time sqlplus -s / as sysdba<<EOF
> startup
> exit
ORACLE instance started.

Total System Global Area  536867640 bytes
Fixed Size                  8659768 bytes
Variable Size             322961408 bytes
Database Buffers          197132288 bytes
Redo Buffers                8114176 bytes
Database mounted.
Database opened.

real    0m14.578s
user    0m0.014s
sys     0m0.016s
[oracle@o71 ~]$
  • Thank you very much for the quick response. This helped me. – learningloop Dec 19 '18 at 11:46
  • In addition to response of @Balazs Papp, you can just look at the alert log. find the timestamp associated with the message "Starting ORACLE instance", then find the timestamp associated with the message "Completed: alter database open" – EdStevens Dec 20 '18 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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