Wednesday, July 9, 2008

Changing DB mode from NoArchivelog to Archive log

Issue the following commands to put a database into ARCHVELOG mode:

1) Take Back up of Present SPfile by creating pfile F:\oracle\admin\RISLORA\pfile from present spfile.
2) Shutdown the database by SUTDOWN IMMEDIATE.
3) Take Cold backup of the database in a Disk.
4) Change the parameter in the pfile.
log_archive_start = TRUE
log_archive_dest_1 = 'LOCATION=Archive'
log_archive_dest_state_1 = ENABLE
log_archive_format = %d_%t_%s.arc
5) And make a spfile from the modified pfile in default location .
6) Start the database with spfile.

****************************************************************
SQL> CONNECT sys AS SYSDBA
SQL> STARTUP MOUNT ;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ARCHIVE LOG START;
SQL> ALTER DATABASE OPEN;

NOTE 1: Remember to take a baseline database backup right after enabling archivelog mode. Without it one would not be able to recover. Also, implement an archivelog backup to prevent the archive log directory from filling-up.
################################################################################
using target database controlfile instead of recovery catalogRMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:\Backup\rman\ora_cf%F';

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'F:\Backup\rman\ora_df%t_s%s_s%p';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'F:\Backup\rman\SNCFRILDB.ORA';

Thanks and regards
Jafar

No comments: