免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5072 | 回复: 10
打印 上一主题 下一主题

SYBASE一些故障处理方法 [复制链接]

论坛徽章:
33
ChinaUnix元老
日期:2018-07-04 15:10:362015年亚洲杯之阿联酋
日期:2015-02-06 17:15:532015亚冠之武里南联
日期:2015-06-06 15:40:252015亚冠之北京国安
日期:2015-06-17 15:42:412022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:322015亚冠之阿尔纳斯尔
日期:2015-09-20 09:42:1215-16赛季CBA联赛之北京
日期:2016-01-15 10:03:5915-16赛季CBA联赛之青岛
日期:2016-04-26 16:44:4915-16赛季CBA联赛之广夏
日期:2018-07-04 15:33:21C
日期:2016-10-25 16:12:142017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之同曦
日期:2017-02-22 22:41:10
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-31 15:43 |只看该作者 |倒序浏览
Error: 3475, Severity: 21, State:
7
00:00000:00001:2000/01/04 07:43:42.68 server Can't allocate space for object
'syslogs' in database 'DBbad' because 'logsegment' segment is full/has no free
extents. If you ran out of space in syslogs, dump the transaction log.
Otherwise, use ALTER DATABASE or sp_extendsegment to increase size of the
segment.
00:00000:00001:2000/01/04 07:43:42.68 server Error: 3475, Severity: 21, State:
7
00:00000:00001:2000/01/04 07:43:42.68 server There is no space available in
SYSLOGS for process 1 to log a record for which space has been reserved. This
process will retry at intervals of one minute. The internal error number is -4.

1. You will have to bring the server up with trace flag 3608 to prevent the
    recovery of the user databases.
2. sp_configure "allow updates",1
    go
3. Write down the segmap entries from the sysusages table for the toasted
    database.
4. update sysusages
       set segmap = 7
    where dbid   = db_id("my_toasted_db")
       and segmap = 3
5. select status - 320
      from sysdatabases
    where dbid = db_id("my_toasted_db") -- save this value.
    go
    begin transaction
    update sysdatabases set status = -32768 where dbid = db_id("my_toasted_db")
    go -- if all is OK, then...
    commit transaction
    go
    shutdown
    go
6. Restart the server without the trace flag.  With luck it should now have
    enough space to recover.  If it doesn't, you are in deeper trouble than
    before, you do have a good, recent backup don't you?
7. dump database my_toasted_db with truncate_only
    go
8. Reset the segmap entries in sysusages to be those as saved in 3. above.
9. Shutdown ASE and restart.  (The traceflag should have gone at step 6., but
    ensure that it is not there!)

sybase数据库error 3474的解决。
3474错误:"During redo the page timestamp value is less than old timestamp from log.Page……"  


isql -Usa -P -Ssybase :

1>sp_configure "allow updates",1
2>go

1>update sysdatabases set status=-32768 where name="xtsum"
2>go

1>shutdown

2>go  

重新启动数据库服务。
isql -Usa -P -Ssybase
1>dbcc rebuild_log(xtsum,0,0)

2>go

1>dbcc rebuild_log(xtsum,1,1)
2>go

1>shutdown  

2>g
重新启动数据库服务器
isql -Usa -P -Ssybas
1>update sysdatabases set status=12 where name="xtsum"

2>g
1>sp_configure "allow updates",0  
2>
1>shutdown
2>
重启数据库后,恢复正常,rebuild log工作完成。

SYBASE3414错误处理:

解决办法:

重建数据库日志,方法如下:
 (1)赋予sa用户sybase_ts_role的角色
isql -Usa -P
1>sp_role "grant","sybase_ts_role",sa
2>go
1>quit

