Para habilitar el modo archive log en base de datos, verificamos el estado actual ingresamos por sqlplus
SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 89 Current log sequence 91 SQL> quit Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
Como vemos, el modo es No Archive. Además nótese que destino está como
Archive destination USE_DB_RECOVERY_FILE_DEST
Ante lo cual debemos entonces definir la ruta donde almacenar los archive logs.
SQL> show parameter recovery_file_dest NAME TYPE VALUE --------------------------------------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/flash_recovery_area db_recovery_file_dest_size big integer 3852M SQL>
Por defecto entonces los archive logs van para esa ubicación, si queremos definir una ubicación distinta, podemos darle la siguiente instrucción sql
SQL> alter system set log_archive_dest_1='LOCATION=/u01/arch' scope = both; System altered. SQL>
Con esto dejamos habilitado el modo archive log,
Reiniciamos la instancia para que se tomen los cambios
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1,9575E+10 bytes Fixed Size 2261568 bytes Variable Size 2751466944 bytes Database Buffers 1,6777E+10 bytes Redo Buffers 44163072 bytes Database mounted. SQL> quit Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
verificamos nuevamente
[oracle@heimdal: DSRLLO [~/pad/scripts] 18:04:28 $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 13 18:05:04 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Release 11.2.0.4.0 - 64bit Production SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 89 Next log sequence to archive 91 Current log sequence 91 SQL>
Ahora, si tenemos habilitado el modo y lo queremos deshabilitar,
Bajamos la instancia
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1,9575E+10 bytes Fixed Size 2261568 bytes Variable Size 2751466944 bytes Database Buffers 1,6777E+10 bytes Redo Buffers 44163072 bytes Database mounted. SQL>
Y deshabilitamos el modo archive log
SQL> alter database noarchivelog; Database altered. SQL>
Abrimos la instancia y listo, eso fue todo
SQL> alter database open; Database altered. SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 89 Current log sequence 91 SQL> quit Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
Sin respuestas