ITPub博客

首页 > 数据库 > Oracle > 一次dg数据文件及archive log迁移

一次dg数据文件及archive log迁移

原创 Oracle 作者:peng163fj 时间:2015-04-13 13:54:33 0 删除 编辑

参考:http://blog.itpub.net/27181165/viewspace-775863/

主库

查看数据文件所在位置及状态
select d.name,t.name,d.status from v$datafile d,v$tablespace t where d.ts#=t.ts#;

将位置记下,进行cp操作

将表空间离线

alter tablespace oooxxx offline;

迁移

cp 旧 新

alter database rename file '/u01/old.dbf' to '/u02/new.dbf';

将表空间上线

备库

切换为手工模式

recover managed standby database cancel

同上操作

重新切换回自动模式

alter database open read only

recover managed standby database

alter system set standby_file_management=AUTO

archilog 位置切换

主库

alter system set log_archive_dest_1= 'location=/home/arch/ valid_for=(all_logfiles,all_roles)  db_unique_name=prod' scope=both;

备库

alter system set log_archive_dest_1= 'location=/home/arch/ valid_for=(all_logfiles,all_roles)  db_unique_name=standby' scope=both;

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

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

注册时间:2013-11-20

  • 博文量
    155
  • 访问量
    440173