过着简单,真实的生活,喜欢收藏变形金刚(TFE,G1,SL系列),研究金融股市,KOF98,篮球,学习研究Oracle技术,我并不是一个全职的Oracle DBA,但是对于Oracle技术的热爱和研究,是一个不争的事实,愿意结交广大Oracle技术爱好者!MSN:oracle_kof_tf@hotmail.com

alter system archive log current noswitch!!

上一篇 / 下一篇  2007-12-27 16:56:09 / 个人分类:Oracle数据库技术-数据库管理

刚才犯了一个低级的错误。
为了归档我的日志,我不小心加上了一个noswitch参数,而且我的数据库不是standby的,这个操作导致数据库被close了。幸亏即时打开,不然又得忙活了.......

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

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

ALTER SYSTEM SWITCH LOGFILE ;

SWITCH LOGFILE Clause

TheSWITCHLOGFILEclause 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

SpecifyCURRENTto manually archive the current redo log file group of the specified thread, forcing a log switch. If you omit theTHREADparameter, then Oracle archives all redo log file groups from all enabled threads, including logs previous to current logs. You can specifyCURRENTonly when the database is open.

ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH;
NOSWITCH

SpecifyNOSWITCHif 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 theNOSWITCHclause 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


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar