If you guys are configuring a single instance standby for a RAC production database, remember: You have to use "set CLUSTER_DATABASE='FALSE'" in duplicate database command.
Ahmed sir, this is one of the best video I could find for data guard setup, Thank you so much for this. I have a small query: The tutorial here is using ASM database and have following section: "We are using ASM, so the directories under ASM diskgroups should also be created: su - grid asmcmd cd DATA mkdir ORADB_S2 mkdir ORADB" My question is: If we are using Database without ASM, then can we skip that step? And are there any other change in steps mentioned? Thanks in advance.
Hi Ahmed, Very nice video, great explanation on how to setup a Physical Standby for a Non-CDB database. One question, is it possible to setup Data Guard between a Non-CDB Primary Database and a standby in a PDB ? Also, How do you switchover the instances ? Would you have to configure DG Broker to do so ?
Hello Ahmed Baraka, I am very happy with the oracle videos on your youtube channel, I have something to do with you, I would like you to take a course on fundamental SQL
hi sir, it is very nice and informative for me. many thanks to u I have oracle virtual box 5. can u please share me the link for downloading oracle asm appliances to get installed oracle database with asm instance
Dataguard doesn't work for my site. It would take weeks to switch all the systems to point to the new location. I wish there was a solution that can redirect all connections to a new instance.
Ahmed, Why do you delete that multiplexed standby redo files? Just to free space? In my production scenario I have a 2 Node RAC, using 8 redo groups. which should use (8+1)*2=18 files, so 36 after multiplexing.
Ahmed, everything was going well, but the command "alter database flashback on;" after "alter database recover managed standby database cancel;" does not work. It results the following error: SQL> alter database flashback on; alter database flashback on * ERROR at line 1: ORA-38706: Cannot turn on FLASHBACK DATABASE logging. ORA-38788: More standby database recovery is needed Do you know why? The duplicate command completed with no errors and the apply process seems to be stopped, as you suggested. I finished the instructions bypassing that step, why do you need to have flashback enabled on the standby database? btw, i bought your course, that seems to be very good. (I just started)
Hello Ahmed, thank you for your video! I would like to ask you something.. How do you determine appropriately the number of standby redo log file groups in a RAC scenario? I have a 2 nodes RAC database which I want to configure a single node Data Guard "backup" instance for. I've tried to configure a physical standby database using the Oracle Enterprise Manager CC 13c, but unfortunately it does not work, have you ever configured a standby database using EM 13c? Does it require additional steps than just clicking on "Configure a standby database", and then following that simple wizard? I've noticed you have a course about that on udemy, I am thinking about buying that, but my environment is all based on Oracle Linux 7 + Oracle Database 12c + RAC, do you think your course would help me?
Regarding the number of standby redo log file group, use the following formula: (number of redo log groups on the primary database + 1) * maximum number of threads So, in your case, if you have three redo groups in the primary database, you need (3+1)*2 = 8 standby redo groups. The course environment is based on Linux 6.7 and Oracle 12c single instance with ASM. I am not sure to what extent you know about Oracle Data Guard, but if you know the fundamentals, then you may not need to register. Still,if you are interested, email me and I'll offer the course for you for only $15. Good luck!
I have 2 questions: > 8.1 Configure ARCHIVELOG DELETION POLICY in RMAN in both systems rman target / CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY; ------> Will it delete the archivelogs from the system or will it just make the archivelogs obsolete and we need to fire Rman "Delete obsolete"' to actually delete the archivelogs. >8.4 Register the standby database in the Oracle Restart: srvctl add database -db ORADB_S2 -instance ORADB_S2 -oraclehome /u01/app/oracle/product/12.1.0/db_1 -startoption MOUNT -stopoption IMMEDIATE -policy AUTOMATIC - role physical_standby -spfile /u01/app/oracle/product/12.1.0/db_1/dbs/spfileORADB_S2.ora ------> Why is the spfile location Local , can this be changed to +DATA
do we need to have both the primary and the standy on the same patch set level ? how about creating RAC to RAC data guard broker managed ? it will be great , thanks
RAC to RAC is a configuration that requires having to RACs running. It needs some resources but I've prepared the hardware and it's in my future intention to try it.
You can use the V$SQLAREA and V$TRANSACTION dynamic performance views: SELECT sql.sql_text, SUM(txn.xidusn) redo_size FROM v$sqlarea sql, v$transaction txn WHERE sql.address = txn.sqladdr GROUP BY sql.sql_text ORDER BY SUM(txn.xidusn) DESC; You can also use the LogMiner utility to analyze the redo logs and identify the SQL statements that generated the most redo archive log.
Can you share please the passwords for oracle,grid and root to use the appliance ? i downloaded it however unable to use due to not having passwords :( I have also sent email regarding the same in the contact form of the site..
If you guys are configuring a single instance standby for a RAC production database, remember: You have to use "set CLUSTER_DATABASE='FALSE'" in duplicate database command.
perfect you are a great gentleman, gods keep your health, and still a big thank you.
Amazing.. thanks very much Ahmed.. Indeed helpful for a beginner....
This tutorial was very helpful to me. thanks Amhed.
Good Tutorial Ahmed:)
Thank you @
Ahmed Baraka
Very useful
Ahmed sir, this is one of the best video I could find for data guard setup, Thank you so much for this.
I have a small query: The tutorial here is using ASM database and have following section:
"We are using ASM, so the directories under ASM diskgroups should also be created:
su - grid
asmcmd
cd DATA
mkdir ORADB_S2
mkdir ORADB"
My question is: If we are using Database without ASM, then can we skip that step? And are there any other change in steps mentioned? Thanks in advance.
The step should be implemented, but the directories will be created in file system.
لو عندك فيديو بدون asm اكون ممنونك
Hi Ahmed, Very nice video, great explanation on how to setup a Physical Standby for a Non-CDB database. One question, is it possible to setup Data Guard between a Non-CDB Primary Database and a standby in a PDB ? Also, How do you switchover the instances ? Would you have to configure DG Broker to do so ?
Not possible no.
thank you sir ,,, to make it on 19c with Dataguard broker
Thanks a lot sir
Hello Ahmed Baraka, I am very happy with the oracle videos on your youtube channel, I have something to do with you, I would like you to take a course on fundamental SQL
You will find plenty of videos and courses on SQL fundamentals. Good luck!
hi sir, it is very nice and informative for me. many thanks to u
I have oracle virtual box 5. can u please share me the link for downloading oracle asm appliances to get installed oracle database with asm instance
Dataguard doesn't work for my site. It would take weeks to switch all the systems to point to the new location. I wish there was a solution that can redirect all connections to a new instance.
good video for me
Thank you.
Ahmed, Why do you delete that multiplexed standby redo files? Just to free space? In my production scenario I have a 2 Node RAC, using 8 redo groups. which should use (8+1)*2=18 files, so 36 after multiplexing.
Deleting the multiplexed standby redo files is an agreed best practice among the DBAs. Some issues have been reported because of them.
Ahmed, everything was going well, but the command "alter database flashback on;" after "alter database recover managed standby database cancel;" does not work. It results the following error:
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38788: More standby database recovery is needed
Do you know why? The duplicate command completed with no errors and the apply process seems to be stopped, as you suggested.
I finished the instructions bypassing that step, why do you need to have flashback enabled on the standby database?
btw, i bought your course, that seems to be very good. (I just started)
Awesome presentation clarity. TU. Anywhere to download iso for vmware ?
You can download from Oracle website
Hello Ahmed, thank you for your video!
I would like to ask you something..
How do you determine appropriately the number of standby redo log file groups in a RAC scenario? I have a 2 nodes RAC database which I want to configure a single node Data Guard "backup" instance for.
I've tried to configure a physical standby database using the Oracle Enterprise Manager CC 13c, but unfortunately it does not work, have you ever configured a standby database using EM 13c? Does it require additional steps than just clicking on "Configure a standby database", and then following that simple wizard?
I've noticed you have a course about that on udemy, I am thinking about buying that, but my environment is all based on Oracle Linux 7 + Oracle Database 12c + RAC, do you think your course would help me?
Regarding the number of standby redo log file group, use the following formula: (number of redo log groups on the primary database + 1) * maximum number of threads
So, in your case, if you have three redo groups in the primary database, you need (3+1)*2 = 8 standby redo groups.
The course environment is based on Linux 6.7 and Oracle 12c single instance with ASM. I am not sure to what extent you know about Oracle Data Guard, but if you know the fundamentals, then you may not need to register.
Still,if you are interested, email me and I'll offer the course for you for only $15.
Good luck!
I have 2 questions:
> 8.1 Configure ARCHIVELOG DELETION POLICY in RMAN in both systems
rman target /
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
------> Will it delete the archivelogs from the system or will it just make the archivelogs obsolete and we need to fire Rman "Delete obsolete"' to actually delete the archivelogs.
>8.4 Register the standby database in the Oracle Restart:
srvctl add database -db ORADB_S2 -instance ORADB_S2 -oraclehome
/u01/app/oracle/product/12.1.0/db_1 -startoption MOUNT -stopoption IMMEDIATE -policy AUTOMATIC -
role physical_standby -spfile /u01/app/oracle/product/12.1.0/db_1/dbs/spfileORADB_S2.ora
------> Why is the spfile location Local , can this be changed to +DATA
- it just marks the archivelogs for deletion
- yes you can save SPFILE in ASM diskgroup
do we need to have both the primary and the standy on the same patch set level ? how about creating RAC to RAC data guard broker managed ? it will be great , thanks
RAC to RAC is a configuration that requires having to RACs running. It needs some resources but I've prepared the hardware and it's in my future intention to try it.
Hello,
How to find query generating more redo/archive log in Oracle database?
Thanks
You can use the V$SQLAREA and V$TRANSACTION dynamic performance views:
SELECT sql.sql_text, SUM(txn.xidusn) redo_size
FROM v$sqlarea sql, v$transaction txn
WHERE sql.address = txn.sqladdr
GROUP BY sql.sql_text
ORDER BY SUM(txn.xidusn) DESC;
You can also use the LogMiner utility to analyze the redo logs and identify the SQL statements that generated the most redo archive log.
@@AhmedBarakaDBA
Great.
Thanks
@@AhmedBarakaDBA
This query did not work for , can you please check this again.
Thanks
Is Primary db and Standby can use same DB name?
Yes. Actually, they do use the same DB name.
Can you share please the passwords for oracle,grid and root to use the appliance ? i downloaded it however unable to use due to not having passwords :( I have also sent email regarding the same in the contact form of the site..
They are provided in the readme file. The file is available in the page where you downloaded the VM. Thanks!
Hi Ahmed Braka!. What is your email or chat ?
Hi, my contact information is there on www.ahmedbaraka.com
Thanks!
Sent you email via contact form. :)