oracle check archivelog mode
Wednesday, October 15, 2014
Enable archivelog Mode Oracle 11g
11g Database in ARCHIVELOG Mode
In this exercise, you will
configure the database for ARCHIVELOG mode. You will then actually put the
database in ARCHIVELOG mode.
1. Create a directory called c:\oracle\arch\arch.
2. Log into
your database using SQL*Plus. Check the log mode the database is in by querying
the LOG_MODE column in V$DATABASE.
C:\oracle\orabackup\orcl> SQLPLUS
SYS AS SYSDBA
SQL> SELECT LOG_MODE FROM V$DATABASE;
LOG_MODE
-------------------------
NOARCHIVELOG
3. Using the alter
system command, set the LOG_ARCHIVE_DEST_1 parameter to point to the new
directory you created in step 1.
SQL> ALTER
SYSTEM SET LOG_ARCHIVE_DEST_1=’LOCATION=C:\ORACLE\ARCH\ORCL’;
System altered.
4. Shut
down the database using the shutdown immediate command.
SQL> SHUTDOWN
IMMEDIATE
5. Put the database in
MOUNT mode with the startup mount command. Confirm that the database is in
MOUNT mode by querying the OPEN_MODE column in V$DATABASE.
SQL> STARTUP MOUNT
SQL> SELECT OPEN_MODE FROM V$DATABASE;
OPEN_MODE
----------------
MOUNTED
6. Now put the database in
ARCHIVELOG mode using the alter database archivelog command.
SQL> ALTER DATABASE ARCHIVELOG;
Database altered.
7. Open the database with the alter database open command.
Check the LOG_MODE parameter
of the V$DATABASE view to ensuring
that the database is in ARCHIVELOG mode.
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> SELECT LOG_MODE FROM V$DATABASE;
LOG_MODE
------------
ARCHIVELOG
8. To
ensure that the database is configured correctly, force a log switch.
SQL> ALTER
SYSTEM SWITCH LOGFILE;
System altered.
9. Now check the directory c:\oracle\arch\orcl to ensure that
the archived redo logs are being created correctly.
SQL> Host dir
c:\oracle\arch\orcl