ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 给ORACLE数据库移个地方

给ORACLE数据库移个地方

原创 Linux操作系统 作者:rockyan712 时间:2008-11-11 10:50:24 0 删除 编辑

由于数据库所在的磁盘已经满了 现在需要把数据库移动到另一个容量比较大的磁盘上去,都是在一个机器上操作而已。

1  shutdown immediate

2  mv  /opt/oracle/oradata/zhaobiao/  /ora9idata/zhaobiao/

3  startup mount

4  alter database rename file '/opt/oracle/oradata/zhaobiao/system01.dbf'    to '/ora9idata/zhaobiao/system01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/undotbs01.dbf'   to '/ora9idata/zhaobiao/undotbs01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/cwmlite01.dbf'   to '/ora9idata/zhaobiao/cwmlite01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/drsys01.dbf'     to '/ora9idata/zhaobiao/drsys01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/example01.dbf'   to '/ora9idata/zhaobiao/example01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/indx01.dbf'      to '/ora9idata/zhaobiao/indx01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/odm01.dbf'       to '/ora9idata/zhaobiao/odm01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/tools01.dbf'     to '/ora9idata/zhaobiao/tools01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/users01.dbf'     to '/ora9idata/zhaobiao/users01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/xdb01.dbf'       to '/ora9idata/zhaobiao/xdb01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/ZHUDB01.dbf'     to '/ora9idata/zhaobiao/ZHUDB01.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/ZHUDB02.dbf'     to '/ora9idata/zhaobiao/ZHUDB02.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/ZHUDB0.ORA3.dbf' to '/ora9idata/zhaobiao/ZHUDB0.ORA3.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/ZHUDB04.dbf'     to '/ora9idata/zhaobiao/ZHUDB04.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/ZHUDB05.dbf'     to '/ora9idata/zhaobiao/ZHUDB05.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/DOCMAN.dbf'      to '/ora9idata/zhaobiao/DOCMAN.dbf';
alter database rename file '/opt/oracle/oradata/zhaobiao/BJPIMS.dbf'      to '/ora9idata/zhaobiao/BJPIMS.dbf';

5  alter database open

上面就是把数据文件给移动到另外一个地方,如果控制文件要是也移动的话就得编辑一下PFILE修改控制文件的路径。如果redo log也好改地方的话,那么就可以新建3组 redo log 把原来的 删除即可,但是正在使用的 redo log 需要alter database switch logfile

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/444614/viewspace-490683/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-05

  • 博文量
    27
  • 访问量
    161743