This query is useful for knowing how long your database has been up and when it was started. It has been tested on versions 8 and up.
select to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') from V$instance;If you are running more than one instance -- i.e., you're using the parallel server option -- then:
select to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') from V$instance where instance_name='&name';
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free Oracle tips and scripts.
- Tip contest: Have an Oracle tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our applications, SQL, database administration, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical Oracle questions--or help out your peers by answering them--in our active forums.
- Best Web Links: Oracle tips, tutorials, and scripts from around the Web.