系统集成启动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 个回答yangyijun230的回答

yangyijun230yangyijun230系统工程师江苏准成
回复 2# zp_ccc


    灰常灰常感谢版主的支援,问题终于解决了!

也非常感谢大家的关注!谢谢!

不过还有一个疑问,现在我的这个库的状态是abort tran on log full
不知道是不是安全的或者说是正常数据库应该的状态的??


        ------------------------------------------------------------------------------------------------------
cmrpii                      22000.0 MB sa                            4
         Jun 14, 2004  
         abort tran on log full                                                                                 
master                        400.0 MB sa                            1
         Jun 11, 2004  
         no options set                                                                                         
model                          16.0 MB sa                            3
         Jun 11, 2004  
         select into/bulkcopy/pllsort, allow nulls by default                                                   
sybsystemdb                    48.0 MB sa                        31513
         Jun 11, 2004  
         no options set                                                                                         
sybsystemprocs                200.0 MB sa                        31514
         Jun 11, 2004  
         trunc log on chkpt                                                                                    
tempdb                       1264.0 MB sa                            2
         Feb 09, 2012  
         select into/bulkcopy/pllsort, trunc log on chkpt, ddl in tran, allow nulls by de
         fault
系统集成 · 2012-02-09
浏览2667

回答者

yangyijun230
系统工程师江苏准成
擅长领域: 虚拟化云计算PowerVM

yangyijun230 最近回答过的问题

回答状态

  • 发布时间:2012-02-09
  • 关注会员:1 人
  • 回答浏览:2667
  • X社区推广