数据库
首页 > 数据库> > oracle迁移数据文件

oracle迁移数据文件

作者:互联网

步骤如下:

1.  把数据文件迁移到/u02对应的目录

[oracle@localhost hsbop]$ mv /u01/app/oracle/oradata/orcl/acptdat.dbf  /u02/oradata/hsbop/acptdat.dbf

[oracle@localhost hsbop]$ mv /u01/app/oracle/oradata/orcl/acptidx.dbf /u02/oradata/hsbop/acptidx.dbf

[oracle@localhost hsbop]$ mv /u01/app/oracle/oradata/orcl/archdat.dbf /u02/oradata/hsbop/archdat.dbf

[oracle@localhost hsbop]$ mv /u01/app/oracle/oradata/orcl/archidx.dbf /u02/oradata/hsbop/archidx.dbf

2. 数据库启动到mount状态

SQL> startup mount

ORACLE instance started.

Total System Global Area  536870912 bytes

Fixed Size     1220408 bytes

Variable Size   171966664 bytes

Database Buffers   356515840 bytes

Redo Buffers     7168000 bytes

Database mounted.

3. 进行数据文件的rename

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/acptdat.dbf' to '/u02/oradata/hsbop/acptdat.dbf';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/acptidx.dbf' to '/u02/oradata/hsbop/acptidx.dbf';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/archdat.dbf' to '/u02/oradata/hsbop/archdat.dbf';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/orcl/archidx.dbf' to '/u02/oradata/hsbop/archidx.dbf';

Database altered.

4. 打开数据库

SQL> alter database open;

Database altered.

标签:数据文件,hsbop,app,dbf,oradata,oracle,迁移,u02
来源: https://blog.csdn.net/YABIGNSHI/article/details/120336351