Oracle Database 11g New Feature - Backup-Based Duplication Without a Target Connection
We have Target Database name as TECH And we are creating a duplicate database using RMAN Auxiliary Instance with name as AUXDB by using the backup location but without making connection to target database but we will be accessing Recovery Catalog DB.
Note :- This practical assume you have same directory structures and it is performed on same server. Just the database name is different so we are converting the path with respect to dbname only.
- Check log_mode of Target Database. Target must be in archivelog mode. Otherwise put the database in archivelog mode.
- Now create a new database manually or via DBCA say CATDB. Then run the below command on CATDB to set this as the new Recovery Catalog for our Use.
- Connect to the newly created Recovery Catalog Via RMAN
- Now register your target database (tech) with newly created recovery catalog database (catdb)
- On Windows Platform You need to Create a new Instance for auxdb which also creates a password file for the same
- Create All the folders in Oracle Folder Structures.
- To create a pfile to start the database. You need to open a Notepad and Type db_name=auxdb and save in ORACLE_HOME\database folder and start the instance at nomount stage.
- Now run the below command to Duplicate Database without target connection but using Recovery Catalog.
- If all steps are done correctly you will have a new database clone created successfully without any connection made to target. But you need recovery manager backup for this scenario and connection to recovery catalog database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select log_mode from v$database; | |
shutdown immediate | |
startup mount | |
alter database archivelog; | |
alter database open; | |
select log_mode from v$database; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ORACLE_SID=catdb | |
sqlplus / as sysdba | |
create tablespace rman_cat_ts datafile 'c:\rman_cat_ts.dbf' size 15m; | |
create user rc_owner identified by rc_owner default tablespace rman_cat_ts quota unlimited on rman_cat_ts; | |
grant recovery_catalog_owner to rc_owner; | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rman catalog rc_owner/rc_owner@catdb | |
create catalog; | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ORACLE_SID=tech | |
rman target / catalog rc_owner/rc_owner@catdb | |
register database; | |
backup database plus archivelog; | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oradim -new -sid auxdb -syspwd admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir C:\app\akash\oradata\auxdb | |
mkdir C:\app\akash\flash_recovery_area\auxdb | |
mkdir C:\app\akash\admin\auxdb | |
mkdir C:\app\akash\admin\auxdb\adump | |
mkdir C:\app\akash\admin\auxdb\dpdump | |
mkdir C:\app\akash\admin\auxdb\pfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notepad C:\app\Akash\product\11.2.0\dbhome_1\database\initauxdb.ora | |
sqlplus / as sysdba | |
startup nomount | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Duplicating Database without target connection but using Recovery Catalog. | |
rman auxiliary sys/admin@auxdb catalog rc_owner/rc_owner@catdb | |
duplicate database tech to auxdb | |
spfile | |
parameter_value_convert 'tech','auxdb' | |
set db_file_name_convert 'tech','auxdb' | |
set log_file_name_convert 'tech','auxdb'; |
That is very interesting; you are a very skilled blogger. I have shared your website in my social networks! A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article.
ReplyDeleteEMAIL MARKETING