In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Rman how to restore data files, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Recovery can be done when the database is in open or mount state, with only 4 steps
1. Place the data file in the shape of offline
two。 Restore data file (specify data file number)
3. Restore data files
4. Online the data file
-View the status of the data file
SYS@ogg > select file_id,file_name,ONLINE_STATUS from dba_data_files
FILE_ID FILE_NAME ONLINE_
-
4 / u01/app/oracle/oradata/ogg/users01.dbf ONLINE
3 / u01/app/oracle/oradata/ogg/undotbs01.dbf ONLINE
2 / u01/app/oracle/oradata/ogg/sysaux01.dbf ONLINE
1/ u01/app/oracle/oradata/ogg/system01.dbf SYSTEM
5 / u01/app/oracle/oradata/ogg/example01.dbf ONLINE
6 / u01/app/oracle/oradata/ogg/ogg_01.dbf ONLINE
7 / u01/app/oracle/oradata/ogg/receiver_01.dbf ONLINE
-simulated destruction of data file No. 5
[oracle@ogg-80 ogg] $mv example01.dbf example01.dbf.bak
1 offline data file
RMAN > sql 'alter database datafile 5 offline'
-check the offline status, where the status becomes recover.
SYS@ogg > select file_id,file_name,ONLINE_STATUS from dba_data_files
FILE_ID FILE_NAME ONLINE_
-
4 / u01/app/oracle/oradata/ogg/users01.dbf ONLINE
3 / u01/app/oracle/oradata/ogg/undotbs01.dbf ONLINE
2 / u01/app/oracle/oradata/ogg/sysaux01.dbf ONLINE
1/ u01/app/oracle/oradata/ogg/system01.dbf SYSTEM
5 / u01/app/oracle/oradata/ogg/example01.dbf RECOVER
6 / u01/app/oracle/oradata/ogg/ogg_01.dbf ONLINE
7 / u01/app/oracle/oradata/ogg/receiver_01.dbf ONLINE
two。 Restore data files
RMAN > restore datafile 5
3. Restore data files
RMAN > recover datafile 5;-here is the application log
-the recovery is completed in the viewing status, and the status here becomes offline
SYS@ogg > select file_id,file_name,ONLINE_STATUS from dba_data_files
FILE_ID FILE_NAME ONLINE_
-
4 / u01/app/oracle/oradata/ogg/users01.dbf ONLINE
3 / u01/app/oracle/oradata/ogg/undotbs01.dbf ONLINE
2 / u01/app/oracle/oradata/ogg/sysaux01.dbf ONLINE
1/ u01/app/oracle/oradata/ogg/system01.dbf SYSTEM
5 / u01/app/oracle/oradata/ogg/example01.dbf OFFLINE
6 / u01/app/oracle/oradata/ogg/ogg_01.dbf ONLINE
7 / u01/app/oracle/oradata/ogg/receiver_01.dbf ONLINE
4. Online the data file
RMAN > sql 'alter database datafile 5 online'
-check the status again after online
SYS@ogg > select file_id,file_name,ONLINE_STATUS from dba_data_files
FILE_ID FILE_NAME ONLINE_
-
4 / u01/app/oracle/oradata/ogg/users01.dbf ONLINE
3 / u01/app/oracle/oradata/ogg/undotbs01.dbf ONLINE
2 / u01/app/oracle/oradata/ogg/sysaux01.dbf ONLINE
1/ u01/app/oracle/oradata/ogg/system01.dbf SYSTEM
5 / u01/app/oracle/oradata/ogg/example01.dbf ONLINE
6 / u01/app/oracle/oradata/ogg/ogg_01.dbf ONLINE
7 / u01/app/oracle/oradata/ogg/receiver_01.dbf ONLINE
After reading the above, have you mastered the method of how rman recovers the data files? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.