RMAN Video Tutorial Series – Creating Duplicate and Standby database using RMAN
Posted by Kamran Agayev A. on June 25th, 2010
In this video tutorial I show creation of duplicate and standby database using RMAN. Enjoy it
To download the .mp4 version of this file, use the following link
http://www.kamranagayev.com/Video_Tutorials/Duplicate_and_Standby_database_with_RMAN.mp4
June 29th, 2010 at 2:05 pm
wonderfull video
this is good subject about RMAN
July 3rd, 2010 at 6:30 pm
Nice, to watch and learn from expert. I’ll be glad if you can post 11g RAC Installation on Linux video tutorials. I’m Starter in Oracle technologies, currently pursing OCP.
Thanks & Regards,
Danish
July 19th, 2010 at 3:29 pm
Hi,
It’s good for ppl like me who are new to DBA job.I would be more than thankful to you if you can post RMAN Backup video tutorials.
We have RAC with 2 Nodes and we have a test server with same configuration and OS(Server 2003).I want to have a back up of the Primary DB in my test server.So please help me out in the same.
July 25th, 2010 at 2:27 pm
Hi Siddiqui
You can use DUPLICATE DATABASE command or perform Disaster Recovery. For the second option, you can use the following video tutorial:
http://kamranagayev.wordpress.com/2010/03/29/rman-video-tutorial-series-performing-disaster-recovery-with-rman/
July 20th, 2010 at 4:46 pm
very very useful site for ORACLE
July 26th, 2010 at 10:49 am
Hi Kamran;
when i click the rman video links, it shows me bandwith problem;could you share this video on vimeo or dailymotion or other video sharing platform?
July 26th, 2010 at 11:09 am
Dear Fatih
I’ve already uploaded all my video tutorials to vimeo. Moreover, you can download .mp4 format of every video tutorial as well
August 4th, 2010 at 12:29 am
Thank you Kamran
I liked the presentation
September 15th, 2010 at 7:50 am
Hi Kamaran,
I need your help with installing and configuring Oracle DataGuard. Do you have a tutorial/video for that?
Tam
September 15th, 2010 at 6:58 pm
Hi Tam
I’ve created a video tutorial on Creating Standby database using RMAN. You can watch it from the following address:
http://kamranagayev.wordpress.com/2010/06/25/rman-video-tutorial-series-creating-duplicate-and-standby-database-using-rman/
September 20th, 2010 at 1:56 pm
Hai Kamran,
Hope everything is going on well at your end.
I require your help in creating a Standby DB in the same Server.
By following your video step by step I tried creating a StandBy Database,
but in the same server.
http://www.kamranagayev.com/Video_Tutorials/Duplicate_and_Standby_database_with_RMAN.mp4
From Command prompt, I opened one session for PrimDB (Open Status) And
another session for StandByDB (No Mount)
###############################################################
E:\>Set Oracle_Sid=Primdb
E:\>rman target / auxiliary Sys/pass@StndBy1
Recovery Manager: Release 10.2.0.1.0 – Production on Mon Sep 20 13:42:41 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: PrimDB (DBID=2151635270)
connected to auxiliary database: PrimDB (not mounted)
###############################################################
Everything was fine till the previous command.( as per steps in your video)
The problem came in the following command.
###############################################################
Rman > Duplicate Target Database to “PrimDB” NoFileNameCheck;
….
….
….
….
….
….
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 20-SEP-10
sql statement: CREATE CONTROLFILE REUSE SET DATABASE “PrimDB”
RESETLOGS ARCHIVELOG
MAXLOGFILES 96
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( ‘E:\STANDBY_DB\REDO\REDO01A.LOG’, ‘E:\STANDBY_DB\
REDO\REDO01B.LOG’, ‘E:\STANDBY_DB\REDO\REDO01C.LOG’ ) SIZE 50 M REUSE,
GROUP 2 ( ‘E:\STANDBY_DB\REDO\REDO02A.LOG’, ‘E:\STANDBY_DB\
REDO\REDO02B.LOG’, ‘E:\STANDBY_DB\REDO\REDO02C.LOG’ ) SIZE 50 M REUSE,
GROUP 3 ( ‘E:\STANDBY_DB\REDO\REDO03A.LOG’, ‘E:\STANDBY_DB\
REDO\REDO03B.LOG’, ‘E:\STANDBY_DB\REDO\REDO03C.LOG’ ) SIZE 50 M REUSE
DATAFILE
‘E:\STANDBY_DB\DATA\SYSTEM01.DBF’
CHARACTER SET WE8MSWIN1252
###############################################################
ERROR IS AS FOLLOWS:
###############################################################
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2010 13:44:50
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE
failed
ORA-01158: database already mounted
RMAN>
###############################################################
I dont know how the Standby database got mounted.
As the Physical StandBy DB is going to be in the same server I added few more parameters in the PFile.
################################################################################################
db_cache_size = 444596224
java_pool_size = 4194304
large_pool_size = 4194304
shared_pool_size = 150994944
streams_pool_size = 0
*.audit_file_dest = ‘E:\StandBy_DB\Admin\adump\’
*.background_dump_dest = ‘E:\StandBy_DB\Admin\bdump\’
*.core_dump_dest = ‘E:\StandBy_DB\Admin\cdump\’
*.user_dump_dest = ‘E:\StandBy_DB\Admin\udump\’
*.compatible = ‘10.2.0.1.0’
*.control_files = ‘E:\StandBy_DB\Control\Control01.ctl’
*.db_block_size = 8192
*.db_name = ‘PrimDB’
*.sga_target = 612368384
# Convert file names to allow for different directory structure.
*.db_file_name_convert = (‘F:\oracle\product\10.2.0\oradata\PrimDB\Data’, ‘E:\StandBy_DB\Data\’)
*.log_file_name_convert = (‘F:\oracle\product\10.2.0\oradata\PrimDB\REDO’, ‘E:\StandBy_DB\Redo\’)
*.db_unique_name = ‘StndBy1’
*.instance_name = ‘StndBy1’
### *.FAL_Server = PrimDB
### *.FAL_Client = StndBy1
# The following parameter is required only
# if the primary and standby databases
# are located on the same system.
*.lock_name_space = ‘StndBy1’
################################################################################################
1) I have few queries, When the Duplicate command is going to create the control file and
when the control file is not yet created by the time when the standby instance was created,
how can we add it in pFile without knowing the name of the control file?
2) How many copies of control file will be created when duplicate database is created?
3) Is there anything missing or wrong or something needs to be changed in my above StandBy PFile?
4) Should I have to do some changes in the Pfile of my Primary DB when both Primary & StandBy are in the same server?
I kindly request you to help me in this issue. Do you have any videos for creating the Physical Standby on the same server?
Thanks a lot & Regds,
Artiste.
October 16th, 2010 at 1:01 pm
Hi Kamran,
I am trying to implement duplicate database on local host using RMAN,
duplicate target database to xxxx;
but am facing RMAN-06023: no backup or copy of datafile x found to restore.
I have done following things to check if backups are available.
physically backups are available in FRA and also when i do list backup i can see the same backup pieces located at the same location(FRA).
I have done even cross check n deleted the expired backups.At last i did even catalog backuppiece.
All the above RMAN operations complete with out any errors.I am not able to figure out why RMAN is not able to find those backups while restoring.
But,when i use
duplicate target database to xxxx from active database;
works fine but if i try to use duplicate command(backup based) am facing the above error.
Please help in resolving the issue.
Thanks,
Anu.
October 19th, 2010 at 10:45 am
Dear Anu
Could you please post all output from the terminal? Post the result of the LIST BACKUP and DUPLICATE commands
October 19th, 2010 at 4:12 pm
Hi Kamran,
Thank you very much for responding to my post.
After posting here, i tried agian my luck in solving the issue.
I resolved the RMAN-06023 error and was able to clone the database on local host.
I was able to do that, by dropping n creating again a new target database.
I did that because i am not sure if this was the cause,but tried it.The archived logs are being placed at 2 destinations one is FRA and the other is in dbs folder. I deleted one of those files from dbs folder(thinking they are redundant as i was running out of space). so i guessed, may be those missing files (.dbf) are creating problem. so i dropped n created a new db and took backup and tried duplicate again and it worked.
I apologise for posting my doubt before i tried the last option.
But still am not able to figure out, if the archived logs placed in dbs folder were being used while restore, then when i run crosscheck RMAN should be give the missing backups from dbs folder as list of those expired backups.But it didn’t say anything like that. So for now i could complete duplicate but not sure of the cause. Anyway its my personal pc, so will try to delete again from dbs folder archived logs and see if i can run duplicate and succeed. If am able to replicate the issue i will send you the result of commands you asked for.
Am a newbie to Oracle and very happy to get your reply.
I really like your articles and rman videos posted by you.
Thanks,
Anu.
October 26th, 2010 at 5:35 pm
Dear Anu
I’m happy that you’ve succeeded with the first scenario
However, unless I don’t have any proove from your side (by proove I mean list of all commands) I can’t tell you anything. Actually, it should find the missing archived redo log files on dbs folder when you issue CROSSCHECK command
October 27th, 2010 at 12:59 am
Hi kamran,
Thank you.
I understand what you mean. I will try repeating the same scenario and will send you the commands and their ouputs in few days.
Thanks,
Anu.
November 30th, 2010 at 4:44 pm
Dear Kamran Sir,
Thankyou for this wonderful video.
But i am facing a small problem while implementing this.
On my secondary machine i just install the oracle software.
I am using Windows Xp SP-2 OS to perform this task.
But when i use sqlplus / as sysdba
then i am getting this error:-
ORA-12560:- TNS protocol adaptor error.
I do not understand why this is coming.
And also my listener is UP and running.
Can you please help me out to resolve this issue.
March 11th, 2011 at 8:11 pm
sir,
what is dbverify and how can be implement dbv(dbverify) in database?
March 12th, 2011 at 8:57 pm
CHeck the following link:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dbverify.htm
April 1st, 2011 at 9:30 pm
Hi Kamran,
I need your help in create a backup (and restore it) in another site in the same network.
I’m using oracle 10g and windows XP (Virtual Machines)
Thanks
April 2nd, 2011 at 11:17 am
Dear Zaman
Check my video tutorial on performing disaster recovery and don’t forget to create a windows service using ORADIM utility while starting the instance on the second machine
http://kamranagayev.wordpress.com/2010/03/29/rman-video-tutorial-series-performing-disaster-recovery-with-rman/
May 31st, 2011 at 10:31 pm
Hi Kamran .Very useful site for ORACLE.
June 22nd, 2011 at 7:08 pm
Hi Kamran,
I found many of your tutorials to be very useful. Thanks for the wonderful tutorials.
I have a case where i need to clone my existing oracle DB server VM’s in ESX.
My existing DB Server is in Windows2003 and all the instances are running fine.
After cloning some of the services does not seem to start. Please let me know how should i proceed.
Do i have to follow the same methods after cloning? using RMAN.
regards,
Subbu
June 23rd, 2011 at 9:03 am
Dear Subbu
About what service you’re talking about? When you clone the database on Windows OS, you need to create a windows service using ORADIM utility
June 23rd, 2011 at 10:43 pm
Hi Kamran,
Thanks for the reply. The services which i referred were the listener and tns names. Even though i change the listener file the service doesn’t listen after vm cloning.
June 25th, 2011 at 1:53 am
And what error you get?
July 20th, 2011 at 11:45 am
hi kamran,
i tried to install standby database on vmware . I followed all the steps and when i fire “duplicate target databse to “test” nofilenamecheck” command i got error which says oracle not available at auxiliary database.
Starting duplicate db at 19-july-11
Using target databse control file instead of recovery catalog
RMAN-00571:————————————————————————————————–
RMAN-00569:—————error message stacks follows———————————————-
RMAN-00571:—————————————————————————————————
RMAN-03002: failure of duplicate db command at 07/19/2011 12:27:25
RMAN-06403: could not obtain a fully authorized session
RMAN-04006:error from auxiliary database:ora-01034: oracle not avialable
and i already check all the steps so many times.plz help me
thanks in advance
July 22nd, 2011 at 5:06 pm
Dear Rajesh
You need to start auxiliary instance in NOMOUNT mode
July 23rd, 2011 at 6:26 pm
hi kamran……….
i did that still getting the same error………..
better i explain all the steps which i have done….
1-i have created two virtual m/c.
2-installed linux 5.4 on them and oracle 10g on both m/c.
3checked the connectivity on them.
4– create database by using dbca on primary and i didnot create any database on standby m/c
5– create a password file like you described on this very video.
6–start listener on stanby m/c and make the necessary changes in the tns of primary.
7-made all the necessary folders
8-took backup of primary by RMAN and copy them to stanby m/c.
9-create spfile from pfile on standby m/c
10- startup the standby m/c in nomount mode
11- went to primary and connect auxiliary database through RMAN same like you did in the video
12- then duplicate target database to test nofilenamecheck; n i got that error……….
I have no idea what mistake i made but i am getting that error again and again.
kamran i really appreciate you for your time but please help me.
thanks..
rajesh
July 24th, 2011 at 6:31 pm
hi kamran
The previous error has been solved but when i fire the duplicate target database to “test” nofilenamecheck……….I stuck at some point in the end…….
contents of memory script:
{
shutdown clone;
startup clone nomount;
}
executing memory script
it stucked over here for more than 3 hours and after that i got duplicate db command fail..
n size of database is only 600mb
please help me on that
thanks in advance
rajesh
July 25th, 2011 at 9:41 am
Check your alert.log file
July 27th, 2011 at 2:55 pm
OUTPUT of primary m/c alert log*****************************************
Tue Jul 26 19:06:49 2011
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=17, OS id=8525
Tue Jul 26 19:06:49 2011
ARC0: STARTING ARCH PROCESSES
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the ‘no FAL’ ARCH
ARC0: Becoming the ‘no SRL’ ARCH
ARC2 started with pid=18, OS id=8533
Tue Jul 26 19:06:49 2011
ARC1: Becoming the heartbeat ARCH
Tue Jul 26 19:06:49 2011
Thread 1 opened at log sequence 2
Current log# 1 seq# 2 mem# 0: /u01/app/oracle/oradata/test/redo01.log
Successful open of redo thread 1
Tue Jul 26 19:06:49 2011
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Successfully onlined Undo Tablespace 1.
Tue Jul 26 19:06:49 2011
SMON: enabling cache recovery
SMON: enabling tx recovery
Tue Jul 26 19:06:49 2011
Database Characterset is WE8ISO8859P1
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=19, OS id=8535
Tue Jul 26 19:06:51 2011
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Tue Jul 26 19:06:51 2011
Completed: alter database open
Tue Jul 26 19:08:08 2011
Thread 1 advanced to log sequence 3
Current log# 2 seq# 3 mem# 0: /u01/app/oracle/oradata/test/redo02.log
Tue Jul 26 19:09:21 2011
Errors in file /u01/app/oracle/admin/test/udump/test_ora_8613.trc:
Tue Jul 26 19:09:21 2011
Errors in file /u01/app/oracle/admin/test/udump/test_ora_8613.trc:
Tue Jul 26 19:09:21 2011
Errors in file /u01/app/oracle/admin/test/udump/test_ora_8613.trc:
Tue Jul 26 19:09:22 2011
Thread 1 advanced to log sequence 4
Current log# 3 seq# 4 mem# 0: /u01/app/oracle/oradata/test/redo03.log
Tue Jul 26 19:15:58 2011
Shutting down archive processes
Tue Jul 26 19:16:05 2011
ARCH shutting down
ARC2: Archival stopped
Wed Jul 27 02:29:26 2011
MMNL absent for 21414 secs; Foregrounds taking over
*****************8***********************************************
***************************************8*8888888888888*
output of alert log at standby m/c
Tue Jul 26 19:20:10 2011
Archivelog restore complete. Elapsed time: 0:00:00
Tue Jul 26 19:20:11 2011
alter database recover logfile ‘/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_3_757536684.dbf’
Tue Jul 26 19:20:11 2011
Media Recovery Log /u01/app/oracle/product/10.2.0/db_1/dbs/arch1_3_757536684.dbf
Tue Jul 26 19:20:12 2011
Incomplete Recovery applied until change 479453
Tue Jul 26 19:20:12 2011
Media Recovery Complete (test)
Completed: alter database recover logfile ‘/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_3_757536684.dbf’
Shutting down instance: further logons disabled
Tue Jul 26 19:20:16 2011
Stopping background process MMNL
Tue Jul 26 19:20:18 2011
Stopping background process MMON
Tue Jul 26 19:20:19 2011
Shutting down instance (normal)
License high water mark = 4
Tue Jul 26 19:27:52 2011
Active process 5160 user ‘oracle’ program ‘oracle@localhost.localdomain (TNS V1-V3)’
SHUTDOWN: waiting for logins to complete.
Wed Jul 27 02:52:12 2011
SHUTDOWN: Active sessions prevent database close operation
*******************
my flash_recovery_area is 2gb n tmp is only 41% used
please help me ….i m completely newbie for oracle
thanks in advance
rajesh
August 21st, 2011 at 1:13 pm
Hi Kamran,
I have followed the same steps but when i try to duplicate i am getting the error
RMAN> duplicate target database to “orcl” nofilenamecheck;
Starting Duplicate Db at 19-AUG-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=35 devtype=DISK
contents of Memory Script:
{
set until scn 478215;
set newname for datafile 1 to
“/u01/app/oracle/oradata/orcl/system01.dbf”;
set newname for datafile 2 to
“/u01/app/oracle/oradata/orcl/undotbs01.dbf”;
set newname for datafile 3 to
“/u01/app/oracle/oradata/orcl/sysaux01.dbf”;
set newname for datafile 4 to
“/u01/app/oracle/oradata/orcl/users01.dbf”;
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 19-AUG-11
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp
ORA-19505: failed to identify file “/u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp”
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
failover to previous backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/19/2011 11:25:49
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found – aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
11:38 AM after is fine until restoring….but this part is wrong
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp
ORA-19505: failed to identify file “/u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_08_14/o1_mf_nnndf_TAG20110814T142326_74h38807_.bkp”
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
I am following same instruction as in video..please help me how to i fix this
August 29th, 2012 at 9:26 am
is this video suitable to create standby database on standard edition….
September 14th, 2012 at 5:13 am
Unfortunately not
As it’s written in the metalink note (305360.1):
Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Standard Edition.
Check the following note for more detail:
Data Guard and Oracle Standard Edition [ID 305360.1]
March 14th, 2013 at 2:09 pm
Hi Kamran Sir
I had followd the steps mentioned in the Video. But
My configuration as follows
VMWARE Work station 8, 4GB system RAM
Oracle 11g R2 11.2.0.1.0 on
OEL Linux 5.4
I am stucked at RMAN-06024: no backup or copy of the control file found to restore . Please look into it.