Is there an "easy" way or "rule-of-thumb" for backing out DB patches provided by Oracle? What precautions should I take BEFORE applying patches? I'm looking for an alternative to re-installing the software. Thanks.
This is the answer Oracle gives from Note: 62418.1 on Metalink: "Database patches may or may not be reversible, and may or may not need to be reversed as part of backing out a patch. Database patches are first file system patches and the script to accomplish the database upgrade is stored in the file system. PL/SQL updates can potentially be reversed by running the backed-up script to reverse the PL/SQL object. Seed data updates are not as easily reversed, but in general would not require reversal.
If severe problems are found after a patch has been applied then the only supportable position may be to restore from backup. This should be done only after the situation has been reviewed with Oracle's Support Services organization. "
So, the bottom-line is that you will most often need to restore from a good backup. This addresses your question about precautions to take before applying patches. Always make a backup before you start. That means backing up not just your database, but the file system as well. If you can do it, simply shut down your Oracle database and then take a full OS system backup. Then apply the patch. If you find that you need to recover, you have the backup of just before the patch that you can restore to.
For More Information
- Dozens more answers to tough Oracle questions from Karen Morton are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.