RMAN DUPLICATE from Active Database
Step 1:
Add oratab entry in Target
--------------------------
PRODDB:/app/oracle/product/12202:N
Step 2:
create password file in Target (should be same as Source)
------------------------------
orapwd file=orapwPRODDB password=test123 entries=20
Step 3:
--------------------------
PRODDB:/app/oracle/product/12202:N
Step 2:
create password file in Target (should be same as Source)
------------------------------
orapwd file=orapwPRODDB password=test123 entries=20
Step 3:
Create static listener for Target DB
-------------------------------------
LISTENER_PRODDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.16.0.5)(PORT = 1524))
))
SID_LIST_LISTENER_PRODDB =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PRODDB)
(ORACLE_HOME = /app/oracle/product/12202)
(SID_NAME = PRODDB)
)
)
-------------------------------------
LISTENER_PRODDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.16.0.5)(PORT = 1524))
))
SID_LIST_LISTENER_PRODDB =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PRODDB)
(ORACLE_HOME = /app/oracle/product/12202)
(SID_NAME = PRODDB)
)
)
Step 4:
Add TNS entry of source & target in both servers
-------------------------------------------------
PRODDB_source =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.16.0.5)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRODDB)
)
)
CLONEDB_target=
(DESCRIPTION = (ADDRESS=(PROTOCOL=tcp)(HOST=192.16.0.6)(PORT=1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRODDB)
)
)
Add TNS entry of source & target in both servers
-------------------------------------------------
PRODDB_source =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.16.0.5)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRODDB)
)
)
CLONEDB_target=
(DESCRIPTION = (ADDRESS=(PROTOCOL=tcp)(HOST=192.16.0.6)(PORT=1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRODDB)
)
)
Step 5:
Copy the pfile from source database to Target Database
-------------------------
*.compatible='12.2.0.2.0'
*.control_files='+REDO_DATA1/PRODDB/CONTROLFILE/control01.ctl','+REDO_DATA2/PRODDB/CONTROLFILE/control02.ctl'
*.db_name='PRODDB'
*.db_unique_name='PRODDB'
*.diagnostic_dest='/app/oracle'
*.sga_target=1500M
*.sga_max_size=1500M
*.log_file_name_convert=("+REDO_01","+REDO_DATA1","+REDO_02","+REDO_DATA2")
Step 6:
Brint the Target DB in NoMount stage
------------------------------------
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1577058304 bytes
Fixed Size 2924832 bytes
Variable Size 452988640 bytes
Database Buffers 1107296256 bytes
Redo Buffers 13848576 bytes
Step 7:
Do a test connection from both source and target
--------------------------------------------------
[oracle@10-119-5-201 dbs]$ sqlplus 'sys/test123@PRODDB_source as sysdba'
SQL*Plus: Release 12.2.0.2.0 Production on Wed Jan 17 14:21:41 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> exit
[oracle@10-119-5-201 dbs]$ sqlplus 'sys/test123@PRODDB_target as sysdba'
SQL*Plus: Release 12.2.0.2.0 Production on Wed Jan 17 14:22:36 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> exit
Step 8:
START RMAN:
-----------------------------------------
connect target sys/test123@PRODDB_source
connect auxiliary sys/test123@PRODDB_target
run
{
allocate channel prod1 type disk;
allocate channel prod2 type disk;
allocate channel prod3 type disk;
allocate channel prd4 type disk;
allocate auxiliary channel clone1 type disk;
allocate auxiliary channel clone2 type disk;
allocate auxiliary channel clone3 type disk;
allocate auxiliary channel clone4 type disk;
duplicate target database to PRODDB from active database nofilenamecheck;
}
exit;
Copy the pfile from source database to Target Database
-------------------------
*.compatible='12.2.0.2.0'
*.control_files='+REDO_DATA1/PRODDB/CONTROLFILE/control01.ctl','+REDO_DATA2/PRODDB/CONTROLFILE/control02.ctl'
*.db_name='PRODDB'
*.db_unique_name='PRODDB'
*.diagnostic_dest='/app/oracle'
*.sga_target=1500M
*.sga_max_size=1500M
*.log_file_name_convert=("+REDO_01","+REDO_DATA1","+REDO_02","+REDO_DATA2")
Step 6:
Brint the Target DB in NoMount stage
------------------------------------
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1577058304 bytes
Fixed Size 2924832 bytes
Variable Size 452988640 bytes
Database Buffers 1107296256 bytes
Redo Buffers 13848576 bytes
Step 7:
Do a test connection from both source and target
--------------------------------------------------
[oracle@10-119-5-201 dbs]$ sqlplus 'sys/test123@PRODDB_source as sysdba'
SQL*Plus: Release 12.2.0.2.0 Production on Wed Jan 17 14:21:41 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> exit
[oracle@10-119-5-201 dbs]$ sqlplus 'sys/test123@PRODDB_target as sysdba'
SQL*Plus: Release 12.2.0.2.0 Production on Wed Jan 17 14:22:36 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> exit
Step 8:
START RMAN:
-----------------------------------------
connect target sys/test123@PRODDB_source
connect auxiliary sys/test123@PRODDB_target
run
{
allocate channel prod1 type disk;
allocate channel prod2 type disk;
allocate channel prod3 type disk;
allocate channel prd4 type disk;
allocate auxiliary channel clone1 type disk;
allocate auxiliary channel clone2 type disk;
allocate auxiliary channel clone3 type disk;
allocate auxiliary channel clone4 type disk;
duplicate target database to PRODDB from active database nofilenamecheck;
}
exit;
Comments
Post a Comment