oracle目录移动,oracle控制文件复制、移动方式

一、迁移步骤

1确定控制文件位置

SQL> select name from v$controlfile;

NAME

--------------------------------------------------

/oradata/V11/control01.ctl

SQL> shutdown immediate;

SQL> startup nomount;

2拷贝

$ rman target /

RMAN> restore controlfile to '/recovery_area/V11/control02.ctl' from

'/oradata/V11/control01.ctl';

--OR--

Copy the controlfile using OS-commands

%

cp /oradata/V11/control01.ctl /recovery_area/V11/control02.ctl

---Or----

dd if=/path/to/source_RLV

of=/path/to/target_RLV bs=4096 skip=? seek=?

3修改控制文件

SQL >alter system set

control_files=’/recovery_area/V11/control02.ctl’, ‘/oradata/V11/control01.ctl'

scope=spfile;

Note: If you have an init.ora simply update this to reflect the changes.

4启动数据库

SQL> startup mount force;

-- Note: selecting from v$controlfile will reflect the changes.

SQL> select name from v$controlfile;

NAME

-------------------------------------

/recovery_area/V11/control02.ctl

/oradata/V11/control01.ctl

SQL> alter database open;

二、迁移方式选择

迁移方式

支持类型

Rman

restore controlfile to '< NEW_PATH>'

from '';

File system

asm

Raw Logical Volumes

之前都支持

cp

File system

Asmcmd cp

+dg1/db11g/controlfile/Current.256.651275203

+dg1/db11g/controlfile/cf_copy

Asm

Dd

dd if=/path/to/source_RLV of=/path/to/target_RLV bs=4096

skip=? seek=?

Raw Logical

Volumes

File system

备注:

目的路径为ASM RMAN方式分两种:

1 Rman不指定名称

RMAN>restore controlfile to

'' from '';

Using ASMCMD:

$ asmcmd

ASMCMD> cd

ASMCMD> find -t controlfile . *

+DG1/P10R2/CONTROLFILE/backup.308.577785757

ASMCMD>

2 Rman指定名称

Asm实例下创建目录

SQL> alter diskgroup DG1 add directory

'+DG1/P10R2/CONTROLFILE';

ASMCMD>cd dg1

ASMCMD>mkdir controlfile

复制

restore controlfile to

'+DG1/PROD/controlfile/control02.ctl' from '/oradata2/102b/oradata/P10R2/control01.ctl';

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值