suchen
HeimDatenbankMySQL-TutorialOracle 11g Data Guard: How to Change Data Guard Protection M

How to Change Data Protection Mode ofa Primary Database Step 1Select a dataprotection mode that meets your availability, performance, and data protectionrequirements. Maximum Availability This protection mode provides the highest level of

How to Change Data Protection Mode ofa Primary Database

 

Step 1   Select a dataprotection mode that meets your availability, performance, and data protectionrequirements.

 

Maximum Availability

This protection mode provides the highest level of data protectionthat is possible without compromising the availability of a primary database.Transactions do not commit until all redo data needed to recover thosetransactions has been written to the online redo log and to the standby redolog on at least one synchronized standby database. If the primary databasecannot write its redo stream to at least one synchronized standby database, itoperates as if it were in maximum performance mode to preserve primary databaseavailability until it is again able to write its redo stream to a synchronizedstandby database.

This mode ensures that no data loss will occur if the primarydatabase fails, but only if a second fault does not prevent a complete set ofredo data from being sent from the primary database to at least one standbydatabase.

Maximum Performance

This protection mode provides the highest level of data protectionthat is possible without affecting the performance of a primary database. Thisis accomplished by allowing transactions to commit as soon as all redo datagenerated by those transactions has been written to the online log. Redo datais also written to one or more standby databases, but this is doneasynchronously with respect to transaction commitment, so primary databaseperformance is unaffected by delays in writing redo data to the standbydatabase(s).

This protection mode offers slightly less data protection thanmaximum availability mode and has minimal impact on primary databaseperformance.

This is the default protection mode.

Maximum Protection

This protection mode ensures that no data loss will occur if theprimary database fails. To provide this level of protection, the redo dataneeded to recover a transaction must be written to both the online redo log andto the standby redo log on at least one synchronized standby database beforethe transaction commits. To ensure that data loss cannot occur, the primarydatabase will shut down, rather than continue processing transactions, if itcannot write its redo stream to at least one synchronized standby database.

Transactions on the primary are considered protected as soon as DataGuard has written the redo data to persistent storage in a standby redo logfile. Once that is done, acknowledgment is quickly made back to the primarydatabase so that it can proceed to the next transaction. This minimizes theimpact of synchronous transport on primary database throughput and responsetime. To fully benefit from complete Data Guard validation at the standbydatabase, be sure to operate in real-time apply mode so that redo changes areapplied to the standby database as fast as they are received. Data Guardsignals any corruptions that are detected so that immediate corrective actioncan be taken.

Because this data protection mode prioritizes data protection overprimary database availability, Oracle recommends that a minimum of two standbydatabases be used to protect a primary database that runs in maximum protectionmode to prevent a single standby database failure from causing the primarydatabase to shut down.

Note:

Asynchronously committed transactions are not protected by DataGuard against loss until the redo generated by those transactions has beenwritten to the standby redo log of at least one synchronized standby database.

For more information about the asynchronous commit feature, see:

  • Oracle Database Concepts
  • Oracle Database SQL Language Reference
  • Oracle Database Advanced Application Developer's Guide
  • Oracle Database PL/SQL Language Reference

 

Step 2   Verify thatat least one standby database meets the redo transport requirements for thedesired data protection mode.

 

The LOG_ARCHIVE_DEST_n database initializationparameter that corresponds to at least one standby database must include theredo transport attributes listed inTable5-1 for the desired data protection mode.

 

Table 5-1 RequiredRedo Transport Attributes for Data Protection Modes

 

 

Maximum Availability

 

Maximum Performance

 

Maximum Protection

 

AFFIRM

 

NOAFFIRM

 

AFFIRM

 

SYNC

 

ASYNC

 

SYNC

 

DB_UNIQUE_NAME

 

DB_UNIQUE_NAME

 

DB_UNIQUE_NAME

 

Step 3   Verify thatthe DB_UNIQUE_NAME database initialization parameter has been set to a uniquevalue on the primary database and on each standby database.

 

Step 4   Verify thatthe LOG_ARCHIVE_CONFIG database initialization parameter has been defined onthe primary database and on each standby database, and that its value includesa DG_CONFIG list that includes the DB_UNIQUE_NAME of the primary database andeach standby database.

 

For example, the following SQL statement might be used to configurethe LOG_ARCHIVE_CONFIG parameter:

 

SQL> showparameter log_archive_config

 

NAME                                 TYPE        VALUE

----------------------------------------------- ------------------------------

log_archive_config                   string      DG_CONFIG=(prod,standby)

 

Step 5   Set the dataprotection mode.

Execute the following SQL statement on the primary database:

 ALTER DATABASE  SET STANDBY DATABASE TO MAXIMIZE{AVAILABILITY | PERFORMANCE | PROTECTION};

 

SQL> ALTERDATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;

Database altered.

 

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   READ WRITE           MAXIMUM AVAILABILITY MAXIMUMAVAILABILITY PRIMARY          TO STANDBY

 

 

Note that the data protection mode can be set to MAXIMUM PROTECTIONon an open database only if the current data protection mode is MAXIMUMAVAILABILITY and if there is at least one synchronized standby database.

 

You can change the protection mode from MAXIMUM AVAILABILITY to MAXIMUM PROTECTION when the database is open:

 

SQL> ALTERDATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;

Database altered.

 

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   READ WRITE           MAXIMUM PROTECTION   MAXIMUM PROTECTION   PRIMARY          TO STANDBY

 

But you cannot change the protection mode from MAXIMUM PERFORCEMANCE to MAXIMUM PROTECTION when the database is open

 

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   READ WRITE           MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PRIMARY          FAILED DESTINATION

 

 

SQL> ALTERDATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;

ALTER DATABASE SETSTANDBY DATABASE TO MAXIMIZE PROTECTION

*

ERROR at line 1:

ORA-01126: databasemust be mounted in this instance and not open in any instance

 

To change the data protection mode from MAXIMUMPERFORMANCE to MAXIMUM PROTECTION , the database must be mounted, not open.

 

SQL> shutdownimmediate

SQL> startupmount;

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   MOUNTED              MAXIMUM PERFORMANCE  UNPROTECTED          PRIMARY          NOT ALLOWED

 

SQL> ALTERDATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;

Database altered.

 

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   MOUNTED              MAXIMUM PROTECTION   UNPROTECTED          PRIMARY          NOT ALLOWED

 

 

Pls Note, If the listener of the standby is notstarted, the switchover status here shows "FAILED DESTINATION" .Afteryou start the standby's listener

, the status will change to "TO STANDBY".

 

SQL> selectLOG_MODE,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE,SWITCHOVER_STATUSfrom v$database;

 

LOG_MODE     OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    SWITCHOVER_STATUS

-------------------------------- -------------------- -------------------- ------------------------------------

ARCHIVELOG   READ WRITE           MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PRIMARY          TO STANDBY



作者:xiangsir

QQ:444367417

MSN:xiangsir@hotmail.com


Stellungnahme
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Was sind gespeicherte Verfahren in MySQL?Was sind gespeicherte Verfahren in MySQL?May 01, 2025 am 12:27 AM

Speichernde Verfahren sind vorkompilierte SQL -Anweisungen in MySQL zur Verbesserung der Leistung und zur Vereinfachung komplexer Vorgänge. 1. Verbesserung der Leistung: Nach der ersten Zusammenstellung müssen nachfolgende Anrufe nicht neu kompiliert werden. 2. Die Sicherheit verbessern: Beschränken Sie den Zugriff auf die Datenentabelle durch Berechtigungssteuerung. 3. Vereinfachen Sie komplexe Operationen: Kombinieren Sie mehrere SQL -Anweisungen, um die Logik der Anwendungsschicht zu vereinfachen.

Wie funktioniert das Caching von Abfrage in MySQL?Wie funktioniert das Caching von Abfrage in MySQL?May 01, 2025 am 12:26 AM

Das Arbeitsprinzip des MySQL -Abfrage -Cache besteht darin, die Ergebnisse der ausgewählten Abfrage zu speichern. Wenn dieselbe Abfrage erneut ausgeführt wird, werden die zwischengespeicherten Ergebnisse direkt zurückgegeben. 1) Abfrage -Cache verbessert die Leistung der Datenbank und findet zwischengespeicherte Ergebnisse durch Hash -Werte. 2) Einfache Konfiguration, setzen Sie in MySQL -Konfigurationsdatei query_cache_type und query_cache_size. 3) Verwenden Sie das Schlüsselwort SQL_NO_Cache, um den Cache spezifischer Abfragen zu deaktivieren. 4) In Hochfrequenz-Update-Umgebungen kann Abfrage-Cache Leistungs Engpässe verursachen und muss für die Verwendung durch Überwachung und Anpassung von Parametern optimiert werden.

Was sind die Vorteile der Verwendung von MySQL gegenüber anderen relationalen Datenbanken?Was sind die Vorteile der Verwendung von MySQL gegenüber anderen relationalen Datenbanken?May 01, 2025 am 12:18 AM

Die Gründe, warum MySQL in verschiedenen Projekten häufig verwendet wird, umfassen: 1. Hochleistungs und Skalierbarkeit, die mehrere Speichermotoren unterstützen; 2. Einfach zu verwendende und pflegende, einfache Konfiguration und reichhaltige Werkzeuge; 3. Reiches Ökosystem, das eine große Anzahl von Community- und Drittanbietern anzieht; V.

Wie behandeln Sie Datenbank -Upgrades in MySQL?Wie behandeln Sie Datenbank -Upgrades in MySQL?Apr 30, 2025 am 12:28 AM

Zu den Schritten für die Aktualisierung der MySQL -Datenbank gehören: 1. Sicherung der Datenbank, 2. Stoppen Sie den aktuellen MySQL -Dienst, 3. Installieren Sie die neue Version von MySQL, 14. Starten Sie die neue Version des MySQL -Dienstes, 5. Wiederherstellen Sie die Datenbank wieder her. Während des Upgrade -Prozesses sind Kompatibilitätsprobleme erforderlich, und erweiterte Tools wie Perconatoolkit können zum Testen und Optimieren verwendet werden.

Was sind die verschiedenen Sicherungsstrategien, die Sie für MySQL verwenden können?Was sind die verschiedenen Sicherungsstrategien, die Sie für MySQL verwenden können?Apr 30, 2025 am 12:28 AM

Zu den MySQL-Backup-Richtlinien gehören logische Sicherungen, physische Sicherungen, inkrementelle Sicherungen, replikationsbasierte Backups und Cloud-Backups. 1. Logical Backup verwendet MySQldump, um die Datenbankstruktur und -daten zu exportieren, die für kleine Datenbanken und Versionsmigrationen geeignet sind. 2. Physische Sicherungen sind durch das Kopieren von Datendateien schnell und umfassend, erfordern jedoch eine Datenbankkonsistenz. 3. Incremental Backup verwendet eine binäre Protokollierung, um Änderungen aufzuzeichnen, was für große Datenbanken geeignet ist. V. 5. Cloud -Backups wie AmazonRDs bieten Automatisierungslösungen, aber Kosten und Kontrolle müssen berücksichtigt werden. Bei der Auswahl einer Richtlinie sollten Datenbankgröße, Ausfallzeittoleranz, Wiederherstellungszeit und Wiederherstellungspunktziele berücksichtigt werden.

Was ist MySQL Clustering?Was ist MySQL Clustering?Apr 30, 2025 am 12:28 AM

MysqlclusteringenhancesDatabaserObustnessandScalabilityBydiTributingDataacrossmultiPlenodes

Wie optimieren Sie das Datenbankschema -Design für die Leistung in MySQL?Wie optimieren Sie das Datenbankschema -Design für die Leistung in MySQL?Apr 30, 2025 am 12:27 AM

Das Optimieren von Datenbankschema -Design in MySQL kann die Leistung in den folgenden Schritten verbessern: 1. Indexoptimierung: Erstellen Sie Indizes für gemeinsame Abfragespalten, Ausgleich des Aufwand der Abfragen und Einfügen von Aktualisierungen. 2. Tabellenstrukturoptimierung: Redundieren Sie die Datenreduktion durch Normalisierung oder Anti-Normalisierung und verbessern Sie die Zugangseffizienz. 3. Datentypauswahl: Verwenden Sie geeignete Datentypen, z. B. int anstelle von VARCHAR, um den Speicherplatz zu reduzieren. 4. Partitionierung und Untertisch: Verwenden Sie für große Datenvolumina die Partitionierung und Untertabelle, um Daten zu dispergieren, um die Abfrage- und Wartungseffizienz zu verbessern.

Wie können Sie die MySQL -Leistung optimieren?Wie können Sie die MySQL -Leistung optimieren?Apr 30, 2025 am 12:26 AM

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi

See all articles

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

Video Face Swap

Video Face Swap

Tauschen Sie Gesichter in jedem Video mühelos mit unserem völlig kostenlosen KI-Gesichtstausch-Tool aus!

Heiße Werkzeuge

WebStorm-Mac-Version

WebStorm-Mac-Version

Nützliche JavaScript-Entwicklungstools

MinGW – Minimalistisches GNU für Windows

MinGW – Minimalistisches GNU für Windows

Dieses Projekt wird derzeit auf osdn.net/projects/mingw migriert. Sie können uns dort weiterhin folgen. MinGW: Eine native Windows-Portierung der GNU Compiler Collection (GCC), frei verteilbare Importbibliotheken und Header-Dateien zum Erstellen nativer Windows-Anwendungen, einschließlich Erweiterungen der MSVC-Laufzeit zur Unterstützung der C99-Funktionalität. Die gesamte MinGW-Software kann auf 64-Bit-Windows-Plattformen ausgeführt werden.

SAP NetWeaver Server-Adapter für Eclipse

SAP NetWeaver Server-Adapter für Eclipse

Integrieren Sie Eclipse mit dem SAP NetWeaver-Anwendungsserver.

mPDF

mPDF

mPDF ist eine PHP-Bibliothek, die PDF-Dateien aus UTF-8-codiertem HTML generieren kann. Der ursprüngliche Autor, Ian Back, hat mPDF geschrieben, um PDF-Dateien „on the fly“ von seiner Website auszugeben und verschiedene Sprachen zu verarbeiten. Es ist langsamer und erzeugt bei der Verwendung von Unicode-Schriftarten größere Dateien als Originalskripte wie HTML2FPDF, unterstützt aber CSS-Stile usw. und verfügt über viele Verbesserungen. Unterstützt fast alle Sprachen, einschließlich RTL (Arabisch und Hebräisch) und CJK (Chinesisch, Japanisch und Koreanisch). Unterstützt verschachtelte Elemente auf Blockebene (wie P, DIV),

Sicherer Prüfungsbrowser

Sicherer Prüfungsbrowser

Safe Exam Browser ist eine sichere Browserumgebung für die sichere Teilnahme an Online-Prüfungen. Diese Software verwandelt jeden Computer in einen sicheren Arbeitsplatz. Es kontrolliert den Zugriff auf alle Dienstprogramme und verhindert, dass Schüler nicht autorisierte Ressourcen nutzen.