High Availbility

OS & Virtualization

Saturday, September 16, 2006

Archive or No archive log

The Oracle database can run in one of two modes: ARCHIVELOG mode and NOARCHIVELOG mode. Unless you keep this file, you cannot recover data from a backup to the current point in time.

To check if the database is in archive log mode. Connect as sysdba
SQL > select dbid, name, log_mode from v$database; --or
SQL > archive log list ;


To start archive mode log.
SQL> startup mount;
SQL> alter database archivelog;

To start archive log automatically in init.ora file, add this line
LOG_ARCHIVE_START=TRUE

To stop archive mode log.
SQL> alter database noarchivelog;

To change the archive log file destination
SQL> ALTER SYSTEM SET log_archive_dest_l = "location=/oradata/PRACTICE/archive";

No comments: