Professional Documents
Culture Documents
General: Select From Where Alter Select From Where
General: Select From Where Alter Select From Where
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';
SELECTlog_mode
FROMv$database;
SHUTDOWN;
STARTUPMOUNTEXCLUSIVE;
ALTERDATABASEARCHIVELOG;
ALTERDATABASEOPEN;
SELECTlog_mode
FROMv$database;
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;
altersystemarchivelogstop;
altersystemarchivelogall;
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