oracle data guard 12 - doag.org patchsets and new database releases ‒e.g. 11.2.0.1 > 11.2.0.3...

56
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle 12cR2 Oracle (Active) Data Guard Sebastian Solbach BMC DBaaS Development, ORACLE Deutschland B.V. & Co. KG Juli, 2017 [email protected] @s2solbach

Upload: trinhquynh

Post on 15-Apr-2018

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle 12cR2 Oracle (Active) Data Guard

Sebastian Solbach BMC DBaaS Development, ORACLE Deutschland B.V. & Co. KG Juli, 2017 [email protected] @s2solbach

Page 2: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

2

Page 3: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

3

Page 4: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

4

Page 5: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle Data Guard Standby-Datenbanken

• Kostenfreier und Bestandteil der Oracle Enterprise Edition

• Standby-Seite muss lizenziert werden

• Physical Standby für Desaster Recovery

• Logical Standby für Rolling Upgrades und Reporting

Standby Datenbank

Produktions Datenbank

Automatisches Umschalten möglich

Page 6: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6

Oracle Data Guard - Redo Transport

Online

Redo

Logs

Archived

Redo Logs

Production

Database

Transactions

LGWR

ARCH

Production

RFS

Standby

Redo

Logs

Archived

Redo Logs

LGWR SYNC NSS

Standby

ARCH

LGWR ASYNC NSS RFS

RFS

Gap Resolution

Page 7: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Geringere Auswirkung auf die Produktion

Data Guard 12c Fast Sync

• SYNC Mode: Die Remote Seite Bestätigt den Erhalt der Redo Informationen

• Neu: Bevor das Redolog geschrieben wurde

• Broker Konfiguration Transport Property: FASTSYNC

Primary 11g Standby 11g

Redo Logs

Standby Redo Logs

Commit

Commit Acknowledge

Acknowledge returned on receipt

LGWR

NSS RFS

Primary 12c Standby 12c

Redo Logs

Standby Redo Logs

Commit

Commit Acknowledge

LGWR

NSS RFS

LOG_ARCHIVE_DEST_3='SERVICE=stby1

SYNC NOAFFIRM'

Page 8: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Data Guard Protection Modi

Daten Sicherheit, Performance, Verfügbarkeit

Mode Risk of data loss Transport If no acknowledgement from standby:

Maximum

Protection

Zero Data Loss

Double Failure

Protection

SYNC Stall primary until acknowledgement is

received from replica

Maximum

Availability

Zero Data Loss

Single Failure

Protection

SYNC Stall primary until acknowledgement is

received or timeout threshold period expires

– then resume processing

Maximum

Performance

Potential for

Minimal Data Loss ASYNC

Primary never waits for standby

acknowledgement

Page 9: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9

Oracle Data Guard - Apply Services

Standby

Redo Logs

Archived

Redo Logs

Standby

Physical

(Redo Apply)

Logical

(SQL Apply)

Apply

Redo

Data

From

Site A

Standby

Database ARCH

RFS

Page 10: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Single-Instance Redo Apply

MRP Processes

MRP Processes

Standby Instance 1

RFS Process

Coordinator Process

MRP Processes

RFS Process

Coordinator Process

MRP Processes

RFS Process

Primary Instance 1

ASYNC/SYNC Process

Primary Instance 2

ASYNC/SYNC Process

Primary Instance 3

ASYNC/SYNC Process

Thread 1 Redo

Thread 2 Redo

Thread 3 Redo

SRL

SRL

SRL

Page 11: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Physical Standby Redo Apply

• MRP immer auf einem Knoten im RAC

• Limitiert durch CPU und IO des Knoten

• Tortzdem: Performance mit 11.2 ist sehr gut!

11

Standby Apply Rate

MB/sec

0

200

400

600

800

Oracle 9i Oracle 10g Oracle 11g (Commodity)

Oracle 11g (Exadata)

OLTP Workload

