Get the App
SLTechnology News&Howtos  ›  Database  › 

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

Shulou Source: shulou.com Published: 2022-05-31 11:27:44 10月02日 Update

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!

Tags: Data files space methods learning patterns easy to use databases more help feasible practical and then only multiple articles ways time theory knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Docker OPPO Reno Microsoft Shulou Technology