So simple to duplicate a Oracle database using RMAN in 5 steps, testes using 19c SE2.
1. Create a temporary init.ora pfile
echo "db_name='DSEC02'" >> /var/tmp/DSEC02.ora
echo "sga_target=1024M" >> /var/tmp/DSEC02.ora
2. Add oratab entry
echo "DSEC02:/u01/app/oracle/product/19.3.0.0/SE2/db_1:N" >> /etc/oratab
3. Create any supporting directories
mkdir -p /u01/app/oracle/admin/DSEC02/adump
4. Start New Auxiliary Database in nomount mode
. oraenv <<< DSEC02
sqlplus / as sysdba
startup nomount pfile='/var/tmp/DSEC02.ora'
5a. use RMAN to Duplicate Target (original) DSEC01 to Auxiliary (New) DSEC02
rman catalog rman/rman123@rman_catalog auxiliary /
DUPLICATE DATABASE DSEC01 TO DSEC02
SPFILE
PARAMETER_VALUE_CONVERT '/DSEC01', '/DSEC02';
OR
5b. Point in time RMAN to Duplicate Target (original) DSEC01 to Auxiliary (New) DSEC02
run {
set until time "to_date('19-FEB-24 20:55:00','DD-MON-YY HH24:MI:SS')";
DUPLICATE DATABASE DEEC02 to DEEC03
SPFILE
PARAMETER_VALUE_CONVERT '/DSEC01', '/DSEC02';
};