Page 12: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Multi-Instance Redo Apply – 2 Node Standby

Coordinator Process

MRP Processes

Standby Instance 1

RFS Process

Coordinator Process

MRP Processes

Standby Instance 2

RFS Process

Coordinator Process

RFS Process

Primary Instance 1

ASYNC/SYNC Process

Primary Instance 2

ASYNC/SYNC Process

Primary Instance 3

ASYNC/SYNC Process

Thread 1 Redo

Thread 2 Redo

Thread 3 Redo

SRL

SRL

SRL

Page 13: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Multi-Instance Redo Apply

• Paralleles, Multi-Instance Recovery

– Standby Recovery - CPU & IO aller RAC Knoten

– OLTP workload tests auf Exadata

13

0 200 400 600 800

1000 1200 1400

1 Instance 2 Instances 4 Instances 8 Instances

OLTP Workload Standby Apply Rate

MB/sec

Page 14: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

14

Page 15: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

DBCA Standby Creation

• Standby Server: Oracle Software & Listener

• TNSNames Konfiguration

• Broker Konfiguration

• Einschränkungen (erstes Release)

– Single Instanz

– Kein Multitenant

15

dbca -silent -createDuplicateDB

-primaryDBConnectionString myprimary.domain:1523/chicago.domain

-gdbName chicago.domain -sid boston

-initParams instance_name=boston -createAsStandby

-customScripts /tmp/test.sql

Page 16: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

gDBClone Database

• Perl Skript zum:

– Klonen von Datenbanken • Von ASM nach ACFS

• Remote oder Lokal

– Erzeugen von DB-Snapshots (lokal)

– Löschen von DBs

– Anlegen von Data Guard

http://www.oracle.com/technetwork/indexes/samplecode/gdbclone-download-

2295388.html

16

Snapshot Management Script

Page 17: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle Data Guard Fast-Start Failover

• Automatisches Failover für SYNC und ASYNC

• Observer Placement => Im Applikationsservernetz / 3. Rechenzentrum

• Observer: Oracle Client. Keine Lizenz

Standby Datenbank

Produktions Datenbank

Automatisches Umschalten

Page 18: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Einfacheres Observer Management

• Heute: Observer im Vordergrund

• 12.2: Hintergrund:

• Benötigt ein Wallet für die Datenbankverbindung

18

start observer BOSObserver logfile is ‘/tmp/BOSObserver’

in background connect identifier is BOS;

Page 19: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Mehrere Observer

• Heute: Ein aktiver Observer pro Konfiguration

– Observer HA nur mit OEM oder Restart Skript

• 12.2: Mehrere Observer in der FSFO Konfiguration

– Bis zu 3 Observer in einer DG Konfiguration • Jeder Observer hat einen Namen (START OBSERVER).

• Namen müssen eindeutig sein. Default: Host Name

• Broker wählt einen Observer als Master – Manuell:

19

SET MASTEROBSERVER TO Observer-Name;

Page 20: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Mehrere Observer Konfigurationen

• Observer Konfigurationsdatei:

• CONNECT_ID : Primary und alle FSFO Ziele

20

BROKER_CONFIGS = (

(CONFIG = (NAME=SALES) (CONNECT_ID=SALES_P)(FILES=/home))

(CONFIG = (NAME=HR) (CONNECT_ID=HR_P)(FILES=/home))

(CONFIG = (NAME=CUSTOMER) (CONNECT_ID=CUSTOMER_P)(FILES=/home))

(CONFIG = (NAME=ORDERS) (CONNECT_ID=ORDERS_P)(FILES=/home)))

CONFIG_GROUPS = (

(GROUP =(NAME=GRP_A )

(CONFIG_LIST = (NAME=SALES)(NAME=ORDERS)))

(GROUP= (NAME=GRP_B)

(CONFIG_LIST = (NAME=HR)(NAME=CUSTOMER))))

Page 21: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Mehrere Observer Konfigurationen

• Setzen der Konfiguration des Observer Systems

