Db_file_name_convert order problem
In duplicate, if there is not enough space in a remote directory, you can split the files into two directories and use db_file_name_convert.
Instead of converting directory names, db_file_name_convert converts file names
For example, the file paths on the source side are all / u01/app/oracle/oradata/prod1.
File names are all such as / u01/app/oracle/oradata/prod1/u*.dbf, / u01/app/oracle/oradata/prod1/sys*.dbf
It is found that the file in the source side / u01/app/oracle/oradata/prod1 directory is greater than 4T, but the destination side / u01/app/oracle/oradata/prod1std is only 3T, what should I do?
Mount a storage, add a directory of / u02, and convert the file name using db_file_name_convert as follows
Db_file_name_convert= ('/ u01Accord oraclehelplash oradataplaza'/ u01Grexample oradataplaza oradataplaza'/ u01Grexamplicaloradatapletoradataandprod1std')
It means to change the / u01/app/oracle/oradata/prod1/u in the file name to / u02UniGu first.
If there is no / u01/app/oracle/oradata/prod1/u in the remaining file name, change the / u01/app/oracle/oradata/prod1 in the file name to / u01/app/oracle/oradata/prod1std
Db_file_name_convert= ('/ u01amp appplexoraclehelplexoradataGrexU01ApplicationoradataOnProd1stadataProd1stadataCommons db_file_name_convert= ('/ u01helplash oraclehelplexoradataplicoradataandprod1stadataplains'/ u01plains oradataplains prod1andlplains oradataplains prod1plains; u01plains;
Change the / u01/app/oracle/oradata/prod1 in the file name to / u01/app/oracle/oradata/prod1std first
If there is no / u01/app/oracle/oradata/prod1 in the rest of the file name, change the / u01/app/oracle/oradata/prod1/u in the file name to / u02CMU
Therefore, if you find that there is not enough space for a directory on the target side, you must put the names of some data files to be converted in front of them, that is, in the above case, you must put / u02Unitabl in front of / u01/app/oracle/oradata/prod1std
The file name on the source side is as follows
SQL > select file_name from dba_data_files
FILE_NAME
/ u01/app/oracle/oradata/prod1/users01.dbf
/ u01/app/oracle/oradata/prod1/undotbs01.dbf
/ u01/app/oracle/oradata/prod1/sysaux01.dbf
/ u01/app/oracle/oradata/prod1/system01.dbf
/ u01/app/oracle/oradata/prod1/example01.dbf
Run {duplicate target database to prod1std from active database
Db_file_name_convert= ('/ u01amp appplexoraclehelplexoradataGrexU01ApplicationoradataOnProd1stadataProd1stadataCommons db_file_name_convert= ('/ u01helplash oraclehelplexoradataplicoradataandprod1stadataplains'/ u01plains oradataplains prod1andlplains oradataplains prod1plains; u01plains;
Logfile'/ u01 size size 100m
'/ u01applink oracle size 100m
'/ u01Applicon size oradataPlacement prod1stdscarp redo03.log' oradata 100M;}
Target end
SQL > select file_name from dba_data_files
FILE_NAME
/ u01/app/oracle/oradata/prod1std/system01.dbf
/ u01/app/oracle/oradata/prod1std/sysaux01.dbf
/ u01/app/oracle/oradata/prod1std/undotbs01.dbf
/ u01/app/oracle/oradata/prod1std/users01.dbf
/ u01/app/oracle/oradata/prod1std/example01.dbf
Run {duplicate target database to prod1std from active database
Db_file_name_convert= ('/ u01Accord oraclehelplash oradataplaza'/ u01Grexample oradataplaza oradataplaza'/ u01Grexamplicaloradatapletoradataandprod1std')
Logfile'/ u01 size size 100m
'/ u01applink oracle size 100m
'/ u01Applicon size oradataPlacement prod1stdscarp redo03.log' oradata 100M;}
Target end
SQL > select file_name from dba_data_files
FILE_NAME
/ u01/app/oracle/oradata/prod1std/system01.dbf
/ u01/app/oracle/oradata/prod1std/sysaux01.dbf
/ u02/undotbs01.dbf
/ u02/users01.dbf
/ u01/app/oracle/oradata/prod1std/example01.dbf