今日无聊,做了下关于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/