仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 814|回复: 8
打印 上一主题 下一主题

[学习教程] MYSQL网页设计DataGuard - ORA-00261毛病

[复制链接]
再见西城 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 22:40:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
即使对于MySQL的商业化的企业版来说,也没有高昂的许可证成本,当你将其与像甲骨文和微软之类的大型专有商业数据库比较的话。毛病
以下是在作failover时standby真个alertlog内容,情形时拔失落Primary的网线,摹拟Primary数据库收集情况俄然破坏。

--下行暗示standby真个standbyredolog已启用

RFS:Successfullyopenedstandbylogfile4:/global/oradata/ctsdb/stdby_redo04.log
TueAug3119:54:302004
MediaRecoveryLog/global/oradata/ctsdb/archive/arch1_8389.log
MediaRecoveryWaitingforthread1seq#8390(intransit)
TueAug3119:54:572004
RestartingdeadbackgroundprocessQMN0
QMN0startedwithpid=12
TueAug3119:55:192004

--入手下手failover,第一步
ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEFINISH
TueAug3119:55:192004
TerminalRecovery:requestposted
TueAug3119:55:482004

--在SQLPLUS端finish命令没有报错,一般停止,可是上面几行显现standbyredofile并没有被准确recover
Warning:log4ofthread1isbeingarchivedormodified
MRP0:BackgroundMediaRecoveryterminatedwitherror261
TueAug3119:55:482004
Errorsinfile/export/home/oracle/app/oracle/admin/ctsdb/bdump/ctsdb_mrp0_2201.trc:
ORA-00261:log4ofthread1isbeingarchivedormodified
ORA-00312:onlinelog4thread1:/global/oradata/ctsdb/stdby_redo04.log
Recoveryinterrupted.
MRP0:BackgroundMediaRecoveryprocessshutdown
TueAug3119:55:482004
TerminalRecovery:completiondetected
Completed:ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEFI

--failover第二步,实行switchover
TueAug3119:56:012004
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
TueAug3119:56:012004
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
DatabasenotrecoveredthroughEnd-Of-REDO
DatabasenotrecoveredthroughEnd-Of-REDO

--switchover报错,没法将standby转为primary
Switchover:Mediarecoveryrequired-standbynotinlimbo
ORA-16139signalledduring:ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY...

--实验利用activate命令,一样报ORA-00261毛病
TueAug3119:57:162004
ALTERDATABASEACTIVATESTANDBYDATABASE
TueAug3119:57:162004
ALTERDATABASEACTIVATE[PHYSICAL]STANDBYDATABASE
TueAug3119:57:312004
Warning:log4ofthread1isbeingarchivedormodified
Activatestandbydatabasereceivederror261
ORA-261signalledduring:ALTERDATABASEACTIVATESTANDBYDATABASE...
TueAug3119:58:182004
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
TueAug3119:58:182004
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
DatabasenotrecoveredthroughEnd-Of-REDO
DatabasenotrecoveredthroughEnd-Of-REDO
Switchover:Mediarecoveryrequired-standbynotinlimbo
ORA-16139signalledduring:ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY...

--从头将standby置为办理恢复形式
TueAug3120:04:182004
ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEDISCONNECTFROMSESSION
AttempttostartbackgroundManagedStandbyRecoveryprocess
MRP0startedwithpid=12
MRP0:BackgroundManagedStandbyRecoveryprocessstarted
TueAug3120:04:222004
RFS:Possiblenetworkdisconnectwithprimarydatabase
TueAug3120:04:242004
Startingdatafile1recoveryinthread1sequence8390
Datafile1:/global/oradata/ctsdb/system01.dbf
Startingdatafile2recoveryinthread1sequence8390
Datafile2:/global/oradata/ctsdb/undotbs01.dbf
Startingdatafile3recoveryinthread1sequence8390
Datafile3:/global/oradata/ctsdb/indx01.dbf
Startingdatafile4recoveryinthread1sequence8390
Datafile4:/global/oradata/ctsdb/tools01.dbf
Startingdatafile5recoveryinthread1sequence8390
Datafile5:/global/oradata/ctsdb/users01.dbf
Startingdatafile6recoveryinthread1sequence8390
Datafile6:/global/oradata/ctsdb/perfstat.dbf
Startingdatafile7recoveryinthread1sequence8390
Datafile7:/global/oradata/ctsdb/stk_his_data1_01.dbf
Startingdatafile8recoveryinthread1sequence8390
Datafile8:/global/oradata/ctsdb/stk_his_data2_01.dbf
Startingdatafile9recoveryinthread1sequence8390
Datafile9:/global/oradata/ctsdb/stk_his_data3_01.dbf
Startingdatafile10recoveryinthread1sequence8390
Datafile10:/global/oradata/ctsdb/stk_his_data4_01.dbf
Startingdatafile11recoveryinthread1sequence8390
Datafile11:/global/oradata/ctsdb/stk_his_ind_ts01.dbf
Startingdatafile12recoveryinthread1sequence8390
Datafile12:/global/oradata/ctsdb/stk_his_ind_ts03.dbf
Startingdatafile13recoveryinthread1sequence8390
Datafile13:/global/oradata/ctsdb/stk_his_ind_data1_01.dbf
Startingdatafile14recoveryinthread1sequence8390
Datafile14:/global/oradata/ctsdb/stk_his_ind_data2_01.dbf
Startingdatafile15recoveryinthread1sequence8390
Datafile15:/global/oradata/ctsdb/stk_his_ind_data3_01.dbf
Startingdatafile16recoveryinthread1sequence8390
Datafile16:/global/oradata/ctsdb/stk_his_ind_data4_01.dbf
Startingdatafile17recoveryinthread1sequence8390
Datafile17:/global/oradata/ctsdb/stk_his_ts01.dbf
Startingdatafile18recoveryinthread1sequence8390
Datafile18:/global/oradata/ctsdb/stk_his_ts02.dbf
Startingdatafile19recoveryinthread1sequence8390
Datafile19:/global/oradata/ctsdb/stk_inx_ts01.dbf
Startingdatafile20recoveryinthread1sequence8390
Datafile20:/global/oradata/ctsdb/stk_inx_ts02.dbf
Startingdatafile21recoveryinthread1sequence8390
Datafile21:/global/oradata/ctsdb/stk_ts01.dbf
Startingdatafile22recoveryinthread1sequence8390
Datafile22:/global/oradata/ctsdb/stk_ts02.dbf
Startingdatafile23recoveryinthread1sequence8390
Datafile23:/global/oradata/ctsdb/logmnrts01.dbf
Startingdatafile24recoveryinthread1sequence8390
Datafile24:/global/oradata/ctsdb/ts_test01.dbf
Startingdatafile25recoveryinthread1sequence8390
Datafile25:/global/oradata/ctsdb/ts_test02.dbf
Startingdatafile26recoveryinthread1sequence8390
Datafile26:/global/oradata/ctsdb/stk_his_ind_ts02.dbf
Startingdatafile27recoveryinthread1sequence8390
Datafile27:/global/oradata/ctsdb/stk_ts03.dbf
MediaRecoveryWaitingforthread1seq#8390
TueAug3120:04:242004
Completed:ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEDI

