参考:http://blog.csdn.net/tianlesoftware/article/details/6230498
11g RMAN特性在线复制,无需停机
sid:test ------> test
IP: 192.168.67.158 192.168.67.158
--配置网络(两节点都要做)
--vim lisnter.ora (静态监听)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test2)(PORT = 1521))
# (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = test)
(ORACLE_HOME =/u01/app/oracle/product/11g/db_1)
(SID_NAME = test)
)
)
--vim tnsname.ora
TEST_ST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.67.158)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = TEST)
)
)
TEST_DT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.67.159)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = TEST)
)
)
--lsnrctl status 状态为 Instance "test", status UNKNOWN
--创建备用库密码文件 orapwd file=?/dbs/orapwtest password=paladin
--创建相同的目录结构 mkdir -p /u01/app/oracle/oradata/test
--创建参数文件INITTEST 只写*.db_name='test'
--将Auxiliary启动到nomout 状态。然后进行Active Database duplicate
如果目录不同,在pfile里加如下2个参数进行转换:
db_file_name_convert
log_file_name_convert.
[oracle@test2 admin]$ rman target sys/paladin@test_st auxiliarysys/paladin@test_dt
RMAN > duplicate target database to "test" from active database nofilenamecheck;
···
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 25-JAN-13
结束