(2)将数据库置为"bypass recovery"状态
isql -Usa -P
1>sp_configure "allow updates",1
2>go
1>use master  
2>go  
1>update sysdatabases set status=-32768
2>where name="database_name"
3>go
1>shutdown with nowait r`;m'H!  
2>go

(3)rebuild数据库日志
重启Server
isql -Usa -P q=7$ |_.  
1>use master
2>go
1>dbcc rebuild_log(database_name,1,1)
2>go
1>shutdown with nowait
2>go

(4)重启server
1>use master
2>go
1>update sysdatabases set status=0 where name="database_name"
2>go
1>sp_configure "allow updates",0
2>go
1>shutdown with nowait
2>go

(5)在重启server之后,如果数据库恢复正常,rebuild log工作将会成功完成,否则要恢复数据库备份,使用dump database或bcp命令。


上面都是本人在实际工作当中碰到过,并且成功处理过的,希望能够给大家提供一点帮助,因为个在在前期出现这些问题时,真得没办法,在网上找了很长时间,最后参考SYBASE相关的文档,希望其他人不要走弯路。

论坛徽章:
1
2017金鸡报晓
日期:2017-01-10 15:19:56
2 [报告]
发表于 2008-10-31 17:56 |只看该作者
不错

论坛徽章:
33
ChinaUnix元老
日期:2018-07-04 15:10:362015年亚洲杯之阿联酋
日期:2015-02-06 17:15:532015亚冠之武里南联
日期:2015-06-06 15:40:252015亚冠之北京国安
日期:2015-06-17 15:42:412022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:322015亚冠之阿尔纳斯尔
日期:2015-09-20 09:42:1215-16赛季CBA联赛之北京
日期:2016-01-15 10:03:5915-16赛季CBA联赛之青岛
日期:2016-04-26 16:44:4915-16赛季CBA联赛之广夏
日期:2018-07-04 15:33:21C
日期:2016-10-25 16:12:142017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之同曦
日期:2017-02-22 22:41:10
3 [报告]
发表于 2008-11-01 08:59 |只看该作者
看来需要的人不多呀,自个顶一下

论坛徽章:
0
4 [报告]
发表于 2008-12-02 18:35 |只看该作者
多谢

论坛徽章:
0
5 [报告]
发表于 2008-12-03 17:18 |只看该作者
收藏了,希望以后能用上

论坛徽章:
0
6 [报告]
发表于 2008-12-09 12:51 |只看该作者
学习。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

论坛徽章:
0
7 [报告]
发表于 2008-12-10 13:08 |只看该作者
多谢,收藏

论坛徽章:
0
8 [报告]
发表于 2009-02-26 17:15 |只看该作者
up

论坛徽章:
0
9 [报告]
发表于 2009-02-27 05:27 |只看该作者
log full最简单的办法加log的空间。如果采用LZ的做法,第一,当前做的事务有可以会产生部分数据被修改的问题,第二、已经提交的事务很有可能数据没有写入硬盘中。

论坛徽章:
33
ChinaUnix元老
日期:2018-07-04 15:10:362015年亚洲杯之阿联酋
日期:2015-02-06 17:15:532015亚冠之武里南联
日期:2015-06-06 15:40:252015亚冠之北京国安
日期:2015-06-17 15:42:412022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:322015亚冠之阿尔纳斯尔
日期:2015-09-20 09:42:1215-16赛季CBA联赛之北京
日期:2016-01-15 10:03:5915-16赛季CBA联赛之青岛
日期:2016-04-26 16:44:4915-16赛季CBA联赛之广夏
日期:2018-07-04 15:33:21C
日期:2016-10-25 16:12:142017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之同曦
日期:2017-02-22 22:41:10
10 [报告]
发表于 2009-02-27 08:42 |只看该作者
原帖由 tyrone.dev 于 2009-2-27 05:27 发表
log full最简单的办法加log的空间。如果采用LZ的做法,第一,当前做的事务有可以会产生部分数据被修改的问题,第二、已经提交的事务很有可能数据没有写入硬盘中。



你说的有道理,但当时数据库服务器都无法启动,无法加载设备的情况下,采取的此种方式。不妥的正如你所说的情况,只能算是应急的一种办法了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP