系统集成启动Sybase

在线求助!sybase数据库启动挂起!

这个错误在网上看到过好些解决方法,由于对sybase不熟悉,所以也不敢操作尤其是对一些操作步骤不了解,希望有做过相关操作的大拿们不吝赐教哈!下面是截取的部分日志:00:00000:00001:2012/02/08 17:13:36.17 server  Undo pass: 50532449 records done (84%); 8917500...显示全部

这个错误在网上看到过好些解决方法,由于对sybase不熟悉,所以也不敢操作尤其是对一些操作步骤不了解,
希望有做过相关操作的大拿们不吝赐教哈!
下面是截取的部分日志:
00:00000:00001:2012/02/08 17:13:36.17 server  Undo pass: 50532449 records done (84%); 8917500 records left.
00:00000:00001:2012/02/08 17:14:24.80 server  Error: 1105, Severity: 17, State: 3
00:00000:00001:2012/02/08 17:14:24.81 server  Can't allocate space for object 'syslogs' in database 'cmrpii' 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:2012/02/08 17:14:24.83 server  Error: 3475, Severity: 21, State: 7
00:00000:00001:2012/02/08 17:14:24.83 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.
00:00000:00019:2012/02/09 07:33:11.23 kernel  Cannot read, host process disconnected:  1956 spid: 19

网上看到的相关解决方法:
1> sp_configure "allow updates", 1
2> go

1> begin transaction
2> go

1> update master..sysdatabases
2> set status = status & ~256(对这个参数不了解,网上还有设置^256)
3> where name = ""
4> go

1> update master..sysdatabases
2> set status = status | 4112(?)
3> where name = ""
4> go

Check that each of the above update commands affected only one row. If more than one row was affected, issue a rollback transaction. Otherwise, commit the transaction and shut down Adaptive Server:

1> commit transaction
2> go


1> shutdown
2> go

Restart Adaptive Server.

Dump the transaction log with the no_log option and reset the database status:

1> use master
2> go


1> dump tran with no_log
2> go

1> sp_dboption , "no chkpt", false
2> go

1> sp_dboption , single, false
2> go

1> use
2> go

1> checkpoint
2> go

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


还有一个方案:
1>sp_configure 'allow update',1  
2>go  
1>use master  
2>go  
1>sp_helpdb DB_NAME  
2>  
记下此处查询出的数据库选项 (例如:select into/bulkcopy等)  (这步没看明白,到底要看什么选项?)
1>begin tran  
2>go  
1>update sysdatabases set status = -32768(这个参数是什么意思?) where name = 'DB_NAME' (注意:一定要加上数据库名称条件,切记,最好使用事务)  
2>go  
如果显示 (1 row affected),commit,否则 rollback  
1>commit  
2>go  copyright  
1>shutdown with nowait  
2>go  
第3. 重新重复步骤1,启动数据库服务器,注意观察日志中是否显示 在 recovery database DB_NAME 时使用bypass状态,如果正常,这种情况下,数据库服务器应该能够完全启动  
第4. 使用isql连接进入数据库服务器  
isql -Usa -Ppasswd -S server_name  
1>use master  
2>go  
1>dump tran DB_NAME with no_log ( dbcc rebuild_log(DBNAME,1,1) )  
2>go  
1>update sysdatabases set status = 0 where name = 'DB_NAME' (注意:一定要加上数据库名称条件,切记)  
2>go  
1>shutdown with nowait  
2>go  
第5. 重新重复步骤1,启动数据库服务器,注意观察日志中是否显示 recovery database DB_NAME 成功,DB_NAME数据库online  
内容来自ltesting.net

第6. 恢复数据库选项  
使用isql连接进入数据库服务器  
isql -Usa -Ppasswd -S server_name  
1>use master  
2>go  
1>sp_dboption DB_NAME,'select into',true  (??)
2>go  
1>use DB_NAME  
2>go  
1>checkpoint  
2>go  
上述的两个解决方法不知道对不对?


我见处理日志上建议可以ALTER DATABASE or sp_extendsegment to increase size of the segment
不知道怎么操作??

这是当前数据库的服务进程状态
$ ./showserver
USER         PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND
sybase    999424  0.5  0.0 20044 6832      - A    16:50:53 20:56 /sybase125/ASE-12_5/bin/dataserver -ssybase -d/sybase125/master.dat -e/sybase125/ASE-12_5/install/sybase.log -c/sybase125/ASE-12_5/sybase.cfg -M/sybase125/ASE-12_5
sybase    950498  0.0  0.0 8956 3332      - A    16:51:07  0:00 /sybase125/ASE-12_5/bin/backupserver -Ssybase_back -e/sybase125/ASE-12_5/install/sybase_back.log -c/sybase125/tapedump.cfg -N25 -C20 -M/sybase125/ASE-12_5/bin/sybmultbuf
不知道还需要其它什么相关信息,需要的话大拿们尽管提哈!在这先拜托各位了哈!收起
参与17

查看其它 15 个回答pomtch的回答

pomtchpomtch系统工程师北京交大科技有限公司
可能是日志满了或有表损坏的情况下都需要用这2楼的方法,我经常使用。
软件开发 · 2013-09-25
浏览2480

回答者

pomtch
系统工程师北京交大科技有限公司
擅长领域: 服务器系统管理AIX

pomtch 最近回答过的问题

回答状态

  • 发布时间:2013-09-25
  • 关注会员:1 人
  • 回答浏览:2480
  • X社区推广