不可轻言放弃,否则对不起自己!

alter system switch logfile 与 alter system archive log current区别

上一篇 / 下一篇  2012-12-20 09:10:40 / 个人分类:数据库

alter system switch logfile 不仅交换LOGFILE而且还存档
而alter system archive log current只是存档,不一定会交换logfile



官方解释

SWITCH LOGFILE Clause

The SWITCH LOGFILE clause lets you explicitly force Oracle Database to begin writing to a new redo log file group, regardless of whether the files in the current redo log file group are full. When you force a log switch, Oracle Database begins to perform. a checkpoint but returns control to you immediately rather than when the checkpoint is complete. To use this clause, your instance must have the database open.

ARCHIVE LOG CURRENT Clause

Specify CURRENT to manually archive the current redo log file group of the specified thread, forcing a log switch. If you omit the THREAD parameter, then Oracle Database archives all redo log file groups from all enabled threads, including logs previous to current logs. You can specify CURRENT only when the database is open.



论坛:
我发现两个命令执行后都产生归档了,我也观察了是不是有这样的区别,就是switch logfile后他的状态等待没有完成的事务,等事务完成后会归档,
而archive log current是直接就归档了。

TAG:

 

评分:0

我来说两句

Open Toolbar