RMAN backup script in Windows
Hi Support,
Kindly advise how to append date/time in RMAN run block in Windows batch file?
In Linux we use "${TIMEDATE}" to create a directory with current date and time:
export TIMEDATE=$(date +%d-%m-%Y-%H-%M)
rman target / catalog rman/rman@catalog
run
{
BACKUP DATABASE tag='Database_Bkp' format '/u1/oracle/rman_bkp/test/backup_${TIMEDATE}/dbfiles_%d_piece-%p_set-%s_uid-%U_date-%D%M%Y';
}
The same thing we tried in Windows but we are facing the below error message:
set NLS_DATE_FORMAT=DD-MON-YYYY.HH24:MI:SS
set currdate=%date:~10%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%