Re: Is it true that view_recompile_jan2008cpu.sql can be run only once during a database's lifetime

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: jack@xxxxxxxxxxxx
  • Date: Tue, 18 May 2010 07:27:54 +0100

I haven't looked , but if the entry in registry$history is committed before
successful recompilation I'd have said that was if not a,bug at least a cop
out from the problem of detecting successful recompilation. That entry ought
not to go there unless the patch succeeds, especially if it's presence is
used as a run/don't run check.

Niall Litchfield

On May 18, 2010 3:37 AM, "Jack van Zanen" <jack@xxxxxxxxxxxx> wrote:

This is a section from the script, and it will simply not compile the views
after it checks if it was run or not. I would say there would be no harm in
running it twice but why would you?
However it will add another entry to the registry$history table which is
nothing but pollution. Maybe this is where the statement is comming from.

When in doubt:
It is better to run a very quick select aginst the registry$history table
(select statement  is in the patch install guide so you can just cut and
paste it)


Rem =======================================================================
Rem To check if script is already applied
Rem =======================================================================
DECLARE
PATCH_ENTRY NUMBER;
BEGIN
SELECT DISTINCT COUNT(ID) INTO PATCH_ENTRY FROM registry$history where ID =
'&&PATCH_NUMBER';
if PATCH_ENTRY > 0
then
dbms_output.put_line ('viewrecomp.sql script is already applied');
RETURN;
end if;





Jack van Zanen

-------------------------
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient. If you are not the intended recipient,
please be aware that any disclosure, copying, distribution or use of this
e-mail or any attachment is prohibited. If you have received this e-mail in
error, please contact the sender and delete all copies.
Thank you for your cooperation


On 14 May 2010 00:40, Mahadevan, Sundar <Sundar.Mahadevan@xxxxxxx> wrote: >
> Hi All, > > One of my ...

Other related posts: