rman复制数据库实验

 

SAP TEST: Rman Duplicate Database
 
 
1.       Description
Source database: SAP standby database
Destination database: SAP report database
 
PRESTD --------------Rman----------->  RPT
 
PRESTD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.253.81.14)(PORT = 1527))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRE)
    )
  )
 
RPT =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.253.81.14)(PORT = 1523))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = RPT)
    )
  )
 
PRESTD :
ORACLE_HOME=/oracle/PRE
ORACLE USER :    orapre
 
RPT:
ORALCE_HOME=/oracle/RPT
ORACLE USER : orarpt
 
2. Rman backup source database
rman>
Run{
SQL "create pfile=''/backup/stdbak20130416/pfile.ora'' from spfile";
allocate channel d1 type disk maxpiecesize = 700m;
Backup full database format '/backup/stdbak20130416/db_%d_%s_%p_%t';
release channel d1;
allocate channel d2 type disk maxpiecesize = 500m;
Backup archivelog all format '/backup/stdbak20130416/log_%d_%s_%p_%t';
release channel d2;
backup as copy current controlfile format '/backup/stdbak20130416/control01.ctl';
}
 
 
3.       Start listener
 
4.       Startup destination database into nomount status
sql>
shutdown abort;
startup nomount pfile='/oracle/RPT/tmpbak/rpt.pfile.ora';
 
5.       Using RMAN connect source database & destination database
Command: 
rman target sys/xxx@prestd AUXILIARY sys/xxx@rpt
 
6.       Duplicate source database to destination database
rman>
duplicate target database to RPT nofilenamecheck;
 
 
7.       Check destination database
select name,log_mode,open_mode,database_role from v$database;
 
 
 
 
 
 
--------------------------------- The End -------------------------------------

 

你可能感兴趣的:(数据库,rman,同机复制)