Академический Документы
Профессиональный Документы
Культура Документы
info/questions/631417/replicacion-basada-en-esquema-en-oracle-
usando-data-guard
https://aprilcsims.wordpress.com/logical-standby-10gr2-open-issues/
V$LOGSTDBY
V$LOGSTDBY_STATS
V$LOGSTDBY_PROGRESS
DBA_LOGSTDBY_EVENTS
DBA_LOGSTDBY_LOG
DBA_LOGSTDBY_NOT_UNIQUE
DBA_LOGSTDBY_PARAMETERS
DBA_LOGSTDBY_PROGRESS
DBA_LOGSTDBY_SKIP
DBA_LOGSTDBY_SKIP_TRANSACTION
DBA_LOGSTDBY_UNSUPPORTED
dba_apply
EXECUTE DBMS_LOGSTDBY.BUILD;
exec DBMS_LOGSTDBY.APPLY_SET('MAX_SERVERS', 12);
exec DBMS_LOGSTDBY.APPLY_SET('MAX_SGA', 100);
exec DBMS_LOGSTDBY.APPLY_SET('TRANSACTION_CONSISTENCY', 'READ_ONLY');
exec DBMS_LOGSTDBY.APPLY_UNSET('MAX_SGA');
exec dbms_logstdby.instantiate_table('OWNER','TAB1','DBLINK3');
exec dbms_logstdby.purge_session;
exec dbms_logstdby.skip('SCHEMA_DDL','OWNER','TAB1',NULL);
exec dbms_logstdby.skip('DML','OWNER','TAB1',NULL);
exec dbms_logstdby.unskip('DML','OWNER','TAB1');
exec dbms_logstdby.skip_error('NON_SCHEMA_DDL','OWNER','%',NULL);
exec dbms_logstdby.skip_transaction(231, 4,80298);
--STANDBY
alter database recover managed standby database cancel;
--PRIMARY
execute dbms_logstdby.build;
--STANDBY
alter database recover to logical standby keep identity;
alter database open;
alter database start logical standby apply immediate;
3) Omita la replicación (DDL y DML) para un esquema completo (asumiendo que HR es
el esquema que desea omitir)
--STANDBY
alter database stop logical standby apply;
What is it?
It is version of STANDBY database that is replicated from the primary in a
different manner than a physical standby. Instead of the exact copy that a
physical standby is…a LOGICAL STANDBY is different in both the method of data
transfer and different (most likely) in that there will be some data divergence.
In some cases it may be used for failover and disaster recovery situations (with
little data divergence) but most often it is used for REPORTING and/or a
DATAWAREHOUSE.
For example, the following materialized view in the primary database will not
propogate to the LOGICAL STANDBY.
In the LOGICAL STANDBY the MV is recreated (see step 3 below running DDL on
logical).
Added a cron job to rebuild the MV nightly. The ? stands for Force.
By default, only accounts with SYS privileges can modify the database while the
database guard is set to ALL or STANDBY. If you are logged in as SYSTEM or another
privileged account, you will not be able to issue DDL statements on the logical
standby database without first bypassing the database guard for the session.
The following example shows how to stop SQL Apply, bypass the database guard,
execute SQL statements on the logical standby database, and then reenable the
guard:
4. Changes to LOGICAL APPLY settings are not preserved during database cycling
So…..I rerun the following commands after the database comes backup. Note: These
may not apply to your environment. Be sure and understand the implications of each
line before using, in other words read the docs.
execute dbms_logstdby.apply_set(‘MAX_SERVERS’,28);
–Changes the number of apply processes, I have changed this parameter up to 10 and
then back down after performance problems.
exec dbms_logstdby.apply_set(‘APPLY_SERVERS’,1);
–If you only want to keep the tables that come from the primary protected against
updates. If you don’t want any object modified then alter database guard all;
alter database guard standby;
alter database start logical standby apply immediate;