Q
Manage Learn to apply best practices and optimize your operations.

How to avoid invalid objects in Oracle and modify during off hours

Oracle expert Brian Peasland explains how to avoid invalid objects in Oracle and if it is possible to modify objects such as packages and views during working hours.

I work for a company that requires 24/7 access to the database, but when scheduled application code is modified, objects are invalidated such as packages, package body and views. We are forced to apply these types of modification (application) packages during off hours, when the online community is at a minimum.

The question is, how can we implement application code changes during normal working hours and avoid the outage caused by objects becoming invalidated?

In most cases, you cannot perform these tasks during normal working hours without invaliding objects. Think about it this way, you modify stored procedure PROC1, which is called by database trigger TRIG1. How is TRIG1 to know that the changes you made to PROC1 are syntactically correct? TRIG1 does not know this so the object becomes INVALID. The next time a user calls TRIG1, Oracle will recompile it to ensure PROC1 has not broken TRIG1. If everything is still good, Oracle executes TRIG1 for the user. If the changes to PROC1 broke TRIG1, then the user will receive an error. But Oracle will not know for sure until it recompiles the INVALID object.

Depending on what changes you are attempting, the DBMS_REDEFINITION package can help you perform these changes with minimal downtime. But you may still run into situations where there is an impact on end users or online visitors.

This was last published in August 2009

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

SearchContentManagement

SearchHRSoftware

Close