The changes required to setup a duplicate from A (target) to B (auxiliary) in RMAN are pretty trivial.
1) db_file_name_convert AND log_file_name_convert parameters in the auxiliary database. If the file paths are exactly the same, simple name replacement should suffice:
db_file_name_convert='PROD','TEST'
log_file_name_convert='PROD','TEST'
IF your path changes are more complicated, you can specify full path replacement:
db_file_name_convert='/u01/oradata/PROD/system_PROD_01.dbf','/export/home/oracle/oradata/TEST/system_01.dbf','/u01/oradata/PROD/sysaux_PROD_01.dbf','/export/home/oracle/oradata/TEST/sysaux_01.dbf'
log_file_name_convert='/u02/oradata/PROD/redo_PROD_01.log','/export/home/oracle/oradata/TEST/redo_01.log','/u02/oradata/PROD/redo_PROD_02.log','/export/home/oracle/oradata/TEST/redo_02.log'
2) Make sure to setup an oracle password file for the instance and configured for remote login.
3) Make sure the target and auxiliary instances are configured in TNSNAMES.ORA on both instance servers (if they are different).
4) Shutdown B (auxiliary), remove all control files, redo logs and data files.
5) Startup B in NOMOUNT mode.
IF YOU ARE RUNNING 11G
6) Connect to rman like so:
rman target sys/change_on_install@A auxiliary sys/change_on_install@B
duplicate target database to "B" from active database;
Oracle will handle backup mode, compression, transport and unpack of the A database to replace the B database. When this completes, your database will be done.
IF YOU ARE RUNNING 10G
6) Configure flash recovery area in the target instance:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10G SCOPE=BOTH;
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/u01/oraflash' SCOPE=BOTH;
7) Backup database using rman. If your A (target) is in archive log mode, this can be done hot. If not, cold. Compressed below is optional. I always use it. The backupset ends up around 10-20% of the original instance size.
rman target sys/change_on_install@A
backup database as compressed backupset;
8) Using the location you chose above for the recovery area, copy the database to the server auxiliary is on (this is better if you have clustered/shared storage between the two servers). The date of course is the date you run the rman backup. Make sure the files end up in the same place. If there isn't room, you have options, but the easiest way on Unix/Linux is a symbolic link, or on Windows (NTFS only) a junction.
/u01/oraflash/PROD/backupset/2012_06_29
9) Using rman, duplicate the target database:
rman target sys/change_on_instance@A auxiliary sys/change_on_install@B
duplicate target database to "B";
AND, you are up.
IF you really want to do a new clone with "less" effort, then you can setup a very shell database (an init.ora file with only 1 parameter), and use the SPFILE parameter in the rman duplicate to copy the parameter file over to the new instance, converting every name based parameter on the way. The can be good, except when the test machine may have more than one instance, and memory tuning may need tweaking.
If my source database uses SPFILE then do I have create a PFILE from the SPFILE?
Yes, you need to create a temporary PFILE to use while duplicating the database. You will later switch the new instance to use the SPFILE.
Use
CREATE PFILE = 'path/to/pfile' FROM SPFILE;
You only need to create directories that are referenced in the PFILE or SPFILE.
Which directories need to be created?
You will start the database as NOMOUNT to begin the duplication. This means the controlfiles will not be read, and so you don't need to have the directories in which the datafiles reside present in your new host. However, the directories references in the parameter files must be present. From your transcript,
DB11G.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
*.audit_file_dest='/u01/app/oracle/admin/DB11G/adump'
*.control_files='/u01/app/oracle/oradata/DB11G/control01.ctl','/u01/app/oracle/oradata/DB11G/control02.ctl'#Restore Controlfile
*.db_recovery_file_dest='/u01/app/oracle/fra'
*.diagnostic_dest='/u01/app/oracle'
*.log_archive_dest_1='location=/u01/app/oracle/archive_logs'
You may find this chapter of the documentation useful: http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#i1006474
Best Answer
the error messages you got because you don't have privileges to log in to the server so you need to grant the user the necessary access.
some tips to solve this issue:
1) Mount the remote disk locally (map network drive).
2) Use rman CATALOG command to make the backups available.
3) user has enough privileges on ORACLE level