Create a dummy temporary instance DEVDB and restore the required tablespaces skipping all other tablespaces not required(DO NOT skip system,SYSAUX,TEMP,UNDO) during restore it will check dependencies of tablespace.
copy init parameter from existing DEVDB1 and create DEVDB dummy instance and change parameters accordingly to the required locations.
*.DB_FILE_NAME_CONVERT='/oradata/PRODDB/','/orabackup/DEVDB'
*.LOG_FILE_NAME_CONVERT='/oralogs/PRODDB/','/oralogs/DEVDB/'
*.db_create_file_dest='/orabackup/DEVDB/'
*.DB_CREATE_ONLINE_LOG_DEST_1='/orabackup/DEVDB/'
*.DB_CREATE_ONLINE_LOG_DEST_2='/orabackup/DEVDB/'
*.control_files='/orabackup/DEVDB/control01.ctl','/orabackup/DEVDB/control02.ctl'
*.db_name='DEVDB'
Add tns entries in dev server for rmancatalogdb,DEVDB,productionDB
Add listener.ora entries for dummy DB and reload.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DEVDB)
(ORACLE_HOME = /orahome/oracle/product/11.2.0.3/dbhome_1)
(SID_NAME = DEVDB)
)
)
This restore is from BACKUP_HOST=DDBOOSTSERVER
DEVDB is a dummy temp instance
$sqlplus "/ as sysdba"
SQL> startup nomount
$rman log=rmanout.log
connect catalog rman@rmancatalogdb
connect auxiliary sys@DEVDB
connect target sys@productionDB
run
{
set UNTIL TIME "to_date('02/06/2015 06:18:00','MM/DD/YYYY HH24:MI:SS')";
allocate AUXILIARY CHANNEL c1 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c2 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c3 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c4 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
}
If this is from DISK then use following.
connect catalog rman@rmancatalogdb
connect auxiliary sys@DEVDB
connect target sys@productionDB
run
{
set UNTIL TIME "to_date('02/06/2015 06:18:00','MM/DD/YYYY HH24:MI:SS')";
allocate AUXILIARY CHANNEL c1 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c2 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c3 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c4 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
}
then export the schema from dummy temp DEVDB and import into DEVDB1
Key command:
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
copy init parameter from existing DEVDB1 and create DEVDB dummy instance and change parameters accordingly to the required locations.
*.DB_FILE_NAME_CONVERT='/oradata/PRODDB/','/orabackup/DEVDB'
*.LOG_FILE_NAME_CONVERT='/oralogs/PRODDB/','/oralogs/DEVDB/'
*.db_create_file_dest='/orabackup/DEVDB/'
*.DB_CREATE_ONLINE_LOG_DEST_1='/orabackup/DEVDB/'
*.DB_CREATE_ONLINE_LOG_DEST_2='/orabackup/DEVDB/'
*.control_files='/orabackup/DEVDB/control01.ctl','/orabackup/DEVDB/control02.ctl'
*.db_name='DEVDB'
Add tns entries in dev server for rmancatalogdb,DEVDB,productionDB
Add listener.ora entries for dummy DB and reload.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DEVDB)
(ORACLE_HOME = /orahome/oracle/product/11.2.0.3/dbhome_1)
(SID_NAME = DEVDB)
)
)
This restore is from BACKUP_HOST=DDBOOSTSERVER
DEVDB is a dummy temp instance
$sqlplus "/ as sysdba"
SQL> startup nomount
$rman log=rmanout.log
connect catalog rman@rmancatalogdb
connect auxiliary sys@DEVDB
connect target sys@productionDB
run
{
set UNTIL TIME "to_date('02/06/2015 06:18:00','MM/DD/YYYY HH24:MI:SS')";
allocate AUXILIARY CHANNEL c1 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c2 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c3 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
allocate AUXILIARY CHANNEL c4 DEVICE TYPE 'SBT_TAPE' connect sys@DEVDB PARMS 'BLKSIZE=1048576,SBT_LIBRARY=/orahome/oracle/product/11.2.0.3/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=Oracle_Production,BACKUP_HOST=DDBOOSTSERVER,ORACLE_HOME=/orahome/oracle/product/11.2.0.3/dbhome_1)';
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
}
If this is from DISK then use following.
connect catalog rman@rmancatalogdb
connect auxiliary sys@DEVDB
connect target sys@productionDB
run
{
set UNTIL TIME "to_date('02/06/2015 06:18:00','MM/DD/YYYY HH24:MI:SS')";
allocate AUXILIARY CHANNEL c1 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c2 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c3 DEVICE TYPE DISK;
allocate AUXILIARY CHANNEL c4 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
}
then export the schema from dummy temp DEVDB and import into DEVDB1
Key command:
DUPLICATE TARGET DATABASE TO DEVDB skip tablespace GSGCAPPBKP_DATA,GSGCAPPBKP_INDX,GSGCPUB_DATA,GSGCPUB_INDX,GSIRAPP_DATA,GSIRAPP_INDX,USERS;
No comments:
Post a Comment