In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Problems encountered in migrating DATA and OCR:
Question 1:
Problems encountered when using RMAN copy to migrate data file locations, (migrating from one disk group to another)
Use the following splicing statement for COPY stitching
Select 'copy datafile' | |'| | file_name | |'| |'+ NEWDATA/rac/' | | substr (file_name,instr (file_name,'/',-1) + 1) | |'; 'from dba_data_files
Get the following sql statement:
Copy datafile'+ DATA/racdb/datafile/users.259.1037590363' to'+ NEWDATA/rac/users
.259.1037590363'
Copy datafile'+ DATA/racdb/datafile/undotbs1.258.1037590363' to'+ NEWDATA/rac/un
Dotbs1.258.1037590363'
Copy datafile'+ DATA/racdb/datafile/sysaux.257.1037590363' to'+ NEWDATA/rac/sysa
Ux.257.1037590363'
Copy datafile'+ DATA/racdb/datafile/system.256.1037590361' to'+ NEWDATA/rac/syst
Em.256.1037590361'
Copy datafile'+ DATA/racdb/datafile/example.264.1037590589' to'+ NEWDATA/rac/exa
Mple.264.1037590589'
Copy datafile'+ DATA/racdb/datafile/undotbs2.265.1037591117' to'+ NEWDATA/rac/un
Dotbs2.265.1037591117'
Executive Times error:
ORA-01276: Cannot add file + NEWDATA/rac/system.256.1037590361. File has an Oracle Managed Files file name.
Reason: because the data file is a data file created using OMF automatic file management function, which belongs to OMF naming format, when data files are migrated from one disk group to another disk group in ASM, an error ORA-01276 will be reported. The solution is very simple, which is to use RMAN COPY and rename at the same time to eliminate OMF naming rules.
The modified stitching statement is as follows:
Select 'copy datafile' | |'| | file_name | |'| |'+ NEWDATA/rac/' | | substr (file_name,instr (file_name,'/',-1) + 1) | |'; 'from dba_data_files
Get the following SQL:
Copy datafile'+ DATA/racdb/datafile/users.259.1037590363' to'+ NEWDATA/rac/users
.259.1037590363.dbf'
Copy datafile'+ DATA/racdb/datafile/undotbs1.258.1037590363' to'+ NEWDATA/rac/un
Dotbs1.258.1037590363.dbf'
Copy datafile'+ DATA/racdb/datafile/sysaux.257.1037590363' to'+ NEWDATA/rac/sysa
Ux.257.1037590363.dbf'
Copy datafile'+ DATA/racdb/datafile/system.256.1037590361' to'+ NEWDATA/rac/syst
Em.256.1037590361.dbf'
Copy datafile'+ DATA/racdb/datafile/example.264.1037590589' to'+ NEWDATA/rac/exa
Mple.264.1037590589.dbf'
Copy datafile'+ DATA/racdb/datafile/undotbs2.265.1037591117' to'+ NEWDATA/rac/un
Dotbs2.265.1037591117.dbf'
If you execute it, you will not report an error.
After the migration, you need to rename the data file twice to ensure that the name of the data file is the same as the original name, but the final renamed data file has only the same name as the original data file and has nothing to do with OMF.
Rename for the first time:
Alter database rename file'+ DATA/racdb/datafile/users.259.1037590363' to'+ NEWD
ATA/rac/users.259.1037590363.dbf'
Question 2:
When migrating control files:
(also due to OMF)
ASMCMD > cp Current.260.1037590513 + NEWDATA/rac/
Copying + DATA/RACDB/CONTROLFILE/Current.260.1037590513-> + NEWDATA/rac/Current.260.1037590513
ASMCMD-8016: copy source'+ DATA/RACDB/CONTROLFILE/Current.260.1037590513' and target'+ NEWDATA/rac/Current.260.1037590513' failed
ORA-15056: additional error message
ORA-15046: ASM file name'+ NEWDATA/rac/Current.260.1037590513' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 415
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)
Solution:
ASMCMD > cp Current.260.1037590513 Current01.ctl
Copying + DATA/RACDB/CONTROLFILE/Current.260.1037590513-> + DATA/RACDB/CONTROLFILE/Current01.ctl
ASMCMD > cp Current01.ctl + NEWDATA/rac/
Copying + DATA/RACDB/CONTROLFILE/Current01.ctl-> + NEWDATA/rac/Current01.ctl
When modifying the control file information recorded in the parameters, you should pay attention to changing the name format.
Do not enable OMF automatic file management when creating a cluster, or it will be troublesome to migrate the data disk later.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.