Oracle Database – Calculating Elapsed Time of Startup Operation

oraclestartuptime

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?

Best Answer

[oracle@o71 ~]$ time sqlplus -s / as sysdba<<EOF
> startup
> exit
> EOF
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 ~]$