| |
 |
|
Oracle Tips by Burleson |
Oracle 10g Instantiating with RMAN
When you instantiate an entire database for
Oracle Streams, the RMAN utility can be used to copy the database
structures and metadata. In fact, the database cloning method is
employed when you use RMAN. The RMAN DUPLICATE command is used to
create a valid destination database.
Next, we will show the steps involved in this
process. They are:
-
Create a backup with RMAN. By using the
valid backup, you can set up a destination database without
interrupting the source database operations.
-
Create a database link on the source
database pointing to the destination. The propagation process
will use the database link.
-
Define propagation to the destination
queue, which will be created at the destination database, and
keep it disabled. This is done because the destination is not
yet ready.
You can use the add_global_propagation_rule
procedure of dbms_streams_adm to create the propagation.
-
Configure and start a capture process at
the source database. For this, you can use the add_global_rule
procedure of dbms_streams_adm. This will allow you to capture
all supported changes in the database. Thus, it would of course
not include the SYS and SYSTEM schemas.
-
Prepare the source database for
instantiation. First, prepare the database for instantiation by
executing the dbms_capture_adm.prepare_global_instantiation
procedure. The effect of this procedure execution is to put the
data dictionary information for all objects in the database into
the redo logs, enabling the information to be propagated to all
destination sites. This procedure also sets the instantiation
SCN at the source database, so it can be read by the export
utility.
EXEC
DBMS_CAPTURE_ADM.PREPARE_GLOBAL_INSTANTIATION();
-
Get the current SCN at the source database.
Next, use the dbms_flashback package to get the current SCN.
This value will be used during instantiation at the destination
site, as well as by rman when duplicating the database.
SET
SERVEROUTPUT ON
DECLARE
until_scn NUMBER;
BEGIN
until_scn:=
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER;
Get the complete Oracle10g story:
To get the code instantly, click here:
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

|