Thursday, April 16, 2009

Backup & Recovery /Changing the Archiving Mode

Changing the Archiving Mode
Ch # 8

If database is in NOARCHIVE mode then the following steps are used to change then
mode into ARCHIVE mode.

1-Shutdown Normal/Immediate/Transactional
2-Startup Mount
3-Alter database archivelog
4-Alter database open
5-Full database backup

Note: Same steps are used From Archive to No-Archive just change the step 3 and write
Noarchivelog instead of Archivelog.

Automating Archiving


1- Just write the LOG_ARCHIVE_START=TRUE in parameter file .whenever the
instance will start the archive process will be enabled.
2- Or ALTER SYSTEM SET ARCHIVE LOG START or STOP
3- Or ALTER SYSTEM SET ARCHIVE LOG START TO
‘c:\archivefiles\arc001.log’ ; (to change archive file location)

Stop or Start additional Archive Processes


1- in parameter file just write LOG_ARCHIVE_MAX_PROCESSES=VALUE(4 )etc.
2- or in open database just write ALTER SYSTEM SET
LOG_ARCHIVE_MAX_PROCESSES=4 ;

Manually Archiving Online Redo Log Files


1 – ALTER SYSTEM ARCHIVE LOG CURRENT;
SPECIFYING MULTIPLE ARCHIVE LOG DESTINATIONS
1-log_archive_dest_1=”location=c:\archivefile\arc.log”
2- log_archive_dest_2=”location=c:\archivefile\arc.log”
3- log_archive_dest_3=”location=c:\archivefile\arc.log” etc. Or
1- log_archive_dest_1=”location=c:\archivefile\arc.log MANDATORY REOPEN”
(Archive file must be created in this location)
2- log_archive_dest_1=”location=c:\archivefile\arc.log MANDATORY
REOPEN=600” (seconds)
(Archive file must be created in this location if no space then archive process
attempt to write after 600 seconds)
3- log_archive_dest_1=”location=c:\archivefile\arc.log OPTIONAL”
4- Log_archive_dest_state_2 =Defer (Archive file will not generate in this location)
To check files situation then use ARCHIVE LOG LIST

No comments: