Background: Dynamicaly moving control files and redo log files from filesystem /dbdata1/ to /dbdata3/ and from /dbdata2/ to /dbdata4/ 1. run as sysdba export ORACLE_SID=orcl sqlplus / as sysdba create pfile='pfile_backup_orcl.ora' from spfile; SET pagesize 0 SET feedback off spool OS_command_orcl.sh SELECT 'cp ' || NAME || ' ' || CASE WHEN REGEXP_SUBSTR(NAME, '^\/[^/]+\/') = '/dbdata1/' THEN REPLACE (NAME, '/dbdata1/', '/dbdata3/') WHEN REGEXP_SUBSTR(NAME, '^\/[^/]+\/') = '/dbdata2/' THEN REPLACE (NAME, '/dbdata2/', '/dbdata4/') END OS_command FROM v$controlfile UNION ALL SELECT 'cp ' || MEMBER || ' ' ||CASE WHEN REGEXP_SUBSTR(MEMBER, '^\/[^/]+\/') = '/dbdata1/' THEN REPLACE (MEMBER, '/dbdata1/', '/dbdata3/') WHEN REGEXP_SUBSTR(MEMBER, '^\/[^/]+\/') = '/dbdata2/' THEN REPLACE (MEMBER, '/dbdata2/',