--用skipstandbylogfile选项作failover
TueAug3120:04:402004
ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEFINISHSKIPSTANDBYLOGFILE
TueAug3120:04:402004
DatabasenotrecoveredthroughEnd-Of-REDO
TerminalIncompleteRecovery:requestposted
TueAug3120:04:542004
TerminalIncompleteRecovery:UNTILCHANGE3592753
TerminalIncompleteRecovery:End-Of-Redologallocation
TerminalIncompleteRecovery:log4reservedforthread1seq#8390
TERMINALRECOVERYchangingdatafileformatversionfrom8.0.0.0.0to9.0.0.0.0
Switchinglogfileformatversionfrom8.0.0.0.0to9.0.0.0.0
TerminalIncompleteRecovery:clearingstandbyredologs.
TerminalIncompleteRecovery:thread1seq#8390redorequired
TerminalIncompleteRecovery:End-Of-Redolog/global/oradata/ctsdb/stdby_redo04.log
Identifiedend-of-REDOforthread1sequence8390
TerminalIncompleteRecovery:endcheckpointSCN3592754
MRP0:MediaRecoveryComplete
Switchinglogfileformatversionfrom9.0.0.0.0to8.0.0.0.0
TerminalIncompleteRecovery:successfulcompletion
Begin:Waitforstandbylogfilestobearchived
TueAug3120:04:552004
ARC0:Evaluatingarchivelog4thread1sequence8390
ARC0:Beginningtoarchivelog4thread1sequence8390
TueAug3120:04:552004
ARC1:Evaluatingarchivelog4thread1sequence8390
TueAug3120:04:552004
CreatingarchivedestinationLOG_ARCHIVE_DEST_1:/global/oradata/ctsdb/archive/arch1_8390.log
TueAug3120:04:552004
ARC1:Unabletoarchivelog4thread1sequence8390
Logactivelybeingarchivedbyanotherprocess
TueAug3120:04:552004
ARC0:Completedarchivinglog4thread1sequence8390
TueAug3120:05:102004
End:Allstandbylogfileshavebeenarchived
ResettingstandbyactivationID4038461969(0xf0b60a11)
MRP0:BackgroundMediaRecoveryprocessshutdown
TueAug3120:05:102004
TerminalIncompleteRecovery:completiondetected
Completed:ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEFI

--failover乐成,可是能够看到数据库作了resetlogs,这并非我们但愿的,并且因为skip了以后的standbyredolog,以是一定有相称的数据丧失。
TueAug3120:05:122004
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY
RESETLOGSafterincompleterecoveryUNTILCHANGE3592754
ResettingresetlogsactivationID0(0x0)
Onlinelog3ofthread1waspreviouslycleared
Onlinelog5ofthread0waspreviouslycleared
Onlinelog6ofthread0waspreviouslycleared
Onlinelog7ofthread0waspreviouslycleared
RESETLOGSchangingdatafileformatversionfrom9.0.0.0.0to8.0.0.0.0
Switchover:Complete-Databaseshutdownrequired
Completed:ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY

查metalink,只说这类情形是大概由于standbyredolog没有被启用而引发的,可是我这里的情形分明是已被启用了。
最近由权威调查机构Evans数据公司进行的一项调查显示,MySQL在过去两年已经获得了25%的市场份额。该调查公司还预测,相比其他的开源数据库和闭源数据库。
再见西城 该用户已被删除
沙发
 楼主| 发表于 2015-1-19 21:08:11 | 只看该作者
光写几个SQL实在叫无知。
若天明 该用户已被删除
板凳
发表于 2015-1-24 19:53:42 | 只看该作者
我们学到了什么?思考问题的时候从表的角度来思考问
因胸联盟 该用户已被删除
地板
发表于 2015-2-2 12:57:10 | 只看该作者
至于淘汰的问题,只能说在你的项目周期之内,微软应该都不会倒闭。
谁可相欹 该用户已被删除
5#
发表于 2015-2-7 20:15:40 | 只看该作者
所以你总能得到相应的升级版本,来满足你的需求。
兰色精灵 该用户已被删除
6#
发表于 2015-2-23 09:51:11 | 只看该作者
大侠们有推荐的书籍和学习方法写下吧。
蒙在股里 该用户已被删除
7#
发表于 2015-3-7 07:16:11 | 只看该作者
分区表效率问题肯定是大家关心的问题。在我的试验中,如果按照分区字段进行的查询(过滤)效率会高于未分区表的相同语句。但是如果按照非分区字段进行查询,效率会低于未分区表的相同语句。
小魔女 该用户已被删除
8#
发表于 2015-3-14 14:44:27 | 只看该作者
Mirror可以算是SQLServer的Dataguard了。但是能不能被大伙用起来就不知道了。
柔情似水 该用户已被删除
9#
发表于 2015-3-21 10:00:28 | 只看该作者
这是一个不错的新特性。虽然索引的附加字段没有索引键值效率高,但是相对映射到数据表中效率还是提高了很多。我做过试验,在我的实验环境中会比映射到表中提高30%左右的效率。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-12-29 23:49

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表