What is the standard time delay taken for the data to get reflected in standby database when a new data is inserted in primary database

dba.stackexchange https://dba.stackexchange.com/questions/176995

سؤال

I've configured Data guard setup using data broker. When I'm inserting new data to the tables in primary database which is suppose to reflect in standby database. When I checked those data's in standby database it was not reflected there. So, I've restarted the database and opened it in read only. I've used the below command to avoid the delay:

SQL> alter database recover managed standby database nodelay disconnect from session;

But still a lot of time is taken to get reflected there in standby database.

What will be the time delay taken to get the data's from primary to standby?

Is this the standard time delay taken for a data to get reflected in standby database. Or do I have missed anything there in configuration.

Is there any way to sort it out?

هل كانت مفيدة؟

المحلول

I think what you want is real time apply, but for that, you'll have to create standby redo logs on your standby database first. As a side note, to make role transitions easier, it is considered best practice to create standby redo logs on your primary database as well:

The standby redo logs should be the same size as your redo logs and you need at least 1 more group of standby logs than redo logs:

I use the following script on the primary database, which builds that create statements for the standby redo logs that I then run on the standby database:

select 'alter database add standby logfile group ' || 
to_number((select count(*) from v$log) + rownum) || '(''T:\ORACLE\STANDBYREDO\REDO0' || 
to_number((select count(*) from v$log) + rownum) || '.LOG'') SIZE ' || 
(select max( bytes/1024/1024) from v$log) || 'M;' as standbyredo
from v$log
union all
select 'alter database add standby logfile group ' || 
((select max(group#) from v$log) + (select count(*) from v$log) + 1) || '(''T:\ORACLE\STANDBYREDO\REDO0' || 
((select max(group#) from v$log) + (select count(*) from v$log) + 1) || '.LOG'') SIZE ' || 
(select max( bytes/1024/1024) from v$log) || 'M;' 
from dual;

After the standby logs are present on the standby database, to start real time apply, you need to include the using current logfile phrase in your recover command:

SQL> alter database recover managed standby database using current logfile disconnect from session;

During shipping and apply, you can check to verify that the standby logs are being used by querying v$standby_log on your standby database:

select * from v$standby_log;

I found Tim Hall's guide on Standby Databases invaluable when I was learning how to setup a physical standby.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top