ITPub博客

alter system archive log current noswitch!!

原创 Linux操作系统 作者:oracle_ace 时间:2007-12-27 16:56:09 0 删除 编辑
刚才犯了一个低级的错误。
为了归档我的日志,我不小心加上了一个noswitch参数,而且我的数据库不是standby的,这个操作导致数据库被close了。幸亏即时打开,不然又得忙活了.......

alter system switch logfile
alter system archive log current
alter system archive log noswitch

的具体解释如下,记录于此以警视自己。

ALTER SYSTEM SWITCH LOGFILE ;

SWITCH LOGFILE Clause

The SWITCH LOGFILE clause lets you explicitly force Oracle 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 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.

ALTER SYSTEM ARCHIVE LOG CURRENT ; 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 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.

ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH; NOSWITCH

Specify NOSWITCH if you want to manually archive the current redo log file group without forcing a log switch. This setting is used primarily with standby databases to prevent data divergence when the primary database shuts down. Divergence implies the possibility of data loss in case of primary database failure.

You can use the NOSWITCH clause only when your instance has the database mounted but not open. If the database is open, then this operation closes the database automatically. You must then manually shut down the database before you can reopen it

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12361284/viewspace-7631/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    284
  • 访问量
    783357