Activar o desactivar modo archivelog en Oracle 11g
Aquí les dejo las instrucciones comunes que van a necesitar para cambiar el archivelog mode en Oracle.
Para saber en qué archivelog mode se encuentra la base de datos, utilicen el comando archive log list desde sqlplus entrando como sysdba.
Ejemplo:
C:\Users\administrator>sqlplus / as sysdba
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Current log sequence 6
Para activar el modo archivelog.
Apagar, iniciar en estado mount, poner en archivelog y abrir la base de datos.
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
Para desactivar el modo archivelog.
Apagar, iniciar en estado mount, desaactivar archivelog y abrir la base de datos.
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
Abajo les dejo el script completo en la línea de comandos:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 30 10:31:58 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Current log sequence 6
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 4960579584 bytes
Fixed Size 2184232 bytes
Variable Size 2617248728 bytes
Database Buffers 2332033024 bytes
Redo Buffers 9113600 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 4960579584 bytes
Fixed Size 2184232 bytes
Variable Size 2617248728 bytes
Database Buffers 2332033024 bytes
Redo Buffers 9113600 bytes
Database mounted.
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL>
Espero les sirva.
No hay comentarios.:
Publicar un comentario