![]() If you (or the Database Configuration Assistant) created a server parameter file, but you want to override it with a text initialization parameter file, you can specify the PFILE clause of the STARTUP command to identify the initialization parameter file. There is no instance-specific location for storing a server parameter file.įor more information about the server parameter file for a Real Application Clusters environment, see Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide. ![]() Just to be sure that I am correct in my understanding, what you wrote gave us downtime and my query gives the uptime.The spfile.ora file is included in this search path because in a Real Application Clusters environment one server parameter file is used to store the initialization parameter settings for all instances. Using your SQL statement, i created another query. How can I do that with the trigger "TRG_BD_T1"? ORA-02291: integrity constraint (BNFINVERSION.FK01_T1) violated - parent key not foundīut if i do the same with a pl/sql block it works: It seems that trigger error handing not works UPDATE T2 SET b = :OLD.b-1 WHERE a = :OLD.a UPDATE T2 SET b = :NEW.b WHERE a = :NEW.a SQL> select last_time, start_time, start_time-last_time daysĬONSTRAINT fk01_t1 FOREIGN KEY (a,b) REFERENCES T1(a,b) ) Why don't I see the time component in my result? Thanks. I never thought of using external table concept to read alert log file. (don't look for shutdown - look for the prior two dates and use them.) is the start up time, the last date record before that is the last *observed* timestampĪnalytics Rock, they roll, they are the coolest things ever. ![]() The last date before the Starting ORACLE. Short of using OEM or any other monitoring tool, this approach will work (i did not debug the code or anything like that.Īlthough, this might be select last_time, start_time, start_time-last_time daysģ select to_date(last_time, 'Dy Mon DD HH24:MI:SS YYYY') last_time,Ĥ to_date(start_time,'Dy Mon DD HH24:MI:SS YYYY') start_timeħ lag(text_line,1) over (order by r) start_time,Ĩ lag(text_line,2) over (order by r) last_timeġ2 where text_line like '_ _ _ _:_:_ 20_'ġ3 or text_line like 'Starting ORACLE instance %'ġ6 where text_line like 'Starting ORACLE instance %' The only other way I know how to do this would be to use a startup/shutdown trigger, but I would prefer not to go that route. If in_line.text_line like '%Starting ORACLE%' or in_line.text_line like'%Shutting down instance (%' then Insert into drop_me (action, date_string) Time_line drop_ext.text_line%TYPE := NULL ĬURSOR line_cur is SELECT text_line from drop_ext Įxecute immediate ('truncate table drop_me') Create a procedure, that will read the log and try to find a reference to Shutdown Instance or Startup Instance and the grab the line that has the time.Īction_line drop_ext.text_line%TYPE := NULL Create an external_table poitining to the copy of the alert log file for the past month.Ģ. Basically, this is my aproach using alert log.ġ. I just want you to comment on my aproach, and maybe you'll have a better idea on how to automate this. ![]() I'm required to produce a monthly report with shutdown/startup activity for a database
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |