SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;
SQL> select log_mode from v$database;
SQL> Create Pfile=’D:\Orcl3_Pfile.sql’ from Spfile;
SQL> Shutdown Immediate;
Update this Pfile.
SQL> Startup mount pfile=’D:\Orcl3_Pfile.sql’;
SQL>Alter database archivelog;
SQL>Alter database open;
To change the Destination of Archive log File
Archive log list;
Show Parameter Archive;
SQL> select DEST_NAME,STATUS,DESTINATION from V$ARCHIVE_DEST;
SQL> select * from v$parameter where name = ‘log_archive_dest’;
It will show the current destination of Archivelog
SQL>Alter system set log_archive_dest_1=’location=C:\oracle1\oradata\SHAAN\Archive’;
SQL>alter system archive log start;
Differences concerning backups: NoarchiveLog and Archivelog Mode
|Noarchivelog Mode||Archivelog Mode|
|Must backup entire database||Can backup parts of database (datafiles tablespaces)|
|DB must be shut down||No Need to Shutdown database|
|Only entire DB can be restored||Tablespaces can be restored|
|In case of a failure, all changes since
the last backup will be lost
|All committed transactions will be restorable|
|Hot Backup is not Possible||Hot Backup is possible|
There are several system views that can provide us with information regarding archives, V$DATABASE
Identifies whether the database is in ARCHIVELOG or NOARCHIVELOG mode and whether MANUAL (archiving mode) has been specified.
Displays historical archived log information from the control file. If you use a recovery catalog, the RC_ARCHIVED_LOG view contains similar information.
Describes the current instance, all archive destinations, and the current value, mode, and status of these destinations.
Displays information about the state of the various archive processes for an instance.
Contains information about any backups of archived logs. If you use a recovery catalog, the RC_BACKUP_REDOLOG contains similar information.
Displays all redo log groups for the database and indicates which need to be archived.
Contains log history information such as which logs have been archived and the SCN range for each archived log. Using these tables we can verify that we are infact in ARCHIVELOG mode: