duplicate target database for standby...
上面的脚本的最后两句:我试了加与不加nofilenamecheck到最后都报错。加上nofilenamecheck可以restore,只是到recover时候报错,而不加nofilenamecheck,一开始就报如下错误:
sql statement: alter database mount standby database
released channel: dup1
released channel: dup2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/07/2006 06:49:37
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /data/nlocal/test03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/test02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/test01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx05.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlhist01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/undotbs02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/tools01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/indx01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/system01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo01.log conflicts with a file used by the target database
RMAN> **end-of-file**
如果使用了nofilenamecheck来做,restore都没有问题,到recover的时候就出错了,因为system01.dbf这个数据文件没有变更路径,还是/data/nlocal/下,但recover时却去找/arch/data/nlocal/这个路径了。
在standby db的pfile里我加了这条:db_file_name_convert=('/data/nlocal','/arch/data/nlocal')
我在想:db_file_name_convert去掉了,那路径不同的datafile同步会不会有问题?
我刚试着向primary db插入大量数据,standby db都能同步,暂时好象没什么问题。
使用rman建立standby遇到些问题
两台机器因为硬盘大小不一样,primary db已建好,建立standby db时有些datafile与primary db的路径不一样。
duplicate for standby脚本如下:
run
{
allocate auxiliary channel dup1 type disk;
allocate auxiliary channel dup2 type disk;
set newname for datafile 1 to '/data/nlocal/system01.dbf';
set newname for datafile 2 to '/data/nlocal/undotbs01.dbf';
set newname for datafile 3 to '/data/nlocal/indx01.dbf';
set newname for datafile 4 to '/data/nlocal/tools01.dbf';
set newname for datafile 5 to '/data/nlocal/users01.dbf';
set newname for datafile 6 to '/data/nlocal/undotbs02.dbf';
set newname for datafile 8 to '/data/nlocal/nlindx01.dbf';
set newname for datafile 9 to '/data/nlocal/nlhist01.dbf';
set newname for datafile 22 to '/data/nlocal/nlindx02.dbf';
set newname for datafile 23 to '/data/nlocal/nlindx03.dbf';
set newname for datafile 24 to '/data/nlocal/nlindx04.dbf';
set newname for datafile 25 to '/data/nlocal/nlindx05.dbf';
set newname for datafile 26 to '/data/nlocal/test01.dbf';
set newname for datafile 27 to '/data/nlocal/test02.dbf';
set newname for datafile 28 to '/data/nlocal/test03.dbf';
##The following datafiles are different position from the primary db
set newname for datafile 7 to '/arch/data/nlocal/nlocal01.dbf';
set newname for datafile 10 to '/arch/data/nlocal/nlocal02.dbf';
set newname for datafile 11 to '/arch/data/nlocal/nlocal03.dbf';
set newname for datafile 12 to '/arch/data/nlocal/nlocal04.dbf';
set newname for datafile 13 to '/arch/data/nlocal/nlocal05.dbf';
set newname for datafile 14 to '/arch/data/nlocal/nlocal06.dbf';
set newname for datafile 15 to '/arch/data/nlocal/nlocal07.dbf';
set newname for datafile 16 to '/arch/data/nlocal/nlocal08.dbf';
set newname for datafile 17 to '/arch/data/nlocal/pttion01.dbf';
set newname for datafile 18 to '/arch/data/nlocal/pttion02.dbf';
set newname for datafile 19 to '/arch/data/nlocal/pttion03.dbf';
set newname for datafile 20 to '/arch/data/nlocal/pttion04.dbf';
set newname for datafile 21 to '/arch/data/nlocal/pttion05.dbf';
#duplicate target database for standby nofilenamecheck dorecover;
duplicate target database for standby dorecover;
}
两台机器因为硬盘大小不一样,primary db已建好,建立standby db时有些datafile与primary db的路径不一样。
duplicate for standby脚本如下:
run
{
allocate auxiliary channel dup1 type disk;
allocate auxiliary channel dup2 type disk;
set newname for datafile 1 to '/data/nlocal/system01.dbf';
set newname for datafile 2 to '/data/nlocal/undotbs01.dbf';
set newname for datafile 3 to '/data/nlocal/indx01.dbf';
set newname for datafile 4 to '/data/nlocal/tools01.dbf';
set newname for datafile 5 to '/data/nlocal/users01.dbf';
set newname for datafile 6 to '/data/nlocal/undotbs02.dbf';
set newname for datafile 8 to '/data/nlocal/nlindx01.dbf';
set newname for datafile 9 to '/data/nlocal/nlhist01.dbf';
set newname for datafile 22 to '/data/nlocal/nlindx02.dbf';
set newname for datafile 23 to '/data/nlocal/nlindx03.dbf';
set newname for datafile 24 to '/data/nlocal/nlindx04.dbf';
set newname for datafile 25 to '/data/nlocal/nlindx05.dbf';
set newname for datafile 26 to '/data/nlocal/test01.dbf';
set newname for datafile 27 to '/data/nlocal/test02.dbf';
set newname for datafile 28 to '/data/nlocal/test03.dbf';
##The following datafiles are different position from the primary db
set newname for datafile 7 to '/arch/data/nlocal/nlocal01.dbf';
set newname for datafile 10 to '/arch/data/nlocal/nlocal02.dbf';
set newname for datafile 11 to '/arch/data/nlocal/nlocal03.dbf';
set newname for datafile 12 to '/arch/data/nlocal/nlocal04.dbf';
set newname for datafile 13 to '/arch/data/nlocal/nlocal05.dbf';
set newname for datafile 14 to '/arch/data/nlocal/nlocal06.dbf';
set newname for datafile 15 to '/arch/data/nlocal/nlocal07.dbf';
set newname for datafile 16 to '/arch/data/nlocal/nlocal08.dbf';
set newname for datafile 17 to '/arch/data/nlocal/pttion01.dbf';
set newname for datafile 18 to '/arch/data/nlocal/pttion02.dbf';
set newname for datafile 19 to '/arch/data/nlocal/pttion03.dbf';
set newname for datafile 20 to '/arch/data/nlocal/pttion04.dbf';
set newname for datafile 21 to '/arch/data/nlocal/pttion05.dbf';
#duplicate target database for standby nofilenamecheck dorecover;
duplicate target database for standby dorecover;
}
上面的脚本的最后两句:我试了加与不加nofilenamecheck到最后都报错。加上nofilenamecheck可以restore,只是到recover时候报错,而不加nofilenamecheck,一开始就报如下错误:
sql statement: alter database mount standby database
released channel: dup1
released channel: dup2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/07/2006 06:49:37
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /data/nlocal/test03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/test02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/test01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx05.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlhist01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/nlindx01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/undotbs02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/tools01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/indx01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/system01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary filename /data/nlocal/redo01.log conflicts with a file used by the target database
RMAN> **end-of-file**
总共有28个datafile,使用set newname for datafile 来改变datafile路径,中间有##号隔开的上下两部分路径不同,上面部分的路径与primary db是相同的,下面的路径就不一样。
如果使用了nofilenamecheck来做,restore都没有问题,到recover的时候就出错了,因为system01.dbf这个数据文件没有变更路径,还是/data/nlocal/下,但recover时却去找/arch/data/nlocal/这个路径了。
在standby db的pfile里我加了这条:db_file_name_convert=('/data/nlocal','/arch/data/nlocal')
------------------------------------------------------------------------------------------------------------------
把standby db的pfile里面的db_file_name_convert参数去掉。
现在同步都没有问题了。
现在同步都没有问题了。
我在想:db_file_name_convert去掉了,那路径不同的datafile同步会不会有问题?
我刚试着向primary db插入大量数据,standby db都能同步,暂时好象没什么问题。
------------------------------------------------------------------------------------------------------------------
standby同步现在没有问题,但检查$ORACLE_BASE/admin/udump/下的文件,
发现每6分钟就产生新的.trc文件,文件内有抱错,都是如下错误:
*** 2006-09-08 09:39:28.152
*** SESSION ID15.357) 2006-09-08 09:39:28.152
SGA initialization / DB open not complete even after 5 minutes, QMN0exiting
error 604 detected in background process
OPIRIP: Uncaught error 447. Error stack:
ORA-00447: fatal error in background process
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database not open: queries allowed on fixed tables/views only
"nlocal_qmn0_29122.trc" 23L, 896C 12,1 All
发现每6分钟就产生新的.trc文件,文件内有抱错,都是如下错误:
*** 2006-09-08 09:39:28.152
*** SESSION ID15.357) 2006-09-08 09:39:28.152
SGA initialization / DB open not complete even after 5 minutes, QMN0exiting
error 604 detected in background process
OPIRIP: Uncaught error 447. Error stack:
ORA-00447: fatal error in background process
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database not open: queries allowed on fixed tables/views only
"nlocal_qmn0_29122.trc" 23L, 896C 12,1 All
------------------------------------------------------------------------------------------------------------------
没变路径的
set newname for datafile 1 to '/data/nlocal/system01.dbf';
set newname for datafile 2 to '/data/nlocal/undotbs01.dbf';
set newname for datafile 3 to '/data/nlocal/indx01.dbf';
set newname for datafile 4 to '/data/nlocal/tools01.dbf';
set newname for datafile 5 to '/data/nlocal/users01.dbf';
set newname for datafile 6 to '/data/nlocal/undotbs02.dbf';
set newname for datafile 8 to '/data/nlocal/nlindx01.dbf';
set newname for datafile 9 to '/data/nlocal/nlhist01.dbf';
set newname for datafile 22 to '/data/nlocal/nlindx02.dbf';
set newname for datafile 23 to '/data/nlocal/nlindx03.dbf';
set newname for datafile 24 to '/data/nlocal/nlindx04.dbf';
set newname for datafile 25 to '/data/nlocal/nlindx05.dbf';
set newname for datafile 26 to '/data/nlocal/test01.dbf';
set newname for datafile 27 to '/data/nlocal/test02.dbf';
set newname for datafile 28 to '/data/nlocal/test03.dbf';
你把这些去掉,并且保留standby db的pfile里面的db_file_name_convert参数 看看
set newname for datafile 1 to '/data/nlocal/system01.dbf';
set newname for datafile 2 to '/data/nlocal/undotbs01.dbf';
set newname for datafile 3 to '/data/nlocal/indx01.dbf';
set newname for datafile 4 to '/data/nlocal/tools01.dbf';
set newname for datafile 5 to '/data/nlocal/users01.dbf';
set newname for datafile 6 to '/data/nlocal/undotbs02.dbf';
set newname for datafile 8 to '/data/nlocal/nlindx01.dbf';
set newname for datafile 9 to '/data/nlocal/nlhist01.dbf';
set newname for datafile 22 to '/data/nlocal/nlindx02.dbf';
set newname for datafile 23 to '/data/nlocal/nlindx03.dbf';
set newname for datafile 24 to '/data/nlocal/nlindx04.dbf';
set newname for datafile 25 to '/data/nlocal/nlindx05.dbf';
set newname for datafile 26 to '/data/nlocal/test01.dbf';
set newname for datafile 27 to '/data/nlocal/test02.dbf';
set newname for datafile 28 to '/data/nlocal/test03.dbf';
你把这些去掉,并且保留standby db的pfile里面的db_file_name_convert参数 看看
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13165828/viewspace-606186/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13165828/viewspace-606186/