航海日志 hhrz.org hhrz.net chq.name

  • 增大字号
  • 默认文字大小
  • 减小字号

[转载]oracle数据文件迁移

E-mail 打印 PDF
用户评价: / 0
好 

缘由:最近因空间不足,在服务器上增加了一块硬盘,并把oracle的表空间进行了迁移,参照了《 redhat linux下增加一块IDE硬盘的操作步骤》,及本文-<<oracle数据文件迁移>>:只需五步,将oracle的数据文件迁移到同一台服务器的不同目录下.

[转载]oracle数据文件迁移

作者: zxyding(http://zxyding.itpub.net)
发表于:2007.01.26 17:30
分类: oracle管理
出处:http://zxyding.itpub.net/post/402/255813
---------------------------------------------------------------

原来老是在网上看同行迁移数据文件到其它的目录,根据记忆,做了测试(oracle9i),朋友说,将数据库置于mount状态,rename datafile即可。

当数据库处于mount状态时,执行alter database rename datafile 'onefile' to 'anotherfile';时出现错误,说数据库文件没有offline.

我根据错误提示一步一步地做,发现,整个步骤需要在数据库open时做一下五步就好

1、alter tablesapce tools offline ;

2、alter database datafile 'onefile' offline;

3、cp onefile anotherfile

4 alter database rename file 'onefile' to 'anotherfile';

4、alter database datafile 'anotherfile' online;

5、alter tablesapce tools online ;



最后更新于: 2008-10-30 17:49