For 11g databases you need to create a temporary listener with a different port on the target server or else it will show blocked status when database is started at nomount
Source and Target :
test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.1.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
testx =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.1.2)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testx)
)
)
Source:
create pfile from spfile;
alter user sys identified by "password" account unlock;
orapwd file=orapwtest password=password entries=5
scp inittest.ora oracle@10.120.1.2:/opt/app/oracle/product/11.2.0/11.2.0.4/dbs/inittestx.ora
scp orapwtest oracle@10.120.1.2:/opt/app/oracle/product/11.2.0/11.2.0.4/dbs/orapwtestx
Target:
Modify pfile
*.LOG_ARCHIVE_DEST_1='LOCATION=+REDO'
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+REDO'
*.control_files='+DATA/testx/controlfile/control01.ctl','+REDO/testx/controlfile/control02.ctl'
*.audit_file_dest='/opt/app/oracle/admin/testx/adump'
*.diagnostic_dest='/opt/app/oracle'
create directories as per pfile
mkdir -p /opt/app/oracle/admin/testx/adump
Target:
startup nomount
Source :
rman target sys/password@test auxiliary sys/password@testx
duplicate target database to testx from active database;
Source and Target :
test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.1.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
testx =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.1.2)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testx)
)
)
Source:
create pfile from spfile;
alter user sys identified by "password" account unlock;
orapwd file=orapwtest password=password entries=5
scp inittest.ora oracle@10.120.1.2:/opt/app/oracle/product/11.2.0/11.2.0.4/dbs/inittestx.ora
scp orapwtest oracle@10.120.1.2:/opt/app/oracle/product/11.2.0/11.2.0.4/dbs/orapwtestx
Target:
Modify pfile
*.LOG_ARCHIVE_DEST_1='LOCATION=+REDO'
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+REDO'
*.control_files='+DATA/testx/controlfile/control01.ctl','+REDO/testx/controlfile/control02.ctl'
*.audit_file_dest='/opt/app/oracle/admin/testx/adump'
*.diagnostic_dest='/opt/app/oracle'
create directories as per pfile
mkdir -p /opt/app/oracle/admin/testx/adump
Target:
startup nomount
Source :
rman target sys/password@test auxiliary sys/password@testx
duplicate target database to testx from active database;
No comments:
Post a Comment