KEMBAR78
General: Select From Where Alter Select From Where | PDF | Computers
0% found this document useful (0 votes)
65 views3 pages

General: Select From Where Alter Select From Where

This document provides information on configuring and managing archive logging for Oracle databases. It discusses: - The importance of archive logging for production databases. - Parameters to configure multiple archiver processes. - Steps to startup a database in archive log mode or noarchive log mode. - Commands to start, stop, and force archiving of log files. - A shell script example to automatically move archived log files to a new directory.

Uploaded by

Surender Martha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views3 pages

General: Select From Where Alter Select From Where

This document provides information on configuring and managing archive logging for Oracle databases. It discusses: - The importance of archive logging for production databases. - Parameters to configure multiple archiver processes. - Steps to startup a database in archive log mode or noarchive log mode. - Commands to start, stop, and force archiving of log files. - A shell script example to automatically move archived log files to a new directory.

Uploaded by

Surender Martha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

General

Note: Archive logging is essential for production databases where the loss of a transaction might be
fatal. It is generally considered unnecessary in development and test environments.

Init.ora Parameters
Configure for multiple
archiver processes

log_archive_max_processes=<integer>;
SELECTvalue
FROMgv$parameter
WHEREname='log_archive_max_processes';
ALTERSYSTEMSETlog_archive_max_processes=3;
SELECTvalue
FROMgv$parameter
WHEREname='log_archive_max_processes';

Startup The Database In Archivelog Mode


Steps Required To Take
A Database Not In
Archive Log Mode And
Alter It To Archive Log
Mode

SELECTlog_mode
FROMv$database;
SHUTDOWN;
STARTUPMOUNTEXCLUSIVE;
ALTERDATABASEARCHIVELOG;
ALTERDATABASEOPEN;
SELECTlog_mode
FROMv$database;

Startup The Database In NoArchivelog Mode


Steps Required To Take
A Database In Archive
Log Mode And Alter It To
No Archive Log Mode

SELECTlog_mode
FROMv$database;
SHUTDOWN;
STARTUPMOUNTEXCLUSIVE;
ALTERDATABASENOARCHIVELOG;
ALTERDATABASEOPEN;

SELECTlog_mode
FROMv$database;
Restart After Archiving Logging Failure
SHUTDOWN;
STARTUP;
Archive Logging Restart

ARCHIVELOGSTART;
ARCHIVELOGALL;
Archive Log Related Commands
Start Archive Logging

altersystemarchivelogstart;

Stop Archive Logging

altersystemarchivelogstop;

Force archiving of all log


files

altersystemarchivelogall;

Force archiving of the


current log file

altersystemarchivelogcurrent;

Shell Scripts
Move Archive Logs

exportARCH_DIR="/tmp/rim"
NEW_DIR="/tmp/rim/new_dir"
exportFILE_EXT="arc"
exportMOVELIST="/tmp/move.list"
exportCALF="/tmp/calc.tmp"
exportTMPF="/tmp/workfile.tmp"
CMD="lsltr$ARCH_DIR/*.$FILE_EXT|awk
{'print$9'}
|sortr>$TMPF"
exportFILE_COUNT="
echo"Numberoffilesfoundis$FILE_COUNT"
cat$TMPF
echo$FILE_COUNT<1">$CALF
echo"quit">>$CALF
MOVE="/usr/bin/bc/$CALF"
echo"Numberoffilestomoveis$MOVE"
/usr/bin/tail$MOVE$TMPF>$MOVELIST
echo"Filetobemoved"
cat$MOVELIST
whilereadFILE
do

echo"Movingfile$FILEto$NEW_DIR"
done<$MOVELIST

You might also like