In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to add data files to the file system by mistake in the rac environment. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Change the data file offline or offline drop
Alter database datafile'/ home/oracle/andy.dbf' offline drop
View the status of the data file
Select file_name,status from dba_data_files
+ DATA/andy.dbf RECOVER
The offline drop data file is in recover state and normal state. The data will no longer be written to the data file in recover state, but the exppd and rman backup in this state will report an error.
Solution:
First, delete directly
Alter database datafile 'xxx' offline drop
Delete file$ where FILE#=7
Move the data file that added the error to the disk group
1 、 [root@racdb1 grid] # mv andy.dbf / home/grid/
2 、 [root@racdb1 grid] # chown grid.asmadmin andy.dbf
[root@racdb1 grid] # su-grid
[grid@racdb1 ~] $asmcmd
ASMCMD > cd data/racdb/datafile/
ASMCMD > ls
ASMCMD > cp / home/grid/andy.dbf. /
Copying / home/grid/andy.dbf-> + data/racdb/datafile/andy.dbf
ASMCMD > ls
SQL > alter database rename file'/ home/oracle/andy.dbf' to'+ data/racdb/datafile/andy.dbf'
Verify the status of the data file
SQL > select name,status from v$datafile
If it is still in recover state, it needs to be restored.
SQL > recover datafile 5
Media recovery complete.
SQL > alter database datafile 5 online
SQL > select name,status from v$datafile
+ DATA/andy.dbf online
Thank you for reading! This is the end of the article on "how to add data files to the file system by mistake in the rac environment". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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
Text documents can be downloaded: link: https://pan.baidu.com/s/1o9c0Hyq password: md9w
© 2024 shulou.com SLNews company. All rights reserved.