Chinaunix首页 | 论坛 | 博客
  • 博客访问: 380454
  • 博文数量: 113
  • 博客积分: 3035
  • 博客等级: 中校
  • 技术积分: 1430
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-01 16:32
文章分类
文章存档

2011年(42)

2010年(70)

2009年(1)

我的朋友

分类: 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文档

Archiving Unarchived Redo Log Files

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;
阅读(838) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~