Home
Author Forum
Author Resources
Author FAQ
Author Tips
Publishers
Oracle Tips
Oracle News
Oracle Forum

 

   
  Oracle Tips by Burleson

Oracle 10g Synonyms and Views

Changes to synonyms often result in invalidation of PL/SQL program units, which causes time-consuming re-compilation of the program units.

Prior to Oracle Database 10g, when a synonym was re-created, the status of any dependent PL/SQL program unit was set to INVALID. If you did not recompile the PL/SQL program units manually, they would recompile automatically the next time they were invoked, causing runtime performance overhead.

Now, Oracle Database 10g introduces automatic validation of PL/SQL program units, which determines whether program units will have to be invalidated. This is only the case in the following circumstances.

  • The column order, column names, and column data types of the tables need to be identical.
     

  • The privileges on the newly referenced table and its columns are a superset of the set of privileges on the original table. These privileges must not be derived through roles alone.
     

  • The names and types of partitions and sub-partitions need to be identical.
     

  • The tables are of the same organization type.
     

  • Object type columns are of the exact same type.

In the case of views, just like PL/SQL program units, even when the synonym definition is changed, the dependent views will not be validated. However, this only happens when certain conditions are met. All the conditions specified for PL/SQL units are relevant here also.

In addition, the following conditions must be met to keep the VALID status of the dependent views when you redefine a synonym:

  • Columns and order of columns defined for primary key and unique indexes, NOT NULL constraints, and primary key and unique constraints must be identical.
     

  • The dependent view cannot have any referential constraints.

In the next section, we will examine the changes and improvements introduced for the LogMiner utility.


Get the complete Oracle10g story:

The above text is an excerpt from "Oracle Database 10g New Features: Oracle10g Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

http://rampant-books.com/book_2003_2_oracle10g.htm


Need an Oracle Mentor?

BEI is now offering personal mentors for Oracle DBAs where you can have an Oracle expert right at your fingertips, anytime day or night. We work with hundreds of Oracle databases every year, so we know exactly how to quickly assist you with any Oracle question.

Why risk an unplanned outage? You can now get telephone access to Don Burleson or any of his Oracle Certified DBAs with more than 20 years of full-time IT experience. Click here for details:

http://www.dba-oracle.com/service_oracle_backup.htm

BC Oracle consulting & Training Support logo

Rampant Oracle Books and downloads

Remote DBA Oracle logo 

 

Copyright 2006 by Burleson Consulting (BC)