dbi services: Database Infrastructure Services - Engineering, Implementation, Operation, Modernization

Blog - comments
Julien said,
  Unluckily there is a bug on this feature which causes the reversed eff  
youtube html5 player said,
  Wow, very comprehensive review. I'm thinking about learning HTML5. I'm  
youtube html5 player said,
  I have no words for this great post such a awe-some information i got  
SEO Services said,
  Thanks for the nice blog. It was very useful for me. Keep sharing such  
Jhon said,
  Me personally and my friends genuinely favored the post and i believe  
Blog Jérôme Witt Oracle 11g R2: catupgrd.sql running for hours

dbi services Blog

Welcome to the dbi services Blog! This blog focuses on database infrastructure and middleware topics. It covers technologies such as Oracle, Microsoft SQL Server, MySQL, Sybase, Linux, or Documentum (etc.). The dbi services blog represents the view of our consultants, not necessarily that of dbi services. Feel free to comment on the postings!

Jérôme Witt

Oracle 11g R2: catupgrd.sql running for hours

During the last weeks, I experienced an uncommon bug during upgrade of security sensible databases: The upgrade process was sticking for hours on the script c1101000.sql which tried to fill the column DBID with the database DBID of the tables AUD$ and/or FGA_LOG$ (auditing and fine grained auditing tables).

As expected this bug was already published on My Oracle Support Note 11.2.0.1 Catupgrd.sql Hangs While Running Procedure POPULATE_DBID_AUDIT [ID 1062993.1]. In simple words, when you have many rows in these audit tables, the catupgrd.sql may be stuck until all rows are processed.

The announced workaround:

  • exporting the AUD$ and/or FGA_LOG$ tables
  • cleaning up these two tables
  • finally launching catupgrd.sql
  • importing the data

But this solution can be bypassed by a much more "customer friendly" way as it does not require any delete/truncate operation on the audit logs!

My solution was to fill the column AUD$.DBID shortly before the catalog upgrade catupgrd.sql script. You have to use the following query:

 

DECLARE  

   cur_dbid NUMBER;

BEGIN  

   SELECT dbid INTO cur_dbid FROM v$database;

   UPDATE sys.aud$ SET dbid=cur_dbid WHERE dbid is NULL;  

   COMMIT;

END;

/

 

This short PL/SQL code was running about 10min (depending on the number of rows). Afterwards, the catupgrd.sql was running in an acceptable timeframe and the rows appended to the audit tables in the meantime were updated without any pain during the catalogue upgrade.

I hope this information will help some of you in the upgrade of your Oracle databases to Oracle 11gR2!

Jérôme

About the author

Jérôme Witt
Jérôme Witt
Jérôme Witt is Consultant at dbi services.

Following his computer science and networks studies, Jérôme Witt started his professional career as an automation specialist for an electrical automation company.

From 2007 to 2008, he completed an Oracle trainee program covering the Oracle technology stack.

Jérôme Witt is specialized in high availability solutions like clustering (AIX HACMP), Oracle Data Guard, Oracle Clusterware, and Virtualization. He is also an experienced Database Administrator and took over operative DBA tasks in several multinational companies covering different industries, such as Banking, Chemicals & Pharmaceuticals, Food, Public Services, Health Care, etc.

Comments

No comments yet. Be the first to submit a comment.
Leave your comment
Guest