沈阳凯文数据恢复中心 服务器数据恢复 各类数据库修复 小型机数据恢复 13386848847 024-31065488 地址:沈阳市和平区三好街同方广场A座10楼1012写字间

ORACLE数据文件变更路径的步骤

 1.关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

2.将当前目录的数据文件迁移到指定目录
mv tps_hxl02.dbf ../oraclbak 
mv tps_hxl03.dbf ../oraclbak

3.启动数据库到mount状态
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             352323968 bytes
Database Buffers           62914560 bytes
Redo Buffers                6094848 bytes
Database mounted.

4.更改数据文件路径
SQL> alter database rename file '/u01/app/oracle/oradata/oracl/tps_hxl02.dbf' to '/u01/app/oracle/oradata/oraclbak/tps_hxl02.dbf';

Database altered.

SQL> alter database rename file '/u01/app/oracle/oradata/oracl/tps_hxl03.dbf' to '/u01/app/oracle/oradata/oraclbak/tps_hxl03.dbf';

Database altered.

5.打开数据库
SQL> alter database open;

Database altered.

-- The End --

Tags: oracle

发布: admin 分类: 技术文章 评论: 0 浏览: 32
留言列表