Escolar Documentos
Profissional Documentos
Cultura Documentos
ngel Freire R.
Oracle Consultant
11-09-2014
High Availability
avanttic
Consultora tecnolgica
avanttic
1.
Confidence
2.
Recoverability
3.
4.
Continuity of Operations
Consultora tecnolgica
avanttic
1.
2.
3.
4.
5.
6.
Consultora tecnolgica
avanttic
1.
2.
3.
Layer 3 (BI)
Consultora tecnolgica
avanttic
1.
2.
3.
4.
5.
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Planned outages
avanttic
Consultora tecnolgica
No Planned outages
avanttic
Computer Failures -> Oracle Real Application Clusters and Oracle Clusterware
Storage Failures -> RMAN with Fast Recovery Area and Oracle Secure Backup
Data Corruption -> Oracle Exadata Storage Server Software (Exadata Cell) and Oracle ASM Data
Data Corruption -> Data Recovery Advisor and RMAN with Fast Recovery Area
Consultora tecnolgica
No Planned outages
avanttic
LogMiner
Lost writes -> Oracle Data Guard, RMAN, DB_LOST_WRITE_PROTECT
Lost writes -> Oracle Data Guard Oracle Exadata Storage Server Software (Exadata Cell)
Consultora tecnolgica
avanttic
Consultora tecnolgica
LogMiner Configuration
Log Miner Support for Index-Organized Tables
LogMiner Support for More Types: LONG, Multibyte CLOB and NCLOB
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Configurations
avanttic
Consultora tecnolgica
Services
Redo Transport Services
Apply Services
Role Transitions
avanttic
Consultora tecnolgica
Role Transitions
Switchover
Switchback
Failover
Reinstate
Convert
avanttic
Consultora tecnolgica
Interfaces
Enterprise Manager / Grid Control
DGMGRL
SQL*Plus
Initialization Parameters
avanttic
Consultora tecnolgica
Complementary Technologies
Oracle RAC
Flashback Database
RMAN
avanttic
Consultora tecnolgica
Disadvantage
Increased complexity of the environment.
Higher cost of Licensing.
Higher cost of Hardware.
Higher cost of knowledge.
avanttic
Consultora tecnolgica
Physical Standby
avanttic
Consultora tecnolgica
Advantage
Protection against disasters.
Data protection.
Load Reduction of production (RMAN, SQL Read Only).
Low impact on production.
Disadvantages
avanttic
Consultora tecnolgica
Parameters
COMPATIBLE (Todos)
CONTROL_FILE_RECORD_KEEP_TIME (Todos)
CONTROL_FILES (Todos)
DB_FILE_NAME_CONVERT (Physical Standby, Snapshot Standby)
DB_UNIQUE_NAME (Todos)
FAL_CLIENT (Physical Standby, Snapshot Standby) Obsolete
FAL_SERVER (Physical Standby, Snapshot Standby)
INSTANCE_NAME (Todos)
LOG_ARCHIVE_CONFIG (Todos)
LOG_ARCHIVE_DEST_n (Todos)
LOG_ARCHIVE_DEST_STATE_n (Todos) ENABLE, DEFER or ALTERNATE.
LOG_ARCHIVE_FORMAT (Todos)
LOG_ARCHIVE_LOCAL_FIRST (Primary, Snapshot Standby) Obsolete
LOG_ARCHIVE_MAX_PROCESSES (Todos)
LOG_ARCHIVE_MIN_SUCCEED_DEST (Todos)
LOG_ARCHIVE_TRACE (Todos)
LOG_FILE_NAME_CONVERT (Physical Standby, Logical tandby, Snapshot Standby)
REMOTE_LOGIN_PASSWORDFILE (Todos)
SHARED_POOL_SIZE (Todos)
STANDBY_ARCHIVE_DEST (Physical Standby, Logical Standby, Snapshot Standby) Obsolete
avanttic
Consultora tecnolgica
LOG_ARCHIVE_DEST_n
avanttic
AFFIRM / NOAFFIRM
ALTERNATE
COMPRESSION
DB_UNIQUE_NAME
DELAY
LOCATION and SERVICE
MANDATORY
MAX_CONNECTIONS
MAX_FAILURE
NET_TIMEOUT
NOREGISTER
REOPEN
SYNC / ASYNC
TEMPLATE
VALID_FOR
Consultora tecnolgica
Protection Mode
avanttic
Consultora tecnolgica
Protection Mode
Maximum Performance (NOAFFIRM, ASYNC)
Maximum Availability (AFFIRM, SYNC)
Maximum Protection (AFFIRM, SYNC)
avanttic
Consultora tecnolgica
Maximum Performance
Maximum performance mode is the default level of data protection.
This mode provides the highest possible level of data protection without affecting the
performance of the primary database.
Transactions can commit as soon as the redo data is written to the local online redo log.
Redo data is shipped to the standby database asynchronously with respect to the
commitment of the transactions that create the redo data.
Configuration requirements:
Standby redo log on at least one standby database
At least one standby database that is configured with the ASYNC and NOAFFIRM redo
transport attributes
Maximum Performance Mode Maximum performance is the default protection mode and provides the
highest possible level of data protection without affecting the performance of the primary database.
This is accomplished by allowing a transaction to commit as soon as the redo data needed to recover
that transaction is written to the local online redo log. The primary databases redo data is also written
to at least one standby database, but that redo data is written asynchronously with respect to the
commitment of the transactions that create the redo data. When network links with sufficient bandwidth
are used, this mode provides a level of data protection that approaches that of maximum availability
mode with minimal impact on primary database performance. Maximum performance mode
requirement: Set the ASYNC and NOAFFIRM redo transport attributes of the LOG_ARCHIVE_DEST_
n parameter on at least one standby database.
avanttic
Consultora tecnolgica
Maximum Availability
Maximum availability mode ensures zero data loss without
compromising the availability of the primary database.
Redo data must be written to both the local online redo log and
the standby redo log on at least one synchronized standby
database.
The primary database does not shut down if it cannot write to
at least one synchronized standby database.
If no synchronized standby databases are available, the
primary database operates in an unsynchronized mode until at
least one standby database is synchronized.
Configuration requirements: At least one standby database
must have a standby redo log, and that standby database
destination must be configured with the SYNC and AFFIRM
redo transport attributes.
avanttic
Consultora tecnolgica
Maximum Availability
Maximum Availability Mode This protection mode provides the highest possible level of data
protection without compromising the availability of the primary database. A transaction does not
commit until the redo that is needed to recover that transaction is written to the local online redo
log and to at least one remote standby redo log. The primary database does not shut down if a
fault prevents it from writing its redo stream to a remote standby redo log. Instead, the primary
database operates in an unsynchronized mode until the fault is corrected and all gaps in redo log
files are resolved. When all gaps are resolved and the standby database is synchronized, the
primary database automatically resumes operating in maximum availability mode. This mode
guarantees that no data loss occurs if the primary database failsbut only if a second fault does
not prevent a complete set of redo data from being sent from the primary database to at least
one standby database. Maximum availability mode requirements:
Configure standby redo log files on at least one standby database.
Set the SYNC and AFFIRM attributes of the LOG_ARCHIVE_DEST_n parameter for at least
one standby database.
avanttic
Consultora tecnolgica
Maximum Protection
Maximum protection mode ensures zero data loss in the event of a
failure of the primary database, the network, or all standby databases.
The primary database shuts down if a fault prevents it from writing its
redo stream to at least one synchronized standby database.
Redo data must be written to both the local online redo log and the
standby redo log on at least one synchronized standby database.
Configuration requirements: At least one standby database must have
a standby redo log, and that standby database destination must be
configured with the SYNC and AFFIRM redo transport attributes.
Maximum Protection Mode This protection mode ensures that no data loss occurs if the primary database
fails. To provide this level of protection, the redo data that is needed to recover each transaction must be
written to both the local online redo log and the standby redo log on at least one standby database before the
transaction commits. To ensure that data loss cannot occur, the primary database shuts down if a fault prevents
it from writing its redo stream to at least one remote standby redo log. For multiple-instance RAC databases,
Data Guard shuts down the primary database if it is unable to write the redo records to at least one properly
configured database instance. Maximum protection mode requirements:
Configure standby redo log files on at least one standby database.
Set the SYNC and AFFIRM attributes of the LOG_ARCHIVE_DEST_n parameter for at least one standby
database destination.
Note: Oracle recommends a minimum of two standby databases for maximum protection mode.
avanttic
Consultora tecnolgica
Role Transitions
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Switchover
Transitions the roles of the primary and standby databases
Requires no resetting of the online redo logs of the new primary database
Incurs no data loss
A switchover operation transitions the primary database to the standby role and transitions the standby
database to the primary role, without resetting the online redo logs of the new primary database. The primary
database at the start of a switchover operation will need to be shutdown and restarted. The physical standby
database is not shutdown and restarted during a switchover. If the physical standby database is in the Active
Data Guard mode, it is closed for the transition then opened again after the switchover completes, but it is
never totally shutdown to require a restart. If the switchover operation involves a logical standby database,
there is no need to shut down and restart either the primary database or any of the standby databases. Logical
standby databases do not need to be shut down and restarted.
Note: When necessary, the broker automatically starts and stops all but one instance in a Real Application
Clusters (RAC) environment for the primary database. If the broker is not used, this must be done manually.
Starting with Oracle Database 11g Release 2 (11.2), the secondary RAC instances of a physical standby
database no longer need to be shutdown during the switchover. They can stay in the mounted or Active Data
Guard state. The primary still requires only one instance be running during a switchover.
avanttic
Consultora tecnolgica
Switchover
avanttic
Consultora tecnolgica
Switchover
avanttic
Consultora tecnolgica
Failover
avanttic
Consultora tecnolgica
Types of Failovers
Manual failover: Invoked by the DBA
Complete: Attempts to minimize data loss by applying all available redo
on the standby database
Immediate: No additional data is applied on the Standby database
Fast-start failover: Invoked automatically by the Data Guard broker
Types of Failovers A manual failover is invoked through DGMGRL or Enterprise Manager. There are two
types of manual failover:
Complete: The maximum amount of redo data for the protection mode is recovered. In this type of failover,
the broker avoids disabling any standby databases that are not the failover target. Complete failover is the
default and recommended type of failover.
Immediate: No additional redo data is applied to the standby database after the failover is invoked. This is
the fastest type of failover. After an immediate failover, you must recreate or reinstate the original primary
database and all standby databases that were not a target of the failover.
Note: You should always try to perform a complete failover. Perform an immediate failover only when a
complete failover is unsuccessful. Depending on the destination attributes of redo transport services, a
complete failover can take place without incurring any data loss, while an immediate failover usually results in
the loss of data. You can configure fast-start failover so that the broker automatically fails over to a chosen
standby database in the event of the loss of the primary database. For details, see the lesson titled Enabling
Fast-Start Failover.
avanttic
Consultora tecnolgica
Failover Considerations
The old primary database is disabled from the Data Guard configuration.
Data loss is possible.
Failover should be used only in an emergency.
When choosing a standby database to fail over to, you should:
Choose a physical standby database when possible
Choose the standby database that is most current
avanttic
Consultora tecnolgica
Logical Standby
avanttic
Consultora tecnolgica
Logical Standby
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
BFILE
Collections (VARRAYS, Nested Tables) Multimedia
Data types (Spatial, Image, Oracle Text) ROWID, UROWID
User-defined types XMLType
(Object Relational) Binary
XML
Consultora tecnolgica
EXPLAIN
LOCK TABLE
SET CONSTRAINTS
avanttic
SET ROLE
SET TRANSACTION
Consultora tecnolgica
avanttic
DBA_LOGSTDBY_EVENTS
DBA_LOGSTDBY_HISTORY
DBA_LOGSTDBY_LOG
DBA_LOGSTDBY_NOT_UNIQUE
DBA_LOGSTDBY_PARAMETERS
DBA_LOGSTDBY_SKIP
DBA_LOGSTDBY_SKIP_TRANSACTION
DBA_LOGSTDBY_UNSUPPORTED
V$LOGSTDBY_PROCESS
V$LOGSTDBY_PROGRESS
V$LOGSTDBY_STATE
V$LOGSTDBY_STATS
V$LOGSTDBY_TRANSACTION
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Snapshot Standby
avanttic
Consultora tecnolgica
Snapshot Standby
A snapshot standby database is a fully updatable Standby database
created by converting a physical Standby database.
Snapshot standby databases receive and archivebut do not applyredo
data from a primary database.
When the physical standby database is converted, an implicit guaranteed
restore point is created and Flashback Database is enabled.
A snapshot standby database is a fully updatable standby database that is created by
converting a physical standby database to a snapshot standby database. A snapshot standby
database receives and archivesbut does not applyredo data from a primary database.
Redo data received from the primary database is applied when a snapshot standby database
is converted back to a physical standby database, after discarding all local updates to the
snapshot standby database. You can create a snapshot standby database by using DGMGRL
commands or SQL commands. When the standby database is converted to a snapshot
standby database, an implicit guaranteed restore point is created and Flashback Database is
enabled. After performing operations on the snapshot standby database, you can convert it
back to a physical standby database. Data Guard implicitly flashes the database back to the
guaranteed restore point and automatically applies the primary database redo that was
archived by the snapshot standby database since it was created. The guaranteed restore point
is dropped after this process is completed.
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
Client-side:
Oracle Enterprise Manager Grid Control
DGMGRL (command-line interface)
Server-side: Data Guard monitor
DMON process
Configuration files
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica
avanttic
Consultora tecnolgica