日志满分为两种情况: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<wbr style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">Error: 1105, Severity: 17, State: 3</span><br style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">00:00000:00001:2008/12/02 17:28:07.38 server</span><wbr style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">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.</span><br style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">00:00000:00001:2008/12/02 17:28:07.38 server</span><wbr style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">Error: 3475, Severity: 21, State: 7</span><br style="line-height:21px; text-align:left"><span style="line-height:21px; text-align:left">00:00000:00001:2008/12/02 17:28:07.38 server</span><wbr style="line-height:21px; text-align:left"><span style="text-align:left">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.</span></wbr></wbr></wbr></wbr>
处理方法步骤:
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<wbr>--(注意:可能会延长启动SYBASE数据库时间,若确认没有用户在用,请使用shutdown with wait)</wbr>
go
--在sybase install目录下
startserver -f RUN_etoh
--启动完成
isql -Usa -P -Sservername
1>dump tran database_namewith truncate_only --no_log也可以
2>go
3>sp_configure "allow update",1
4>go
5>update master..sysdatabases set status=0 where name='数据库名'
6>go
7>shutdown with wait
8>go
重启SYBASE后,日志满报错数据库正常了。
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
问题解决