I am writing all the steps required for database cloning.
Source:



Use alter system switch logfile;



This will forcibly do database wide checkpoint ( which is also equivalent to shutdown normal).



Alter database backup controlfile to trace resetlogs;



Show parameter user_dump will give you the path where trace(.trc) file of control file is placed.



The .trc will contain the create controlfile …. Statement

Scoop out everything from it leaving the create contol file Reuse database ……. Statement

Copy all the database files (including Init.ora file) (With database as shutdown normal) as mentioned in create controlfile statement from source to target destination.



Target :

Install Oracle10g software without creating the sample database.

Since I used a new database name in the target server modify entries in init.ora like db_name as well as the directory structures as where you will place the control files , redo files and datafiles.



Modify the .trc file for control file as CREATE CONTROLFILE REUSE SET DATABASE RESETLOGS ARCHIVELOG with all the new directory structures and save the file as ctrl.sql ( could be any name only extn should be .sql).



Create an instance in target server using oradim utility for eg

Oradim –new –sid -syspwd -startmode auto –pfile file=’ give the path for init.ora’



After creating the instance say instance is Test and sys password is oracle log in as



Sqlplus sys/oracle as sysdba

SQL> startup nomount

SQL> @c:\ ctrl.sql

Control file created.

SQL> Alter database open resetlogs;



If any recovery is required use the following

SQL>Recover Database using backup controlfile;

apply the online redo log file which were current



select group#, sequence#, status from V$log;



GROUP# SEQUENCE# STATUS

---------- ---------- ----------------

1 1 CURRENT <== this redo needs to be applied




And then

SQL> Alter database open resetlogs;