• Keine Datenbankverbindung für Setup notwendig

21

Oracle12c > dgmgrl

DGMGRL for Linux: Release 12.2.0.0.0

Copyright (c) 1982, 2015, Oracle and/or its affiliates.

All rights reserved.

Welcome to DGMGRL, type "help" for information.

DGMGRL> set observerconfigfile='/home/myobservers.ora';

DGMGRL> show observerconfigfile;

ObserverConfigFile=/home/myobservers.ora

Page 22: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Mehrere Observer Konfigurationen

• Starten der Observer Gruppen

• Keine Passwörter in der Konfiguration

• Wallets für Authentifizierung notwendig

22

DGMGRL> start observing grp_a ;

ObserverConfigFile=/home/myobservers.ora

Observer configuration file parsing succeeded

Submitted command "START OBSERVER" using connect identifier “SALES_P"

Submitted command "START OBSERVER" using connect identifier “HR_P“

Check superobserver.log and individual observer logs

Page 23: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

23

Page 24: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Reduzierung geplanter Wartungsarbeiten

Tech Refresh &

Select Migrations

Standby-First

Patch Assurance

Transient Logical

Rolling Upgrade

Data Guard Switchover

Transient Logical

Oracle Patchsets and new Database

Releases

‒ e.g. 11.2.0.1 > 11.2.0.3

‒ e.g. 11.2.0.3 > 12.1

Upgrade Process

‒ Begins with physical standby

‒ Uses logical replication between

old and new versions

‒ Reverts to physical standby when

both primary and standby are at

new version

Tech Refresh and Migrations

See MOS Note 413484.1 for primary/standby cross-

platform combinations

‒ Uses physical replication between old and new

environments

Standby-First

Patch Set Update

Critical Patch Update

Patch Set Exception

Exadata bundled patch

Exadata storage server

software patch

Uses physical replication

between old and new

environments

See MOS Note 1265700.1

Page 25: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Patch Sets & neue Oracle Datenbank Releases

Datenbank Rolling Upgrades

STBY Synchronize – redo apply

Installation neuer Oracle Version in neues Oracle Home (A+B)

Garantierter Restore Point (A)

Datenbank A Datenbank B

Release n Release n+1

Siehe: MOS Note 949322.1

PROD STBY

Synchronize – sql apply PROD Konvertierung zur Transient Logical &

Upgrade zu neuer Version (B) PROD STBY

SWITCHOVER

Switchover, Flashback zu GRP, Mount mit neuem OH (A) STBY STBY PROD

Synchronize – redo apply Upgrade durch Redo & Synchronisation

(A) STBY STBY PROD

Page 26: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Einfacheres, besseres Datenbank Rolling Upgrade

Active Data Guard Rolling Upgrades

Start Switchover Finish

Page 27: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle Data Guard

• Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

• Weitere Datentypen mit DBMS_ROLLING

– Support for Objects With Long Identifiers

– Label Security Support

– Oracle Database Vault Support

• Data Guard Broker Support für Oracle Active Data Guard Rolling Upgrades

27

Upgrades

Page 28: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 28

Geplante Wartungsarbeiten

UCP

Primär Datenbank

Microservice Standby Datenbank

ONS

ONS

Page 29: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 29

Switchover

UCP

Primär Datenbank

Microservice Standby Datenbank

ONS

ONS

Page 30: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 30

Switchover

UCP

Primär Datenbank

Microservice Standby Datenbank

ONS

ONS

Page 31: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 31

Switchover

UCP

Primär Datenbank

Microservice Standby Datenbank

ONS

ONS

Page 32: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 32

Switchover

UCP

Primär Datenbank

Microservice Standby Datenbank

ONS

ONS

Page 33: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 33

Switchover

UCP

Standby Datenbank

Microservice Primär Datenbank

ONS

ONS

Page 34: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 34

Switchover

UCP

Standby Datenbank

Microservice Primär Datenbank

