Get the App
SLTechnology News&Howtos  ›  Database  › 

There is not enough space in the Oracle directory, so you need to migrate the database files to a directory with more space.

Shulou Source: shulou.com Published: 2022-06-01 11:22:48 11月15日 Update

1. Use sys or system to log in to oracle with sysdba privileges

2. Query all tablespaces and the addresses of tablespaces

3. Set the table space to be migrated to offline state.

4. Copy the tablespace files that need to be migrated to the destination folder

5. Modify the table space to be migrated to point to the address

6. Set the table space to be migrated to online state

Such as:

Select * from dba_data_files

Alter tablespace PLUSDEV offline

Copy the / u01/app/oracle/oradata/PLUSDEV/users01.dbf file to / dbdata/plusdev/users01.dbf

Alter database rename datafile'/ u01/app/oracle/oradata/PLUSDEV/users01.dbf'to'/ dbdata/plusdev/users01.dbf'

Alter tablespace PLUSDEV online

Note: problems that may arise:

An error occurred in step 6: the ora-01113 file n needs to be repaired by the media, log in using sys/system in the cmd window, and restore using the recover datafile n; statement.

For example:

Ora-01113 file 2 needs media repair, enter statement: recover datafile 2

Tags: Space file media address status statement login location directory copy point folder permissions user target error problem query input larger Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MySQL Shulou Tech Info Docker Shulou Technology