Consultando modo atual no Oracle (neste caso, o recurso está em archivelog mode):
[oracle@oel7 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 4 22:45:53 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> ARCHIVE LOG LIST;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DG_RECO
Oldest online log sequence 17
Next log sequence to archive 19
Current log sequence 19
SQL>
Para desabilitar o log mode do banco, é necessário que o mesmo esteja no status MOUNTED.
SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2583690520 bytes
Fixed Size 8899864 bytes
Variable Size 553648128 bytes
Database Buffers 2013265920 bytes
Redo Buffers 7876608 bytes
Database mounted.
SQL>
Para definir o NOARCHIVELOG mode, basta rodar o seguinte comando:
SQL> ALTER DATABASE NOARCHIVELOG;
Database altered.
Abrindo o banco e verificando o seu novo modo:
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> ARCHIVE LOG LIST;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +DG_RECO
Oldest online log sequence 17
Current log sequence 19
SQL>
Para habilitar o archive log mode, basta fazer o processo inverso, como abaixo:
SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 2583690520 bytes
Fixed Size 8899864 bytes
Variable Size 553648128 bytes
Database Buffers 2013265920 bytes
Redo Buffers 7876608 bytes
Database mounted.
SQL> ALTER DATABASE ARCHIVELOG;
Database altered.
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> ARCHIVE LOG LIST;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DG_RECO
Oldest online log sequence 17
Next log sequence to archive 19
Current log sequence 19
SQL>
Pingback: Preparing the Primary Database for Oracle Data Guard – Bruno Santos da Silva
Pingback: Preparing the Primary Database for Oracle Data Guard – SWIV