I have 11gr2 database on linux 5.5. Now i want to clone this database in the same server to point in time.
I followed two methods.
copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters except db_name then started the instance and restored controlfiles from the source instance backup files. But while mounting it has given exclusive mode error. I also updated parameters db_file_name_convert, log_file_name_convert. But still giving the same error.
2) copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters including db_name started the instance and restored and created the contorlfies using trace file that is taken from source database (like ' alter database backup controlfile to trace as '/u01/control.sql'). but it has given unable to lock system datafile.
Is there any method to clone the database using rman in the same server to point in time.
when all else fails Read The Fine Manual.
Actually you are not cloneing. you are doing rman point in time recovery. why dont you do it on another server. This will be much safer for your current database.
Also check this link & search for NOFILENAMECHECK
"If duplicating a database on the same host as the source database, then ensure that
NOFILENAMECHECKis not set.
Otherwise, RMAN can potentially overwrite and corrupt the target database data files, temp files, or online logs. "
I assume you want another copy of the database on the same server.
RMAN DUPLICATE DATABASE at a Past Point in Time
CONNECT TARGET SYS/oracle@trgt
CONNECT AUXILIARY SYS/oracle@dupdb
DUPLICATE TARGET DATABASE TO dupdb
NOFILENAMECHECK UNTIL TIME 'SYSDATE-7';
Chapter 24 of Backup and Recovery User's Guide 11g Release 2 (11.2) E10642-03
Example 24-2 Duplicating a Database to a Past Point in Time (Backup-Based)