Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Db_file_name_convert order problem

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report