- Oracle Data Guard 11gR2 Administration Beginner's Guide
- Emre Baransel Nassyam Basha
- 398字
- 2021-08-13 17:12:24
Time for action – enabling the archive log mode
Perform the following steps on the primary database:
- Check whether archiving has been enabled or disabled, as follows:
SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 6 Current log sequence 8
- Perform a clean shutdown, as follows:
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
Tip
Ensure that you have performed a clean shutdown; if not, you may see this error: ORA-00265: instance recovery required, cannot set ARCHIVELOG mode.
- Start the database in the mount state.
SQL>startup mount ORACLE instance started. Total System Global Area 818401280 bytes Fixed Size 2217792 bytes Variable Size 515901632 bytes Database Buffers 297795584 bytes Redo Buffers 2486272 bytes Database mounted.
- Enable the archive log mode.
SQL> alter database archivelog; Database altered.
- Open the database as follows:
SQL> alter database open; Database altered.
- Check if archiving has been enabled or not.
SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 6 Next log sequence to archive 8 Current log sequence 8
Tip
After enabling the archive log mode, perform a log switch and check whether the archive log is created or not from the
v$archived_log
view, as follows:SQL> select * from v$archived_log;
What just happened?
After mentioning some considerations about Data Guard, we've completed the mandatory task of enabling the archive log mode on the primary database.
Force logging
For a physical standby to be a mirror copy, it must receive redo for the changes made to the primary database. In the primary database, when a segment is defined with the NOLOGGING
attribute and if a NOLOGGING
operation updates the segment, the online redo logfile will be updated with minimal information. This is preferred to complete operations faster but it's not supported in a primary database with the Data Guard configuration. When the redo/archived logfile containing the NOLOGGING
operation is used to recover the datafiles on the standby database, Oracle invalidates such blocks and the error ORA-26040 along with error ORA-1578 are reported by SQL statements in the next block reads. You can see the following errors if operations are performed by NOLOGGING
:
ORA-01578: ORACLE data block corrupted (file # 4, block # 84) ORA-01110: data file 4: ' /u01/app/oracle/oradata/orcl/users01.dbf' ORA-26040: Data block was loaded using the NOLOGGING option
- Learning ROS for Robotics Programming(Second Edition)
- 數(shù)據(jù)庫系統(tǒng)教程(第2版)
- MySQL 8從入門到精通(視頻教學(xué)版)
- Unity 2020 Mobile Game Development
- JavaFX Essentials
- Java游戲服務(wù)器架構(gòu)實(shí)戰(zhàn)
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- Nexus規(guī)模化Scrum框架
- 微信小程序項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Unity 2018 Shaders and Effects Cookbook
- Kubernetes進(jìn)階實(shí)戰(zhàn)
- 愛上C語言:C KISS
- 零基礎(chǔ)學(xué)C語言(第4版)
- C++程序設(shè)計(jì)教程
- Xamarin Cross-Platform Development Cookbook