DB:11.2.0.4
路径相同的情况下,见:http://blog.itpub.net/22621861/viewspace-1431461/
1. 为辅助数据库创建密码文件(文件名必须以orapw开头)
orapwd file=$ORACLE_HOME/dbs/orapwnewdb password=oracle1 entries=3
2. 为辅助数据库创建临时参数文件
最好从目标数据库创建然后复制过去(前提是有相同的内存大小),以下参数有必要多确认
DB_NAME=jun
DB_BLOCK_SIZE=8192
DB_RECOVERY_FILE_DEST=/oracledata/fra
DB_RECOVERY_FILE_DEST_SIZE=40G
CONTROL_FILES='/oracledata/JUN/controlfile/control01.ctl', '/oracledata/fra/JUN/controlfile/control02.ctl'
DB_FILE_NAME_CONVERT='/oradata/APR','/oracledata/JUN'
LOG_FILE_NAME_CONVERT='/oradata/APR','oracledata/JUN','/oradata/fra/APR','/oracledata/fra/JUN'
compatible=11.2.0.4.0
3. 为辅助数据库配置静态监听器
vi $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = jun)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = jun)
)
)
4. 在辅助数据库服务器上创建目录,如果没有做这一步,可能触发如下报错,表示参数中指定的目录不存在:
ORA-17628: Oracle error 19505 returned by remote Oracle server
mkdir -p /oracledata/JUN/controlfile /oracledata/fra/JUN/controlfile
mkdir -p /oracledata/JUN/datafile
5. 启动辅助数据库实例
startup nomount pfile=initjun.ora
6. 在目标数据库上使用RMAN
rman target sys/oracle@apr auxiliary sys/oracle@jun
RMAN>
run { allocate auxiliary channel a1 device type disk;
allocate auxiliary channel a2 device type disk;
allocate channel t1 type disk;
allocate channel t2 type disk;
duplicate target database to jun from active database;
}
完成!