In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to delete tablespace files by Oracle". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Today, when cleaning the host space, we mistook the data file of a tablespace for a dump file, deleted it directly, and realized that there was a problem after deleting it, but the database could not be restored (LINUX). At this time, the database could not be opened, but some database views could not be opened, such as dba_data_files, there was no way to check the processing methods on the Internet, all said to restart the data and then restore or delete. Because I didn't intend to have these files, I will delete them eventually, but I don't want to restart the database.
The saying given on the Internet is:
Sqlplus / as sysdba # logs in to the database as dba
Shutdown immediate; # shut down the database
Startup mount; # Open the control file
Alter database datafile'D:\ app\ WHPLATFORM_ZX1.DBF' offline drop; # Log out tablespace files that have been deleted by mistake
Alter database open
Restart the database to the mount state, then drop the deleted files by mistake, and then open the database
Since I do not want to restart the data, but also want to deal with this problem and ensure that everything in the database is normal, I use DBA users to try to take the tablespace offline first and report an error. In fact, the tablespace is already offline, and then execute it directly.
Alter database datafile'/ u01 offline drop oradata offline drop
As a result, delete normally, and then continue to delete several other data files.
Then query a few system views that have just been opened in question, and the results are normal. Finally, in the case of not restarting the database, the problem of mistakenly deleting data files is solved, which feels good, .
This is the end of the introduction of "how to delete tablespace files by Oracle". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.