ONS

ONS

Page 35: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 35

Switchover

UCP

Standby Datenbank

Microservice Primär Datenbank

ONS

ONS

Page 36: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36

Switchover

UCP

Standby Datenbank

Microservice Primär Datenbank

ONS

ONS

Page 37: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Transparent Client Connection Failover

• Session Draining existiert seit 11.2 – Aber manueller Prozess:

– “srvctl stop services” auf Primary & (Warten auf “Drain”)

– Data Guard Switchover (Broker oder SQL*Plus)

– Neue Primary DB, Service Start, Rebalance

• In 12cR2 übernimmt Data Guard Brokerdas Session Draining

37

Session Draining mit Broker

DGMGRL> switchover to BOS1 wait;

Page 38: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Transparent Client Connection Failover

• Session bleiben bei Active Data Guard erhalten (Failover/Switchover)

• Vorteil:

– Benutzer bleiben Verbunden

– Kein Reconnect Storm nach Failover

• Automatisch – Nur Services müssen konfiguriert sein

38

Beibehalten von Verbindungen auf Standby

Read/Write Read

Read/Write

Active Data Guard Standby

Primary Failed Primary

Primary

Page 39: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

39

Page 40: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Active Data Guard

• Entlastung der Primärdatenbank durch Auslagerung von Read-Only Abfragen auf eine immer aktuelle Physikalische Standby

– Redologs werden unterdessen transportiert und sofort angewendet

– Alle Datentypen werden unterstützt

– Konsistente Leseergebnisse

Real-time Queries

Physikalische Standby Datenbank

Produktions Datenbank

Laufender Redo Transport & Apply

Real-time Query

Schnelles Inkrementelles Backup

Page 41: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Database In-Memory & Active Data Guard

• In-Memory DB auf Active Data Guard

– IMC Tabellen und Spalten für Analysen auf Active Data Guard

– Unterschiedliche Daten im IMC auf Standby

• INMEMORY_SIZE Initialisierungparameter

– Primary / Standby

– Role based Services

– INMEMORY ... DISTRIBUTE FOR SERVICE

• Einschränkungen

– Kein Multi-Instance Redo Apply

– Kein ILM

– Kein Fast Start / In-Memory Join Groups

41

Month In-Memory

Year In-Memory

Standby Primary

Page 42: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Diagnostics & Tuning für Active Data Guard

• Diagnostic Pack (AWR)

• Tuning Pack Funktionen und SQL Plan Analyzer

42

Page 43: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

AWR Support für Remote Snapshots und ADG (DB12.2)

• Problem

– AWR Snapshots funktionieren nicht in Read-Only Standby

– Performance Monitoring und Analyse bisher nur mit Statspack

• Lösung – AWR Framework unterstützt Remote Snapshots

• Eine Zielkatalog Datenbank sammelt Snapshots von Sourcedatenbanken

• Automatische oder manuelle Sammlung

• Sammlung via. DB Links

• Source Datenbanken müssen registriert werden: DBMS_WORKLOAD_REPOSITORY.REGISTER_REMOTE_DATABASE API

43

Page 44: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

AWR Unified Management Framework Topologie

44

Source databases

Active Data Guard

Remote AWR Data

Store

Katalog registrierter Remote DBs

Remote Datenbank kann Primary und Standby oder genersiche DB sein

DBID1 AWR Data

DBID2 AWR Data

ADG

DB5

Primary

db_link_to_sources

db_link_to_target

DB1

DB3 DB4 DB2

Page 45: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

SQL Tuning Advisor Support für Active Data Guard

• Problem

– Reports und Abfragen auf ADG Datenbanken

– Lastprofil unterschiedlich zu Primary

• Lösung • Tunen von SQL auf der ADG Datenbank

• Ausführung SQL Tuning Advisor auf der Standby

• Notwendigen Daten erhält die Primary über DB Link

• Details und Ergebnisse gespeichert in der Primary

