startup mount;
alter database archivelog;
archive log list;
show parameter db_recovery_file
needed in both server
mkdir -p /u01/app/oracle/fast_recovery_area
alter system set db_recovery_file_dest_size=5g scope=both;
alter system set db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
scp orapworcl oracle@[auxiliary databasae]:/u01/app/oracle/product/12.2.0/db_1/dbs
create pfile='/home/oracle/initorcl.ora' from spfile;
scp initorcl.ora oracle@[auxiliary databasae]:/u01/app/oracle/product/12.2.0/db_1/dbs
listener configuration and tns configuration in both server such as global database name orcl,clone
mkdir -p /u01/app/oracle/admin/orcl/adump
mkdir -p /u01/app/oracle/oradata/orcl/
setting below parameter in duplicate database pfile
*.db_recovery_file_dest_size=5368709120
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
in duplicate database pfile like this
orcl.__data_transfer_cache_size=0
orcl.__db_cache_size=603979776
orcl.__inmemory_ext_roarea=0
orcl.__inmemory_ext_rwarea=0
orcl.__java_pool_size=16777216
orcl.__large_pool_size=33554432
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=671088640
orcl.__sga_target=989855744
orcl.__shared_io_pool_size=50331648
orcl.__shared_pool_size=268435456
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='12.2.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl'
*.db_recovery_file_dest_size=5368709120
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.diagnostic_dest='/u01/app/oracle'
*.db_block_size=8192
*.db_name='orcl'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.local_listener='LISTENER_ORCL'
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
*.memory_target=1570m
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.processes=320
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
startup pfile=/u01/app/oracle/product/12.2.0/db_1/dbs/initorcl.ora nomount
rman target sys/sys123@orcl auxiliary sys/sys123@clone
or
rman target sys/sys123@orcl auxiliary /
duplicate database to 'orcl' from active database nofilenamecheck;