Cloning an Oracle/DB2/Sybase Database in a SAN Environment Using EVA Snapclone Technology (August 2007)

8
$ setenv ORACLE_BASE /prod/oracle9/clonebase
$ setenv ORACLE_HOME /prod/oracle9/OraHome1
The environment variables set using these commands reflect the clone’s instance and
the storage configuration.
2. Enter the following commands to create directories in the $ORACLE_BASE path:
a. $ mkdir $ORACLE_BASE/TEST/admin
b. $ mkdir $ORACLE_BASE/TEST/dbs
c. $ mkdir $ORACLE_BASE/TEST/oradata
d. $ mkdir $ORACLE_BASE/TEST/admin/bdump
e. $ mkdir $ORACLE_BASE/TEST/admin/cdump
f. $ mkdir $ORACLE_BASE/TEST/admin/pfile
g. $ mkdir $ORACLE_BASE/TEST/admin/udump
These directories store the clone’s system files, initialization files, alert log files, trace
files, control files, and so on.
3. Create an initialization file for the clone TEST by copying the existing file from DB1,
and modify the file with the following parameters to fit the clone environment:
db_domain, db_name, background_dump_dest, core_dump_dest, user_dump_dest,
control_files, instance_name, service_names, and log_archive_dest, etc.
Name the resulting initialization file as
initTEST.ora,
and save it in the
$ORACLE_BASE/TEST/admin/pfile
file.
4. Duplicate the production database DB1. You must also clone the volumes containing
all the DB1 datafiles and the archived redo logfiles.
Note:
The database is still open during the cloning process and users are active.
To duplicate datafiles, discover the tablespaces that exist on DB1, and enter the
Oracle BEGIN BACKUP command for these tablespaces. Once the tablespaces are
discovered, execute the following SQL script on DB1:
ALTER TABLESPACE SYSTEM BEGIN BACKUP;
ALTER TABLESPACE UNDOTBS1 BEGIN BACKUP;
ALTER TABLESPACE DRYS BEGIN BACKUP;
ALTER TABLESPACE INDX BEGIN BACKUP;