• Report wird auf Standby erzeugt, ohne CPU der Primary

45

Page 46: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Agenda

Data Guard

Setup

Geplante Wartungsarbeiten

Standby „aktiv“ nutzen

Absicherung

46

Page 47: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Absicherung: Data Guard Release 12.2

• Automatic Password File Management

• Auto Block Repair Verbesserungen

• Einfache Reperatur No Logging Operationen

• Data File Block Vergleich

• Zero Data Loss Failovers bei Storage Fehlern

47

Page 48: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Verbessertes Automatic Block Recovery

• Active Data Guard Automatic Block Repair seit 11gR2

• Blöcke wie Datendateiheader etc. wurden nicht repariert

• 12cR2 repariert mehr Blocktyen

48

Active Standby Database

Primary Database

Read/Write Workload

Continuous redo shipping, validation & apply

Real-time Reporting

Page 49: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Data Guard und No Force Logging

• Redo für No-Logging Operationen: Nur “nicht wiederherstellbar”

– Früher: Reparatur = Restore/Recover Datendateien

• No-Logging Blöcke werden von Primary protokolliert

• Standby einfach über RMAN reparieren

– Validierung und Reparatur von “invalidierten” Blöcken auf Standby

49

rman validate/recover .. nonlogged block

Page 50: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Oracle Data Guard Datenbankvergleich

• Entdeckt latente Korruptionen und Lost Writes

– Schneller Vergleich auf der Physik unter Berücksichtigung von Änderungen

– Schont Netzwerk und Rechenleistung • Sendet & vergleicht Blöcke in “Batches”

• Optimiert für Blöcke mit gleicher Version

• Ignoriert leere Blöcke

50

Vergleich zwischen Primary und Standby

DGMGRL> validate database bos1 datafile 10 output=checkBOS1;

Operation requires a connection to database "bos1"

Connecting ...

Output files are created in /…/BOS1/trace on host “Boston1"

Page 51: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 51

Oracle Data Guard Datenbankvergleich Summary:

***************************************************************************

ID: Block Type Id

TOTAL: Total number of blocks found

DIFFV: Number of block pairs with different version

LWLOC: Lost Writes at Local

LWRMT: Lost Writes at Remote

SAMEV: Number of block pairs with same version

SAMEV&C: Number of block pairs with same version and checksum

DIFFPAIR: Number of block pairs with same version but different contents

ENCERR: Undecided blocks related to encryption/decrytion error.

e.g. Wallet is not open.

SKIPPED: Skipped blocks due to data corruption, etc

ID TOTAL DIFFV LWLOC LWRMT SAMEV SAMEV&C DIFFPAIR ENCERR SKIPPED

29 0000001 0000000 0000000 0000000 0000001 0000001 0000000 0000000 0000000

30 0000125 0000000 0000000 0000000 0000125 0000125 0000000 0000000 0000000

58 0000512 0000512 0000000 0000000 0000000 0000000 0000000 0000000 0000000

Page 52: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Zero-Data Loss (ZDL) Fast-Start Failover

• Heute: ZDL Fast-Start Failovers nur bei LGWR Sync und Max Avail

– Reine Storage Ausfälle sind kein komplett Ausfälle

• Morgen: Storage Fehler werden vom Asynch Prozess abgefangen

– Bei Instanzausfall wird Redo des Log Buffers noch an Standby geschickt

– Erlaubt Fast-Start Failover ein Zero Data Loss Failover • Auch bei Maximum Performance

– Vergleichbar mit automatischem ‘ALTER DATABASE FLUSH REDO;’

52

Verbesserung von Asynchronen Zielen

Page 53: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Q & A

Page 54: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

54

Page 55: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 55

Page 56: Oracle Data Guard 12 - doag.org Patchsets and new Database Releases ‒e.g. 11.2.0.1 > 11.2.0.3 ... Oracle Data Guard •Unterstützung Oacle EM 13 für “Database Rolling Upgrades”