ORA-27046,使用dd命令将裸设备数据文件内容转移到文件系统发生的问题

今日无聊,做了下关于DG的有关standby_file_management参数设置的一些实验。

其中一个实验,是在primary数据库将test表空间的数据库文件/dev/raw/raw5数据文件改名至/oracle/oradata/jnjg/test01.dbf

步骤如下:

sql>atler tablespace test offline;

sql>host

dd if=/dev/raw/raw5 f=/oracle/oradata/jnjg/test01.dbf

sql>alter database rename file '/dev/raw/raw5' to '/oracle/oradata/jnjg/test01.dbf';

sql>alter tablespace test online;

出现以下错误:

ERROR at line 1:
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/oracle/oradata/mytmp01.dbf'

告警日志中出现:

alter tablespace mytmp online
Sun Dec 20 08:04:47 2009
Errors in file /oracle/admin/jnjg/bdump/jnjg_dbw0_8308.trc:
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/oracle/oradata/mytmp01.dbf'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-1157 signalled during: alter tablespace mytmp online...

在命令行下,通过oerr命令查看错误号内容:

oerr ora 27046

bash-3.1$ oerr ora 27046
27046, 00000, "file size is not a multiple of logical block size"
// *Cause:  file size as indicated by stat is not correct, additional
//          information indicates which function encountered the error
// *Action: verify that the file has not been overwritten or truncated

没看出来有什么能够解决的方法,后来想了想,dd的时候没有制定bs参数,是不是因为操作系统块跟block_size不一致所致,于是

rm /oracle/oradata/jnjg/test01.dbf

dd if=/dev/raw/raw5 f=/oracle/oradata/jnjg/test01.dbf bs=8192

sql>alter tablespace test online;

成功

 

 

 

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

转载于:http://blog.itpub.net/7796861/viewspace-623207/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值