分类: Oracle
2010-06-22 16:33:01
ALTER SYSTEM ARCHIVE LOG CURRENT;和ALTER SYSTEM ARCHIVE LOG ALL;的区别
CURRENT是归档所有日志,做日志切换
all是归档除当前日志以外的日志,不做日志切换。
与表面意义不同,注意。
另,ALTER SYSTEM SWITCH LOGFILE;切换当前日志,不一定归档当前日志
只有当自动归档打开的时候才会归档当前日志
即
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
参考oracle文档
After an or inconsistent , always ensure that you have the redo necessary to recover the backup by archiving the unarchived redo logs. When the database is open, run the following SQL statement to force Oracle to switch out of the current log and archive it as well as all other unarchived logs:
ALTER SYSTEM ARCHIVE LOG CURRENT;
When the database is mounted, open, or closed, you can run the following SQL statement to force Oracle to archive all noncurrent redo logs:
ALTER SYSTEM ARCHIVE LOG ALL;
When the database is mounted, open, or closed, you can run the following SQL statement to archive a specific group, where integer
is the number of the group:
ALTER SYSTEM ARCHIVE LOG GROUP integer;