10 Nisan 2013 Çarşamba

Enabling Archivelog Mode

Note: it is  recommended that performing a backup of the full database before  changing the archive status of a database.

  • Check the database log mode 
[oracle@ora1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 8 12:02:52 2010
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 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          12
Current log sequence                       17
Or 
You can use v$database view to query archive log mode 

SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

If the database log mode is noarchivelog mode you can enable archivelog mode.
  • Shutdown immediately  the database and get it backup in mount mode.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area  849530880 bytes
Fixed Size                  1339824 bytes
Variable Size             511708752 bytes
Database Buffers          331350016 bytes
Redo Buffers                5132288 bytes
Database mounted.
SQL>
  • Set archive log mode and open the database
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG
 Now we can  see that archive log mode is enabled.

Hiç yorum yok:

Yorum Gönder