|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
目前的方案是用mysqlbinlog工具,增加一个Flashback参数,输出结果为一个新的binlog文件――姑且叫做flashbacklog,这个flashbacklog顺序执行,可制定某张表和执行到哪个pos,来实现数据库的闪回。V$SYSTEM_EVENTshowsthetotalnumberofwaitsandtimeouts,andthetotal
waitingtimerecordedforeachtypeofevent,accumulatedforallprocessesover
thelifeoftheinstance.Itisnormaltoordertheeventswaitedforindescending
orderofthetotaltimewaited,asanindicatorofthepotentialseverityofeach
typeofwait.
However,thetotaltimewaitedisreallyonlymeaningfulforthosethatindicate
waitingforresources.Ifprocesseshavebeenwaitingbecausetheyhavenowork
todo,thenthetimewaitedisimmaterial.Iftheyhavebeenwaitingforroutine
operations,suchasdiskI/O,thenthetotaltimewaitedwilldependonthe
workload.Insuchcases,theaveragetimewaitedismuchmoreinterestingthan
thetotaltimewaited.
Thisclassificationofwaittypesintoidlewaits,routinewaits,andresourcewaits
isvitaltoacorrectunderstandingofthewaitstatistics.Accordingly,APThas
separatescriptsforresourcewaitsandroutinewaits,andignoresidlewaits
altogether.Theroutine_waits.sqlscriptshowsonlytheaveragetimewaitedfor
eachtypeofroutinewait.Theresource_waits.sqlscript(seeExample2.1)shows
thetypesofresourceswaitedforindescendingorderofthetotaltimewaited,but
alsoshowstheaveragetimewaited.
resources_wait.sql:
-----------------------------------------------------------------------------------Script:resource_waits.sql--Purpose:toshowthetotalwaitingtimeforresourcetypes----Copyright:(c)1998IxoraPtyLtd--Author:SteveAdams---------------------------------------------------------------------------------@reset_sqlpluscolumnaverage_waitformat9999990.00selectsubstr(e.event,1,40)event,e.time_waited,e.time_waited/(e.total_waits-decode(e.event,latchfree,0,e.total_timeouts))average_waitfromsys.v_$system_evente,sys.v_$instanceiwheree.event=bufferbusywaitsore.event=enqueueore.event=freebufferwaitsore.event=globalcachefreelistwaitore.event=latchfreeore.event=logbufferspaceore.event=parallelqueryqreflatchore.event=pipeputore.event=writecompletewaitsore.eventlikelibrarycache%ore.eventlikelogfileswitch%or(e.event=rowcachelockandi.parallel=NO)unionallselectnon-routinelogfilesyncs,round(e.average_wait*greatest(e.total_waits-s.value,0)),e.average_waitfromsys.v_$system_evente,sys.v_$sysstatswheree.event=logfilesyncands.name=usercommitsorderby2desc/@reset_sqlplus个中和reset_sqlplus是:
-----------------------------------------------------------------------------------Script:reset_sqlplus.sql--Purpose:toresetsqlplussettings----Copyright:(c)1998IxoraPtyLtd--Author:SteveAdams---------------------------------------------------------------------------------clearbreaksclearcolumnsclearcomputessetfeedbackoffsetverifyoff
材料Oracle8iInternalServices
操作被同步到从库上后,则主从都“回天无力”。 |
|