Sybase12.5日志满问题的解决

日志满分为两种情况:1.非master(用户库或者其他系统库sybsystemprocs)库的日志满,导致用户库不能访问;2.系统库master日志满,导致服务都不能正常启动。针对以上情况要分别对待处理。

1.非master库日志满的处理:

重庆数据库后台sybsystemprocs库日志报满:09:00000:01631:2011/11/13 06:45:36.16 server  Error: 3475, Severity: 21, State: 7
09:00000:01631:2011/11/13 06:45:36.16 server  There is no space available in SYSLOGS to log a record for which space has been reserved. This process will retry at intervals of one minute.

11:00000:04104:2011/11/13 06:20:11.87 server  Space available in the log segment has fallen critically low in database 'sybsystemprocs'.  All future modifications to this database will be suspended until the log is successfully dumped and space becomes available.
00:00000:02407:2011/11/13 06:20:11.89 server  Error: 2812, Severity: 16, State: 5
00:00000:02407:2011/11/13 06:20:11.89 server  Stored procedure 'sp_thresholdaction' not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

或某个用户库etoh2_cq的日志空间满报:

00:00000:00001:2008/12/02 17:28:07.38 server  Error: 1105, Severity: 17, State: 3
00:00000:00001:2008/12/02 17:28:07.38 server  Can't allocate space for object 'syslogs' in database 'etoh2_cq' 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:2008/12/02 17:28:07.38 server  Error: 3475, Severity: 21, State: 7
00:00000:00001:2008/12/02 17:28:07.38 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、马上增加日志设备,并把设备分配给数据库。

alter database name log on 设备名=200;--设备名泛指日志设备,如果设备文件还没在磁盘上初始化,则先需要disk init初始化设备文件,

--如果是系统库,可以考虑先不加设备。

go

2、把数据库置于-32768状态,再把日志清除。

-- -32768这个状态值根据实际情况作出调整.

--各状态值的含义详见我的blog:Sybase ASE12.5数据库状态值的含义

--http://blog.csdn.net/xujinyang/article/details/6968650

sp_configure "allow update",1

go

update master..sysdatabases set status=-32768 where name='数据库名'

go

shutdown with nowait  --(注意:可能会延长启动SYBASE数据库时间,若确认没有用户在用,请使用shutdown with wait)

go

--在sybase install目录下

startserver -f RUN_etoh

--启动完成

isql -Usa -P -Sservername

1>dump tran database_name with no_log

2>go

3>update master..sysdatabases set status=0 where name='数据库名'

4>go

5>sp_configure "allow update",0

6>go

7>shutdown with nowait

8>go

重启SYBASE后,日志满报错数据库正常了。


2.master库日志满,已经导致数据库服务都不正常启动情况下
日志如下:
Recovering database 'master' 
00:00000:00001:2004/03/12 10:05:27.70 server Redo pass of recovery has processed 10 committed and 0 aborted transactions. 
00:00000:00001:2004/03/12 10:05:27.81 server No such message: 1105 
00:00000:00001:2004/03/12 10:05:27.81 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、在启动文件中加-T3607 -m,然后用sa进 
dump tran master with no_log或 
alter database master on 设备名=xxxM 即可 --设备名泛指master库设备
如还遇到以下问题: 
启动报:Error: 3475, Severity: 21, State: 7 
00:00000:00006:2004/03/12 10:38:55.71 server There is no space available in SYSLOGS for process 6 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. 
用sa登陆进不去:报: 
Can't allocate space for object 'syslogs' in database 'master' 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. 
Msg 3475, Level 21, State 7: 
There is no space available in SYSLOGS for process 6 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. 
CT-LIBRARY error: 
ct_connect(): user api layer: internal Client Library error: Read from t 
he server has timed out. 

2、 再加 -T699(Turn off transaction logging for the entire SQL dataserver) 
这次sa可进 
执行 
alter database master on master_dev=xxxM 报和上面一样的错 
dump tran master with no_log也不行 

3、 再加-T7409 
执行 alter database master on master_dev=xxxM ok 
问题解决

--其中 http://manuals.sybase.com/onlinebooks/group-as/asg1250e/svrtsg/ 是针对sybase ASE 12.5很多出错问题的处理指南

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值