Oracle 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

Heiße KI -Werkzeuge

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool
Ausziehbilder kostenlos

Clothoff.io
KI-Kleiderentferner

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

Heißer Artikel

Heiße Werkzeuge

Notepad++7.3.1
Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version
Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1
Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6
Visuelle Webentwicklungstools

SublimeText3 Mac-Version
Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

Heiße Themen











Lösungen für Oracle können nicht geöffnet werden, einschließlich: 1. Starten Sie den Datenbankdienst; 2. Starten Sie den Zuhörer; 3.. Hafenkonflikte prüfen; 4. Umgebungsvariablen korrekt einstellen; 5. Stellen Sie sicher, dass die Firewall- oder Antivirus -Software die Verbindung nicht blockiert. 6. Überprüfen Sie, ob der Server geschlossen ist. 7. Verwenden Sie RMAN, um korrupte Dateien wiederherzustellen. 8. Überprüfen Sie, ob der TNS -Dienstname korrekt ist. 9. Netzwerkverbindung prüfen; 10. Oracle Software neu installieren.

Die Methode zur Lösung des Oracle Cursor Closeure -Problems umfasst: explizit den Cursor mithilfe der Close -Anweisung schließen. Deklarieren Sie den Cursor in der für Aktualisierungsklausel so, dass er nach Beendigung des Umfangs automatisch schließt. Deklarieren Sie den Cursor in der Verwendung der Verwendung so, dass er automatisch schließt, wenn die zugehörige PL/SQL -Variable geschlossen ist. Verwenden Sie die Ausnahmebehandlung, um sicherzustellen, dass der Cursor in jeder Ausnahmesituation geschlossen ist. Verwenden Sie den Verbindungspool, um den Cursor automatisch zu schließen. Deaktivieren Sie die Automatikübermittlung und Verzögerung des Cursors Schließen.

In Oracle kann die For -Loop -Schleife Cursors dynamisch erzeugen. Die Schritte sind: 1. Definieren Sie den Cursortyp; 2. Erstellen Sie die Schleife; 3.. Erstellen Sie den Cursor dynamisch; 4. Führen Sie den Cursor aus; 5. Schließen Sie den Cursor. Beispiel: Ein Cursor kann mit dem Zyklus für Kreislauf erstellt werden, um die Namen und Gehälter der Top 10 Mitarbeiter anzuzeigen.

Das Erstellen eines Hadoop -verteilten Dateisystems (HDFS) auf einem CentOS -System erfordert mehrere Schritte. Dieser Artikel enthält einen kurzen Konfigurationshandbuch. 1. Bereiten Sie sich auf die Installation von JDK in der frühen Stufe vor: Installieren Sie JavadevelopmentKit (JDK) auf allen Knoten, und die Version muss mit Hadoop kompatibel sein. Das Installationspaket kann von der offiziellen Oracle -Website heruntergeladen werden. Konfiguration der Umgebungsvariablen: Bearbeiten /etc /Profildatei, setzen Sie Java- und Hadoop -Umgebungsvariablen, damit das System den Installationspfad von JDK und Hadoop ermittelt. 2. Sicherheitskonfiguration: SSH-Kennwortfreie Anmeldung zum Generieren von SSH-Schlüssel: Verwenden Sie den Befehl ssh-keygen auf jedem Knoten

Oracle ist nicht nur ein Datenbankunternehmen, sondern auch ein führender Anbieter von Cloud -Computing- und ERP -Systemen. 1. Oracle bietet umfassende Lösungen von der Datenbank bis zu Cloud -Diensten und ERP -Systemen. 2. Oraclecloud fordert AWS und Azure heraus und liefert IaaS-, PaaS- und SaaS -Dienste. 3. ERP-Systeme von Oracle wie E-Businesssuite und Fusion Applications helfen Unternehmen dabei, den Betrieb zu optimieren.

Wenn Oracle -Protokolldateien voll sind, können die folgenden Lösungen übernommen werden: 1) alte Protokolldateien reinigen; 2) die Größe der Protokolldatei erhöhen; 3) die Protokolldateigruppe erhöhen; 4) automatische Protokollverwaltung einrichten; 5) die Datenbank neu initialisieren. Vor der Implementierung einer Lösung wird empfohlen, die Datenbank zu sichern, um den Datenverlust zu verhindern.

Führen Sie die folgenden Schritte aus, um eine Oracle -Datenbank zu stoppen: 1. Eine Verbindung zur Datenbank herstellen; 2. Sofort herunterfahren; 3.. Herunterfahren vollständig.

SQL -Anweisungen können basierend auf der Laufzeiteingabe erstellt und ausgeführt werden, indem die dynamische SQL von Oracle verwendet wird. Zu den Schritten gehören: Vorbereitung einer leeren Zeichenfolgenvariable zum Speichern von dynamisch generierten SQL -Anweisungen. Verwenden Sie die sofortige Ausführung oder Vorbereitung, um dynamische SQL -Anweisungen zu kompilieren und auszuführen. Verwenden Sie die Bind -Variable, um die Benutzereingabe oder andere dynamische Werte an dynamische SQL zu übergeben. Verwenden Sie sofortige Ausführung oder führen Sie aus, um dynamische SQL -Anweisungen auszuführen.
