Question: How do I do an Oracle upgrade with a low
downtime? I have a high availability non RAC database and I need
to upgrade with very low downtime.
Answer: Oracle
has several low-downtime approaches to upgrades, the zero-downtime
approach enables in RAC. You can now upgrade or ASM RAC instances
without shutting down the nodes using the new “
alter system start
rolling migration” syntax:
alter system start
rolling migration to 11.2.0.0.0;
You can also use this minimum downtime trick as shown below.
Minimum-downtime rolling
upgrade
Also see
Minimizing
downtime for Oracle release upgrades and
rolling
upgrades.
If you are staying on the same server, you can
upgrade from 9i with about 5 minutes of downtime. To do
this, you will be using transportable tablespaces. The only
requirement is that all your tablespaces are locally managed. The
idea is simple.
1) Install Oracle to a separate Oracle
Home on the same server
2) Create a database with only the base tablespaces: SYSTEM,
SYSAUX, UNDO, and TEMP
3) On the 9i database, put all your tablespaces into read only
mode (write downtime begins)
4) Perform a transportable tablespace export of all non-system
tablespaces (as a sysdba user)
5) Shut down the 9i database (true downtime begins)
6) Start up the new database
7) Perform a transportable tablespace import into the new
database (end true downtime)
8) Make all your tablespaces read/write (end write downtime)
This works from 9i to 10g because the newer datafiles
are version aware. When you do the transportable tablespace export
from 9i, all you are doing is dumping the datafile metadata to a
dump file. When you import it to the new database, all you are doing is plugging
in where to find the datafiles. The new version looks at the datafile
headers, realizes that they're 9i, and changes the header to match
the version.
Since the new database already has SYSTEM, SYSAUX, UNDO, and TEMP,
there's no downtime doing pesky data dictionary upgrades.
If you pre-script it all out, you can do all this with only about 5
minutes of downtime!
By the way, Dataguard's physical backups are a GREAT DR situation
for a failed upgrade. You will have an exact physical copy of your
database ready to switchover to if anything goes wrong with the
upgrade. Basically you switch your final archive log and shut down
your primary, then begin the standard upgrade. If something goes
wrong, you can perform a failover on your standby server and you're
back up with no possibility of inconsistencies since it's a physical
backup. In my opinion, the only method better than DataGuard for a
backup for upgrade scenario would be to use SAN tools like NetApp's
snapMirror or Sun's Availability Suite in order to back it up; these
tools can snapshot a DB in a matter of seconds and are good for this
sort of situation: if the upgrade goes wrong, simply restore the
snapshot.
If you do it right, you can set up dataguard with only 5 minutes of
downtime, then perform your database upgrade with only 5 minutes of
downtime. I have done this method for clients in the past and they
have been very happy with the results.
|

|