今天在WINDOWS上搭建ORACLE DG时,主备库路径不一样,
比如主库为:d:\oradata\orcl,
备库:e:\oradata\orcl
于是在备库的参数中,加了:
db_file_name_convert='d:\oradata\orcl\','e:\oradata\orcl\'
log_file_name_convert='d:\oradata\orcl\','e:\oradata\orcl\'
但在执行DUPLICATE TARGET DATABASE FOR STANDBY 时,备库的数据文件没有往E:\ORADATA\ORCL写,而是往 d:\oradata\orcl写。
原因是WINDOWS下面路径转换,一定要用全路径大写,如下:
db_file_name_convert='D:\ORADATA\ORCL\','E:\ORADATA\ORCL\'
log_file_name_convert='D:\ORADATA\ORCL\','E:\ORADATA\ORCL\'
修改后,再去执行,就OK了。
。。。
内存脚本的内容:
{
set newname for tempfile 1 to
"E:\ORADATA\ORCL\TEMP01.DBF";
set newname for tempfile 2 to
"E:\ORADATA\ORCL\ZLTOOLSTMP.DBF";
switch clone tempfile all;
set newname for datafile 1 to
"E:\ORADATA\ORCL\SYSTEM01.DBF";
set newname for datafile 2 to
"E:\ORADATA\ORCL\SYSAUX01.DBF";
set newname for datafile 3 to
"E:\ORADATA\ORCL\UNDOTBS01.DBF";
set newname for datafile 4 to
"E:\ORADATA\ORCL\USERS01.DBF";
set newname for datafile 5 to
"E:\ORADATA\ORCL\EXAMPLE01.DBF";
。。。
|