title: Oracle: Monitoring changes in v_$parameter
body: <p>Long time user, first time "asker".</p>
  
  <p>I am attempt to construct an Oracle procedure and/or trigger that will compare two tables with the MINUS operation and then insert any resulting rows into another table. I understand how to do the query in standard SQL, but I am having trouble coming up with an efficient way to do this using PL/SQL. </p>
  
  <p>Admittedly, I am very new to Oracle and pretty green with SQL in general. This may be a silly way to go about accomplishing my goal, so allow me to explain what I am attempting to do.</p>
  
  <p>I need to create some sort of alert that will be triggered when the <strong>V_$PARAMETER</strong> view is changed. Apparently triggers can not respond to changes to view but, instead, can only replace actions on views...which I do not wish to do. So, what I did was create a table that to mirror that view to essentially save it as a "snapshot".</p>
  
  <pre><code>create table mirror_v_$parameter as select * from v_$parameter;
  </code></pre>
  
  <p>Then, I attempted to make a procedure that would minus these two so that, whenever a change is made to <strong>v_$parameter</strong>, it will return the difference between the snapshot, <strong>mirror_v_$parameter</strong>. I trying to create a cursor with the command:</p>
  
  <pre><code>select * from v_$parameter minus select * from mirror_v_$parameter;
  </code></pre>
  
  <p>to be used inside a procedure, so that it could be used to fetch any returned rows and insert them into another table called <strong>alerts_v_$parameter</strong>. The intent being that, when something is added to the "alert" table, a trigger can be used to somehow (haven't gotten this far yet) notify my team that there has been a change to the <strong>v_$parameter</strong> table, and that they can refer to <strong>alerts_v_$parameter</strong> to see what has been change. I would use some kind of script to run this procedure at a regular interval. And maybe, some day down the line when I understand all this better, manipulate what goes into the <strong>alerts_v_$parameter</strong> table so that it provides better information such as specifically what column was changed, what was its previous value, etc.</p>
  
  <p>Any advice or pointers?</p>
  
  <p>Thank you for taking the time to read this. Any thoughts will be very appreciated. </p>