我的实验环境:
  - 源数据库A机:
  RHEL6.4 + Oracle 11.2.0.4
  IP地址:192.168.99.159
  db_name=oradb 数据库已正常运行
  - 复制数据库B机:
  RHEL6.4 + Oracle 11.2.0.4
  IP地址:192.168.99.191
  db_name=testdb 仅安装了数据库软件
  1.为复制数据库做准备
  2.启动辅助实例到nomount模式
  3.启动源数据库到mount或open
  4.运行RMAN DUPLICATE命令
  5.打开辅助实例
  1.为复制数据库做准备
  登录到B机,
  1.1 配置环境变量
  ORACLE_SID=testdb
  ORACLE_BASE=按实际配置
  ORACLE_HOME=按实际配置
  PATH=按实际配置
  1.2 创建密码文件
  orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=20
  1.3 创建初始化参数文件
  vi init$ORACLE_SID.ora
  db_name=testdb
  compatible='11.2.0.4.0'
  db_create_file_dest='/u01/oradata2'
  注意:
  CONTROL_FILES参数,如果未使用OMF,则需要指定。我这里使用OMF。指定 db_create_file_dest即可。
  DB_BLOCK_SIZE参数,大小必须与源库一致,如果源库设置,则也需要指定。我这里不需要。
  1.4 监听网络配置
  因为后续辅助实例启动到nomount模式远程连接,需要配置静态监听。
  cd $ORACLE_HOME/network/admin
  配置监听listener.ora
  sid_list_listener =
  (sid_list =
  (sid_desc =
  (global_dbname=testdb)
  (sid_name=testdb)
  (oracle_home=/opt/app/oracle/product/11.2.0/dbhome_1)
  )
  )
  配置tnsnames.ora
  A =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.99.159)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = oradb)
  )
  )
  B =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.99.191)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = testdb)
  )
  )
  2.启动辅助实例到nomount模式
  登录到B机,
  SQL> startup nomount
  测试连接:sqlplus as sysdba
  $ sqlplus sys/oracle@B as sysdba
  SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 5 14:33:45 2015
  Copyright (c) 1982, 2013, Oracle.  All rights reserved.
  Connected to:
  Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  With the Partitioning, Real Application Clusters, OLAP, Data Mining
  and Real Application Testing options
  SQL>
  3.启动源数据库到mount或open
  登录到A机,
  SQL> startup
  SQL> select status, instance_name from v$instance;
  STATUS       INSTANCE_NAME
  ------------ ----------------
  OPEN         oradb
  SQL> select dbid, open_mode from v$database;
  DBID OPEN_MODE
  ---------- --------------------
  2647366668 READ WRITE