|
|
||||||||||||
|
|
|
An Oracle database can be either in archive or
noarchive mode. A production database should definitelly run in archive
log mode. Otherwise, the likelyhood to loose data approaches 100%.
A standby database environment requires archive log mode.
Noarchive log mode
If the database is in noarchive log mode, online redo logs can (and will) be overwritten without
making sure they are saved. This implies that a database cannot be recovered even if backups were made.
Archive log mode
If the database is in log archive mode, the database makes sure that online redo logs are not overwritten befor the have been archived.
log_archive_dest_n (or, deprecated on EE
log_archive_dest ) specify where the archived
redo logs go.
Backup after a structural change in the database
After a structural change to the database (such as adding a datafile), a backup is required.
Switching from noarchive to archivelog mode
The database is currently in noarchivelog mode:
SQL> select log_mode from v$database;
Of course, arch is not started. It would
wouldn't make sense, after all.
SQL> show parameter log_archive_start
Now, trying to put the db in archivelog:
SQL> alter database archivelog;
Ok, we shut the database down und mount it only (that is we don't open it) to change the log mode.
After having changed it, we open the database:
adpdb:/users/dba/oracle/dba >sqlplus "/ as sysdba"
Still, the arch process has to be started. This can be done via the
init.ora file (and a subsequen restart):
log_archive_dest = /backup/adpdb/logarch/adpdb_
The important parameter is log_archive_start.
Additionally, arch can be started manually:
alter system archive log start;
Differences concerning backups
|