 |
|
Oracle Tips by Burleson |
Oracle 10g Instantiating with RMAN
DBMS_OUTPUT.PUT_LINE('Until SCN: ' || until_scn);
END;
/
-
Archive the current redo log by using the
statement,
ALTER
SYSTEM ARCHIVE REDO LOG CURRENT;
-
Then, start rman and issue the duplicate
command. When you execute the duplicate command, rman performs
an incomplete recovery, using all available incremental backups
and archived logs. You also need to do a log switch on the
source site, so the log containing the instantiation SCN can be
archived. Once this log file is archived, make it available for
rman to use when performing the duplicate command.
Then, use the rman command as shown:
RUN {
SET UNTIL SCN xxxxxxx
DUPLICATE TARGET DATABASE TO DBSITE2.world
NOFILENAME CHECK OPEN RESTRICTED;}
You also need to use the OPEN RESTRICTED
clause. Before you run the RMAN DUPLICATE command, you must
configure your system to support the database duplication. When
you use the UNTIL SCN clause, RMAN recovers the database up to,
but not including the specified SCN value. So, specify a value
of until_scn + 1 for the 'xxxxxxx' shown in the example.
-
Connect to the destination database and
rename the global name. Once rman creates the destination
database, change the global name of this database to be
different from the name of the source database.
ALTER
DATABASE RENAME GLOBAL_NAME TO DBNEW.world;
-
Execute the remove_streams_configuration
procedure in the dbms_streams_adm package at the destination
site. This is needed because the duplicate database at the
destination site has the entire old streams configuration.
These details are dropped by executing the
statement:
EXEC
DBMS_STREAMS_ADM.REMOVE_STREAMS_CONFIGURATION();
The above statement has to be run in
restricted session.
-
Disable the restricted session.
ALTER
SYSTEM DISABLE RESTRICTED SESSION;
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

|