Oracle has so many functions like sysdate. Finally, start the database using the pfile you just edited: SQL startup pfile'C:\ora\pfile\init. Now edit the pfile in notepad to make the changes need to allow Oracle to start. SQL> create pfile'C:\ora\pfile\init.ora' File Created. So the question is you require to calculate the uptime. Tip - Making a PFILE when Oracle will not start. SELECT database_name as “DB_Name”, to_char(logon_time,’DD/MM/YYYY HH24:MI:SS’) FROM v$session WHERE sid=1 Select database_name as “DB_Name”,TO_CHAR(logon_time,’DD-MMM-YYYY HH24:MI:SS’) from V$Session where program like ‘ %PMON%’ SELECT INSTANCE_NAME as “Name_of_Instance”,TO_CHAR(STARTUP_TIME, ‘HH24:MI DD-MMM-YY’) as “Database_Startup_History” FROM DBA_HIST_DATABASE_INSTANCE ORDER BY STARTUP_TIME DESC You can check the startup history as well using following query, Select instance_name as “Database_name”,to_char(startup_time,’dd-mm-yyyy hh24:mi:ss’) as “The_Startup_Time” from v$instance We need to utilize the v$instance system view to get the historical information about the database in detail.You will get the startup information from following query , Question is- Is there any database views which will give you the information about the database history? We require to create a report which will give us the information about system uptime and start-time.We require to fetch the database history information and create a report. I'm using Oracle 10.2.0.3 on WinXP SP2 with standard AWR parameters. The database wasn't restarted : same startuptime. ![]() Real life industry scenario for How to check database uptime? Here stats for this SQLID were reset after snap 432 and the Total column restart counting. In this article i would like to give you the basic idea about – How to check database uptime? I would like to give multiple important queries for getting answer of the important interview question – How to check database uptime? Initially the oracle system tables and views will help us finding the correct up-time for the oracle database. In my previous articles i have given many answers about how to related to oracle and sql server as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |