Oracle移动dbf文件

1,以sysdba登录到sqlplus

sqlplus /nolog
connect name/pwd as sysdba;

2,查询数据文件

select * from dba_data_files;

3,关闭数据库

shutdown immediate;

4,移动数据文件

mv old_file_path.dbf new_file_apth.dbf

5,以mount方式启动数据库

startup mount;

6,在数据库中修改路径

alter database rename file 'old_file_path.dbf' to 'new_file_path.dbf';

7,打开数据库

alter database open;


一定要在shutdown数据库后移动数据文件,不要提前



另一种方式移动dbf文件

你可能感兴趣的:(Oracle移动dbf文件)