0% found this document useful (0 votes)
26 views4 pages

Drill To Clone Database Using Rman: Start Listener & Databases

The document provides steps to clone an Oracle database using RMAN. It includes starting the listener and databases, backing up the source database, creating initialization files and directory structure for the clone database, editing the initialization parameter file, starting the clone database in nomount mode, running the duplicate command in RMAN to clone the database, and validating the clone database.

Uploaded by

Vikas Sinha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Drill To Clone Database Using Rman: Start Listener & Databases

The document provides steps to clone an Oracle database using RMAN. It includes starting the listener and databases, backing up the source database, creating initialization files and directory structure for the clone database, editing the initialization parameter file, starting the clone database in nomount mode, running the duplicate command in RMAN to clone the database, and validating the clone database.

Uploaded by

Vikas Sinha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

DRILL TO CLONE DATABASE USING RMAN

start listener & databases.


RMAN> backup database;
RMAN> list backup summary;
SQL> select * from v$database;

On Target Database ORCL


SQL> ALTER SYSTEM SET MEMORY_TARGET = 0;

CREATE PASSWORD FILE


$ orapwd file='/u01/app/oracle/product/11.1.0/db_1/dbs/orapwclone.ora'
password=oracle;

CREATE INIT FILE FOR NEW DATABASE


SQL> create pfile='/u01/app/oracle/product/11.1.0/db_1/dbs/initclone.ora' from spfile;
File created.

Creating Directory Structure for new database


mkdir -p /u01/app/oracle/oradata/clone
mkdir -p /u01/app/oracle/admin/clone/adump
mkdir -p /u01/app/oracle/admin/clone/dpdump
mkdir -p /u01/app/oracle/admin/clone/pfile

CHANGING THE CLONEINIT.ORA


$ vi /u01/app/oracle/product/11.1.0/db_1/dbs/initclone.ora
clone.__db_cache_size=423624704

clone.__java_pool_size=12582912
clone.__large_pool_size=4194304
clone.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
clone.__pga_aggregate_target=209715200
clone.__sga_target=641728512
clone.__shared_io_pool_size=0
clone.__shared_pool_size=192937984
clone.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/clone/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/clone/control01.ctl','/u01/app/oracle/oradata/clone/contr
ol02.ctl','/u01/app/oracle/oradata/clone/control03.ctl'
*.db_block_size=8192
*.db_domain='rhel5.com'
*.db_name='clone'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=3221225472
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cloneXDB)'
*.memory_target=0
*.open_cursors=300
*.pga_aggregate_target=209715200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=641728512
*.undo_tablespace='UNDOTBS1'
*.db_file_name_convert=('/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/clone')
*.log_file_name_convert=('/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/clone')

START CLONE DB IN NOMOUNT MODE


$ export ORACLE_SID=clone
$ sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/11.1.0/db_1/dbs/initclone.ora';
SQL> def
SQL> select * from v$instance;

Add the Clone Entries to LISTERNAME.ora and tnsnames.ora file

CLONE PROCESS AT RMAN PROMPT


$ export ORACLE_SID=clone
$ rman target sys/oracle@orcl auxiliary /

Recovery Manager: Release 11.1.0.4.0 - Production on Mon Oct 13 16:24:20 2008


Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1177864527)
connected to auxiliary database: CLONE (not mounted)

RMAN> duplicate target database to "clone";

output.txt

SQL> select tablespace_name, bytes_used, bytes_free from v$temp_space_header;

TABLESPACE_NAME

BYTES_USED BYTES_FREE

------------------------------ ---------- ---------TEMP

1048576 19922944

SQL> select INSTANCE_NAME,HOST_NAME,STARTUP_TIME,STATUS from v$instance;

INSTANCE_NAME

HOST_NAME

STARTUP_T STATUS

---------------- ---------------------------------------- --------- -----------clone

server.rhel5.com

17-SEP-09 OPEN

SQL> select DBID,NAME, CREATED, RESETLOGS_TIME, LOG_MODE,


CONTROLFILE_CREATED from v$database;

DBID NAME

CREATED RESETLOGS LOG_MODE

CONTROLFI

---------- --------- --------- --------- ------------ --------896626910 CLONE

17-SEP-09 17-SEP-09 ARCHIVELOG 17-SEP-09

SQL> select file_name from dba_data_files;

FILE_NAME
---------------------------------------------------------------/u01/app/oracle/oradata/clone/system01.dbf
/u01/app/oracle/oradata/clone/sysaux01.dbf
/u01/app/oracle/oradata/clone/undotbs01.dbf
/u01/app/oracle/oradata/clone/users01.dbf
/u01/app/oracle/oradata/clone/example01.dbf

You might also like