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

What are the operation methods of offline data files and table spaces

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what are the operation methods of offline data files and tablespaces". In the daily operation, I believe that many people have doubts about the operation methods of offline data files and tablespaces. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "offline data files and table space operation methods". Next, please follow the editor to study!

Offline data files are not archived offline drop is the same as offline for drop, only offline can be used without adding drop under archiving

Offline tablespace archiving and non-archiving are the same, with offline only

The migration experiment of multiple files in tablespace is feasible, both offline and library closing methods are feasible.

After mistakenly deleting data files, we can use this method to offline data files to make the database normal and easy to use.

-- View error resolution

SQL >! oerr ora 01145

-- offline method of data files in non-archived mode

Offline for drop equals offline drop

Alter database datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ abc.dbf' offline drop

Recover datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ abc.dbf'

Alter database datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ abc.dbf' online

-- in non-archive mode, you need to drop the table space to offline before you can offline the data file, as shown below

SQL > alter tablespace tbs1 offline

SQL > alter database datafile'/ u01 offline

-

Create tablespace abc datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ abc.dbf' size 100m autoextend on next 200m

Create user abc identified by abc default tablespace abc profile DEFAULT account unlock

Grant connect,resource to abc

Grant dba to abc

Only in archive mode, you can directly offline data files

Alter database datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ EMR01.DBF' offline

After mistakenly deleting data files, offline drop can only make the database easy to use, and the offline files and data can not be found.

-- non-archiving / archiving offline

Alter database datafile'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ abc.dbf' offline drop

Select status from v$instance

Alter database open

Drop tablespace recovery

See if your archive is complete. If it is complete (be sure to include the time to create the tablespace), then you can restore the tablespace.

(alter database create datafile as.... The way is fine)

At this point, the study on "what are the offline data files and table space operation methods" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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