脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2013-12-26 13:55:16
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 --