0% found this document useful (0 votes)
32 views

Easy Clone Copy of Oracle Database

Uploaded by

osama17sadeq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Easy Clone Copy of Oracle Database

Uploaded by

osama17sadeq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Search BC Oracle Sites

Search Super fast Database Copying/Cloning


Home
E-mail Us Oracle Tips by Burleson
Oracle Articles
New Oracle Articles

Question: What are some fast ways to clone my Oracle database? Are there
tools for Oracle database cloning? Is it necessary to purchase software to clone
Oracle Training an Oracle database?
Oracle Tips
Oracle Forum Answer: You can easily do your own fast database cloning for free (see below)
Class Catalog but there are a plethora of software tools for super fast Oracle cloning. Oracle
Corporation offers several Oracle cloning solutions:

- Enterprise Manager 13c Cloud Control offers their "Snapclone" software


Remote DBA
as part of the extra-cost Oracle Cloud Management pack.
Oracle Tuning
Emergency 911 - Oracle also has CloneDB, a a new Direct NFS (DNFS) feature that was
RAC Support introduced in release 11.2.0.2.
Apps Support
Analysis - Oracle 12.1.0.2 and beyond also offers the ability to create a PDB as a
Design clone of a remote non-CDB database.
Implementation
There are also 3rd party Oracle cloning software tools:
Oracle Support

- Actifio: The LiveClone uses data virtualization to clone Oracle


databases.
SQL Tuning
Security
- Delphix: A VC startup ompany.
Oracle UNIX
- CommVault: The CommVault 11 software can do Oracle cloning with
"storage snapshots".
Oracle Linux
Monitoring
Remote support
- Tivoli: The Tivoli Storage FlashCopy Manager: This uses their
Remote plans snapshot function for Oracle database cloning.
Remote services
Application Server However, it is not necessary to purchase expensive software to clone your Oracle
Applications database. Let's look at a fast and free ways to clone your Oracle database.
Oracle Forms
Oracle Portal
App Upgrades
SQL Server
Oracle Concepts Fast cloning of your Oracle database
Software Support
Remote Support This database cloning procedure is especially useful for the DBA who wants to
Development
give his developers a full-sized TEST and DEV instance by cloning the PROD
Implementation
instance into the development server areas.

This Oracle clone procedure can be use to quickly migrate a system from one
UNIX server to another. It clones the Oracle database and this Oracle cloning
Consulting Staff procedures is often the fastest way to copy a Oracle database.
Consulting Prices
STEP 1: On the old system, go into SQL*Plus, sign on as SYSDBA and issue:
Help Wanted!
"alter database backup controlfile to trace". This will put the create database
syntax in the trace file directory. The trace keyword tells oracle to generate a
script containing a create controlfile command and store it in the trace directory
identified in the user_dump_dest parameter of the init.ora file. It will look
something like this:
Oracle Posters
STARTUP NOMOUNT
Oracle Books CREATE CONTROLFILE REUSE DATABASE "OLDLSQ" NORESETLOGS
NOARCHIVELOG
Oracle Scripts
MAXLOGFILES 16
Ion MAXLOGMEMBERS 2
MAXDATAFILES 240
Excel-DB MAXINSTANCES 1
MAXLOGHISTORY 113
LOGFILE
Don Burleson Blog GROUP 1 ('/u03/oradata/oldlsq/log1a.dbf',
'/u03/oradata/olslsq/log1b.dbf') SIZE 30M,
GROUP 2 ('/u04/oradata/oldlsq/log2a.dbf',
'/u04/oradata/oldlsq/log2b.dbf') SIZE 30M
DATAFILE
'/u01/oradata/oldlsq/system01.dbf',
'/u01/oradata/oldlsq/mydatabase.dbf'
;
# Recovery is required if any of the datafiles are restored
# backups, or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;

STEP 2: Shutdown the old database

STEP 3: Copy all data files into the new directories on the new server. You may
change the file names if you want, but you must edit the controlfile to reflect the
new data files names on the new server.
rcp /u01/oradata/oldlsq/* newhost:/u01/oradata/newlsq
rcp /u01/oradata/oldlsq/* newhost:/u01/oradata/newlsq
rcp /u03/oradata/oldlsq/* newhost:/u03/oradata/newlsq
rcp /u04/oradata/oldlsq/* newhost:/u04/oradata/newlsq

STEP 4: Copy and Edit the Control file – Using the output syntax from STEP 1,
modify the controlfile creation script by changing the following:

Old:
CREATE CONTROLFILE REUSE DATABASE "OLDLSQ" NORESETLOGS

New:
CREATE CONTROLFILE SET DATABASE "NEWLSQ" RESETLOGS
STEP 5: Remove the "recover database" and "alter database open" syntax
# Recovery is required if any of the datafiles are restored
# backups, or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;

STEP 6: Re-names of the data files names that have changed.

Save as db_create_controlfile.sql.

Old:
DATAFILE
'/u01/oradata/oldlsq/system01.dbf',
'/u01/oradata/oldlsq/mydatabase.dbf'

New:
DATAFILE
'/u01/oradata/newlsq/system01.dbf',
'/u01/oradata/newlsq/mydatabase.dbf'

STEP 7: Create the bdump, udump and cdump directories


cd $DBA/admin
mkdir newlsq
cd newlsq
mkdir bdump
mkdir udump
mkdir cdump
mkdir pfile

STEP 8: Copy-over the old init.ora file


rcp $DBA/admin/olslsq/pfile/*.ora
newhost:/u01/oracle/admin/newlsq/pfile

STEP 9: Start the new database


@db_create_controlfile.sql

STEP 10: Place the new database in archivelog mode

If you like Oracle tuning, see the book "Oracle Tuning:


The Definitive Reference", with 950 pages of tuning tips
and scripts.

You can buy it direct from the publisher for 30%-off and
get instant access to the code depot of Oracle tuning
scripts.
Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training
reference for use by our DBA performance tuning consulting professionals. Feel
free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support


expert should independently investigate their credentials and experience, and
not rely on advertisements and self-proclaimed expertise. All legitimate Oracle
experts publish their Oracle qualifications.

Errata? Oracle technology is changing and we strive to update our BC Oracle


support information. If you find an error or have a suggestion for improving our
content, we would appreciate your feedback. Just e-mail:

and include the URL for the page.


Burleson Consulting
The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services

Copyright © 1996 - 2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

You might also like