将tempdb从master设备中转移时出现逻辑页面读取错误问题的解决

本文介绍我遇到的将tempdb从master设备上移走时出现的逻辑页面读取错误问题的解决方法。

sybase版本为:Adaptive Server Enterprise/15.0.3/EBF 16550 ESD#1/P/NT (IX86)/Windows 2003/ase1        503/2680/32-bit/OPT/Thu Mar 05 00:21:40 2009

开始时tempdb在master和tempdbdev两个设备上都放置数据和日志,如下:

1> select *from  sysusages
2> where dbid =2
3> go
 dbid   segmap      lstart      size        vstart      pad    unreservedpgs
         crdate                     vdevno
 ------ ----------- ----------- ----------- ----------- ------ -------------
         -------------------------- -----------
      2           7           0        1536       16388   NULL           694
                Dec  2 2009  6:58PM           0
      2           7        1536       25600           0   NULL         25500
                Dec  2 2009  7:01PM           2

由上可见,ASE15版本中默认给临时数据库在tempdbdev设备分配了100m的空间,比起12版本中默认的3M大多了!

为了减少存取系统表时对I/O资源的争夺,将tempdb从master设备上分离出来。

从网上可以找到方法:

sp_dropsegment "default",tempdb,master

sp_dropsegment "system",tempdb,master

sp_dopsegment "logsegment",tempdb,master

我使用的方法是直接删除sysusages表中临时数据库使用的空间分配信息。

1> begin tran
2> go
1> delete from sysusages
2> where dbid = 2 and size =1536
3> go
(1 row affected)
1> select * from sysusages
2> where dbid =2
3> go
 dbid   segmap      lstart      size        vstart      pad    unreservedpgs
         crdate                     vdevno
 ------ ----------- ----------- ----------- ----------- ------ -------------
         -------------------------- -----------
      2           7        1536       25600           0   NULL         25500
                Dec  2 2009  7:01PM           2

(1 row affected)
1> update sysusages
2> set lstart=0
3> where dbid = 2
4> go
(1 row affected)
1> select * from sysusages
2> go
 dbid   segmap      lstart      size        vstart      pad    unreservedpgs
         crdate                     vdevno
 ------ ----------- ----------- ----------- ----------- ------ -------------
         -------------------------- -----------
      1           7           0        6656           4   NULL          4200
                Dec  2 2009  6:58PM           0
      3           7           0        1536       13316   NULL           694
                Dec  2 2009  6:58PM           0
  31513           7           0        1536       19460   NULL           654
                Dec  2 2009  6:58PM           0
  31514           7           0       35840           0   NULL         12240
                Dec  2 2009  6:59PM           1
      2           7           0       25600           0   NULL         25500
                Dec  2 2009  7:01PM           2
  31513           7        1536        1536           0   NULL          1530
                Dec  2 2009  7:01PM           3
  31515           7           0       19200           0   NULL         14410
                Dec  2 2009  7:03PM           4
      4           3           0       76800           0   NULL         75656
                Dec  7 2009  2:28PM           5
      4           4       76800       25600           0   NULL         25500
                Dec  7 2009  2:28PM           6

(9 rows affected)

1> select * into tempdb.dbo.#lzf
2> from sysobjects
3> go
Msg 2762, Level 16, State 3:
Server 'TEST', Line 1:
The 'CREATE TABLE' command is not allowed within a multi-statement transaction
in the 'tempdb' database.
1> commit    (此时已经提交了事务,对sysusages的修改生效!)
2> go

我想往临时数据库中写入一些数据,将tempdb的数据和日志信息移到tempdbdev设备上。

1> select * into tempdb.dbo.#lzf
2> from sysobjects
3> go
Database name 'tempdb' ignored, creating table in temporary database 'tempdb'.
(132 rows affected)

继续插入更多的数据....

1> insert into tempdb..#lzf
2> select * from sybsystemprocs.dbo.sysobjects
3> go
(693 rows affected)
1> insert into tempdb..#lzf
2> select * from sybsystemprocs.dbo.sysobjects
3> go
(693 rows affected)
1> insert into tempdb..#lzf
2> select * from sybsystemprocs.dbo.sysobjects
3> go

(693 rows affected)

来一个写入速度更快的方法

1> insert into tempdb..#lzf
2> select * from tempdb..#lzf
3> go
(4290 rows affected)
1> insert into tempdb..#lzf
2> select * from tempdb..#lzf
3> go
(8580 rows affected)
1> insert into tempdb..#lzf
2> select * from tempdb..#lzf
3> go
(17160 rows affected)

。。。。。。

1> insert into tempdb..#lzf
2> select * from tempdb..#lzf
3> go
(137280 rows affected)

1> insert into tempdb..#lzf
2> select * from tempdb..#lzf
3> go
Space available in the log segment has fallen critically low in database
'tempdb'.  All future modifications to this database will be suspended until the
log is successfully dumped and space becomes available.
The transaction log in database tempdb is almost full.  Your transaction is
being suspended until space is made available in the log.
Space available in the log segment has fallen critically low in database
'tempdb'.  All future modifications to this database will be suspended until the
log is successfully dumped and space becomes available.
The transaction log in database tempdb is almost full.  Your transaction is
being suspended until space is made available in the log.

此时发现tempdb的日志满了,都怪向临时表#lzf写入的数据太多了(20万左右)。

于是赶紧执行dump tran tempdb with truncate_only,没有效果。日志都是活动的日志无法删除。即使执行

dump tran tempdb with no_log 也不行。

1> dump tran tempdb with truncate_only
2> go
DUMP TRANSACTION for database 'tempdb' could not truncate the log. Either extend
the log using ALTER DATABASE ... LOG ON command or eliminate the oldest active
transaction in database 'tempdb' shown in syslogshold table.
1> dump tran tempdb with no_log
2> go
DUMP TRANSACTION for database 'tempdb' could not truncate the log. Either extend
the log using ALTER DATABASE ... LOG ON command or eliminate the oldest active
transaction in database 'tempdb' shown in syslogshold table.

难道初始化一个设备然后加到tempdb上面去?好像在12版本中必须这么做。可能你会说启动server不就行了吗?的确是个好办法,下次数据库启动的时候tempdb被清空当然就不存在日志满的问题了。当时脑子中突然想到sybase15.0中不是提供了扩充设备大小的方法吗?为什么不试一试?用到了disk resize 命令

请看下面:

1> disk resize
2> name='tempdbdev',
3> size='100m'
4> go
1> sp_helpdevice tempdbdev
2> go
The transaction log in database tempdb is almost full.  Your transaction is
being suspended until space is made available in the log.

在查看设备信息的时候,因为sp_helpdevice要生成临时表,被hang住了。。。

于是,新开一个session在其中不敢进行使用临时表的操作,怕因为tempdb日志满再次被hang住。直接给tempdb分配数据和日志空间。

alter database tempdb on tempdbdev='50m' log on tempdbdev='50m'

执行完后提示分别在数据和日志段上分配了12800页。临时库扩空间成功,但是仅接着出现了两个错误信息。

还记得上面提到的两个被阻塞的会话吗?

执行sp_helpdevice tempdbdev的会话提示如下的错误信息:Msg 695, Level 21, State 1:
Server 'TEST', Procedure 'sp_helpdevice', Line 72:
An attempt was made to read logical page '808' for database 'tempdb' (2), object
'sysattributes' (21), index 'csysattributes' (3), partition 'csysattributes_21'
(21) from disk. Wrong logical page '2344' was brought into cache 'default data
cache'.
ASE is terminating this process.

在日志errorlog中对应的详细错误信息为:

==============================================================

00:00000:00028:2009/12/08 11:13:32.93 server  WARNING: ***************************
00:00000:00028:2009/12/08 11:16:49.53 server  Starting diagnostics for read failure:
00:00000:00028:2009/12/08 11:16:49.54 server  Device Information:
     Device number = 2
     Phyname = D:\sybase\data\tempdbdev.dat
00:00000:00028:2009/12/08 11:16:49.54 server  Buffer Information:
     Buf addr = 0x22DAF05C, Mass addr = 0x22DAF05C
     Buf pageno = 808, Mass pageno = 808, dbid = 2
00:00000:00028:2009/12/08 11:16:49.54 server 
     Buf virtpg = 808, Mass virtpg = 1616
     Buf stat = 0x1, Mass stat = 0x201008
     Mass keep = 1, Mass awaited = 0
00:00000:00028:2009/12/08 11:16:49.54 server  Page Information from first read attempt: Page read from disk ppageno = 2344, pptnid = 8, pindid = 0 pnextpg = 2345, pprevpg = 2343 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330441
00:00000:00028:2009/12/08 11:16:49.54 server  Page Information from second read attempt: Page read from disk ppageno = 2344, pptnid = 8, pindid = 0 pnextpg = 2345, pprevpg = 2343 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330441
00:00000:00028:2009/12/08 11:16:49.54 server  SDES Information:
     dbid = 2, objid = 21, sptnid = 21 scur.pageid = 808
     sstat = 0x200, sstat2 = 0x0
     suid = 1, cacheid = 0
00:00000:00028:2009/12/08 11:16:49.54 server  PSS Information:
     pstat = 0x10000, pcurdb = 2, pspid = 28
     p2stat = 0x1000, p3stat = 0x800
     plasterror = 0, preverror = 0, pattention = 0
00:00000:00028:2009/12/08 11:16:49.54 server  End diagnostics for read failure:
00:00000:00028:2009/12/08 11:16:50.68 kernel  Symbolic stack trace information is successfully loaded
00:00000:00028:2009/12/08 11:16:52.15 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x037D6F4C, 0x0000000C, 0x000003FC, 0x00000004)
00:00000:00028:2009/12/08 11:16:52.17 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x037D6F4C, 0x037D7344, 0x0000270F, 0x00000002)
00:00000:00028:2009/12/08 11:16:52.20 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x001F001F, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.23 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x001F001F, 0x00000001, 0x225803F0, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.23 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x22DAF05C, 0x22DAB300, 0x211BF268, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.32 kernel  pc: 0x007822E7 wrongpage__print_diagnostic+ 0x3a7 (0x22DAF05C, 0x211BF268, 0x00000001, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.32 kernel  pc: 0x00781898 wrongpage+ 0x4b8 (0x211BF268, 0x00000001, 0x00000020, 0x037D8550)
00:00000:00028:2009/12/08 11:16:52.32 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x037D85D0, 0x00000000, 0x211BF5EC, 0x20A1D608)
00:00000:00028:2009/12/08 11:16:52.35 kernel  pc: 0x0084E804 bt__traverse+ 0x424 (0x211BF268, 0x00000000, 0x037D8CE0, 0x0206CEC0)
00:00000:00028:2009/12/08 11:16:52.37 kernel  pc: 0x0082CCEC bt__getstartpg+ 0x30c (0x211BF268, 0x00000000, 0x00000001, 0x037D8ECC)
00:00000:00028:2009/12/08 11:16:52.37 kernel  pc: 0x00831450 bt_getnext+ 0x270 (0x211BF268, 0x037D9E3C, 0xBF23A868, 0x00000003)
00:00000:00028:2009/12/08 11:16:52.40 kernel  pc: 0x007F73D9 dol_bt_getnext+ 0x869 (0x211BF268, 0x037DA328, 0x0206CEC0, 0xFFFFFFFE)
00:00000:00028:2009/12/08 11:16:52.40 kernel  pc: 0x007829E8 getnext+ 0x1e8 (0x037DA4C0, 0x00000000, 0x037DBDF4, 0x21C9ADD4)
00:00000:00028:2009/12/08 11:16:52.54 kernel  pc: 0x00F92322 attrib_getrow+ 0x392 (0x21FA9E10, 0x037DB4B4, 0x0000001A, 0x00000002)
00:00000:00028:2009/12/08 11:16:52.59 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x037DE0C8, 0x037DF354, 0x02507758, 0xFFFFFFFE)
00:00000:00028:2009/12/08 11:16:52.60 kernel  pc: 0x00F657B8 crt_main+ 0x2628 (0x20202020, 0x20202020, 0x20202020, 0x20202020)
00:00000:00028:2009/12/08 11:16:52.60 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x21840000, 0x20202020, 0x20202020, 0x20202020)
00:00000:00028:2009/12/08 11:16:52.64 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x218A3534, 0x218A35F4, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.64 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x037DD134)
00:00000:00028:2009/12/08 11:16:52.68 kernel  pc: 0x00D691D4 s_execute+ 0x54a4 (0x218A2800, 0x037DF5EC, 0x0045FF99, 0x037DFD57)
00:00000:00028:2009/12/08 11:16:52.68 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x211BE800, 0x00300027, 0x00200027, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.68 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000010, 0xBF23D8D4, 0x00300027, 0x00200027)
00:00000:00028:2009/12/08 11:16:52.75 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214DFFF8, 0x00300027, 0x00200027, 0x214DFFF8)
00:00000:00028:2009/12/08 11:16:52.75 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.79 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.79 kernel  end of stack trace, spid 28, kpid 2031647, suid 1
00:00000:00028:2009/12/08 11:16:52.82 server  Error: 695, Severity: 21, State: 1
00:00000:00028:2009/12/08 11:16:52.82 server  An attempt was made to read logical page '808' for database 'tempdb' (2), object 'sysattributes' (21), index 'csysattributes' (3), partition 'csysattributes_21' (21) from disk. Wrong logical page '2344' was brought into cache 'default data cache'.
00:00000:00028:2009/12/08 11:16:52.84 kernel  ************************************
00:00000:00028:2009/12/08 11:16:52.84 kernel  SQL causing error : sp_helpdevice tempdbdev

00:00000:00028:2009/12/08 11:16:52.84 kernel  Current statement number: 13 Current line number: 72
00:00000:00028:2009/12/08 11:16:52.84 kernel  ************************************
00:00000:00028:2009/12/08 11:16:52.84 server  SQL Text: sp_helpdevice tempdbdev
00:00000:00028:2009/12/08 11:16:52.84 kernel  curdb = 2 tempdb = 2 pstat = 0x10000
00:00000:00028:2009/12/08 11:16:52.84 kernel  lasterror = 695 preverror = 0 transtate = 0
00:00000:00028:2009/12/08 11:16:52.84 kernel  curcmd = 198 program = isql                         
00:00000:00028:2009/12/08 11:16:52.84 kernel  extended error information: hostname: xxxxxxxxx login: sa
00:00000:00028:2009/12/08 11:16:52.84 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x037D688C, 0x0000000C, 0x000003FC, 0x00000004)
00:00000:00028:2009/12/08 11:16:52.84 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x037D688C, 0x037D6C84, 0x0000270F, 0x00000002)
00:00000:00028:2009/12/08 11:16:52.84 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x001F001F, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.84 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x001F001F, 0x00000001, 0x037D9E7C, 0x0206CEC0)
00:00000:00028:2009/12/08 11:16:52.84 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x00000000, 0xFFFFFFFF, 0x037D8088, 0x00E5DFF8)
00:00000:00028:2009/12/08 11:16:52.85 kernel  pc: 0x0040A556 terminate_process+ 0x1266 (0x037D80A8, 0x00F7EF92, 0x00000006, 0x0000005F)
00:00000:00028:2009/12/08 11:16:52.85 kernel  pc: 0x00E5E01C close_network+ 0xc (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.85 kernel  pc: 0x00E5DFF8 hdl_default+ 0x38 (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.87 kernel  pc: 0x00F7EF92 ut_handle+ 0xe2 (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x22DAF05C, 0x211BF268, 0x00000001, 0x00000001)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00781CF9 wrongpage+ 0x919 (0x211BF268, 0x00000001, 0x00000020, 0x037D8550)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x037D85D0, 0x00000000, 0x211BF5EC, 0x20A1D608)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x0084E804 bt__traverse+ 0x424 (0x211BF268, 0x00000000, 0x037D8CE0, 0x0206CEC0)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x0082CCEC bt__getstartpg+ 0x30c (0x211BF268, 0x00000000, 0x00000001, 0x037D8ECC)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00831450 bt_getnext+ 0x270 (0x211BF268, 0x037D9E3C, 0xBF23A868, 0x00000003)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x007F73D9 dol_bt_getnext+ 0x869 (0x211BF268, 0x037DA328, 0x0206CEC0, 0xFFFFFFFE)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x007829E8 getnext+ 0x1e8 (0x037DA4C0, 0x00000000, 0x037DBDF4, 0x21C9ADD4)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00F92322 attrib_getrow+ 0x392 (0x21FA9E10, 0x037DB4B4, 0x0000001A, 0x00000002)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x037DE0C8, 0x037DF354, 0x02507758, 0xFFFFFFFE)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00F657B8 crt_main+ 0x2628 (0x20202020, 0x20202020, 0x20202020, 0x20202020)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x21840000, 0x20202020, 0x20202020, 0x20202020)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x218A3534, 0x218A35F4, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x037DD134)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00D691D4 s_execute+ 0x54a4 (0x218A2800, 0x037DF5EC, 0x0045FF99, 0x037DFD57)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x211BE800, 0x00300027, 0x00200027, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000010, 0xBF23D8D4, 0x00300027, 0x00200027)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214DFFF8, 0x00300027, 0x00200027, 0x214DFFF8)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.89 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00028:2009/12/08 11:16:52.89 kernel  end of stack trace, spid 28, kpid 2031647, suid 1
00:00000:00026:2009/12/08 11:16:52.89 server  Starting diagnostics for read failure:
00:00000:00026:2009/12/08 11:16:52.89 server  Device Information:
     Device number = 2
     Phyname = D:\sybase\data\tempdbdev.dat
00:00000:00026:2009/12/08 11:16:52.89 server  Buffer Information:
     Buf addr = 0x22DC510C, Mass addr = 0x22DC510C
     Buf pageno = 1431, Mass pageno = 1431, dbid = 2
00:00000:00026:2009/12/08 11:16:52.89 server 
     Buf virtpg = 1431, Mass virtpg = 2862
     Buf stat = 0x1, Mass stat = 0x201008
     Mass keep = 1, Mass awaited = 0
00:00000:00026:2009/12/08 11:16:52.89 server  Page Information from first read attempt: Page read from disk ppageno = 2967, pptnid = 8, pindid = 0 pnextpg = 2984, pprevpg = 2966 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330807
00:00000:00026:2009/12/08 11:16:52.89 server  Page Information from second read attempt: Page read from disk ppageno = 2967, pptnid = 8, pindid = 0 pnextpg = 2984, pprevpg = 2966 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330807
00:00000:00026:2009/12/08 11:16:52.89 server  SDES Information:
     dbid = 2, objid = 8, sptnid = 8 scur.pageid = 1431
     sstat = 0x1, sstat2 = 0x4000000
     suid = 1, cacheid = 0
00:00000:00026:2009/12/08 11:16:52.89 server  PSS Information:
     pstat = 0x10100, pcurdb = 1, pspid = 26
     p2stat = 0x1000, p3stat = 0x800
     plasterror = 0, preverror = 0, pattention = 0
00:00000:00026:2009/12/08 11:16:52.89 server  End diagnostics for read failure:
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CAC4, 0x00000004, 0x000003F4, 0x0000000C)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CAC4, 0x0363CEBC, 0x0000270F, 0x00000002)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x001D001D, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x001D001D, 0x00000001, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x22DC510C, 0x22DB4A98, 0x2119EC90, 0x00000001)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x007822E7 wrongpage__print_diagnostic+ 0x3a7 (0x22DC510C, 0x2119EC90, 0x00000001, 0x00000001)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x00781898 wrongpage+ 0x4b8 (0x2119EC90, 0x00000004, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x2119EC90, 0x00000000, 0x020000ED, 0x2119EC90)
00:00000:00026:2009/12/08 11:16:52.89 kernel  pc: 0x00784FAF apl_getnext+ 0x21af (0x215653C4, 0x0363E530, 0x0363E518, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.90 kernel  pc: 0x007C1379 xsc__syslogs_getnext+ 0x29 (0x2156516C, 0x0363E518, 0x0363F354, 0x02507758)
00:00000:00026:2009/12/08 11:16:52.90 kernel  pc: 0x007C0122 xls_getnext+ 0x82 (0x2156516C, 0x00000000, 0x0363EBD0, 0x0363EBE4)
00:00000:00026:2009/12/08 11:16:52.92 kernel  pc: 0x016FC411 def_insert+ 0x1f1 (0x2156516C, 0x00000000, 0x2119E258, 0x0363EC28)
00:00000:00026:2009/12/08 11:16:52.92 kernel  pc: 0x016FB874 dodeferred+ 0x164 (0x2156516C, 0x00000000, 0x00000003, 0x218A2000)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00A0C734 xact_endupdate+ 0x84 (0x2156516C, 0x218A0002, 0x0363FB64, 0x0206CEC0)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00D7ADFF s__finish_cmd+ 0x12f (0x00000000, 0x00000000, 0x00000000, 0x0363D134)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00D6D935 s_execute+ 0x9c05 (0x218DD000, 0x0363F5EC, 0x0045FF99, 0x0363FD57)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x2119E200, 0x0363FB64, 0x0206CEC0, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0000000E, 0xBF3DD8D4, 0x0363FB64, 0x0206CEC0)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214DFC50, 0x0363FB64, 0x0206CEC0, 0x214DFC50)
00:00000:00026:2009/12/08 11:16:52.93 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.95 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x20202020, 0x20202020, 0x20202020, 0x20202020)
00:00000:00026:2009/12/08 11:16:52.95 kernel  pc: 0x7C82FFB1 ConvertThreadToFiber+ 0x93 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:52.95 kernel  end of stack trace, spid 26, kpid 1900573, suid 1

==============================================================

向临时库中#lzf临时表插入数据的会话提示如下的错误信息:

Msg 695, Level 21, State 1:
Server 'TEST', Line 1:
An attempt was made to read logical page '1431' for database 'tempdb' (2),
object 'syslogs' (8), index 'syslogs' (0), partition 'syslogs_8' (8) from disk.
Wrong logical page '2967' was brought into cache 'default data cache'.
Msg 695, Level 21, State 1:
Server 'TEST', Line 1:
An attempt was made to read logical page '15616' for database 'tempdb' (2),
object '' (99), index '<Unknown>' (0), partition '<Unknown>' (99) from disk.
Wrong logical page '17152' was brought into cache 'default data cache'.
Error while undoing log row in database 'tempdb'.  Rid pageid = 0x3c33; row num
= 0xa.
ASE is terminating this process.

日志errorlog中的详细信息为:

==============================================================

00:00000:00026:2009/12/08 11:16:52.95 server  Error: 695, Severity: 21, State: 1
00:00000:00026:2009/12/08 11:16:52.95 server  An attempt was made to read logical page '1431' for database 'tempdb' (2), object 'syslogs' (8), index 'syslogs' (0), partition 'syslogs_8' (8) from disk. Wrong logical page '2967' was brought into cache 'default data cache'.
00:00000:00026:2009/12/08 11:16:53.04 server  Starting diagnostics for read failure:
00:00000:00026:2009/12/08 11:16:53.04 server  Device Information:
     Device number = 2
     Phyname = D:\sybase\data\tempdbdev.dat
00:00000:00026:2009/12/08 11:16:53.04 server  Buffer Information:
     Buf addr = 0x22D90054, Mass addr = 0x22D90054
     Buf pageno = 15616, Mass pageno = 15616, dbid = 2
00:00000:00026:2009/12/08 11:16:53.04 server 
     Buf virtpg = 15616, Mass virtpg = 31232
     Buf stat = 0x1, Mass stat = 0x1008
     Mass keep = 1, Mass awaited = 0
00:00000:00026:2009/12/08 11:16:53.04 server  Page Information from first read attempt: Page read from disk ppageno = 17152, pptnid = 99, pindid = 0 pnextpg = 7, pprevpg = 0 plevel = 0, pstat = 0x300 pts_hi = 0, pts_lo = 1
00:00000:00026:2009/12/08 11:16:53.04 server  Page Information from second read attempt: Page read from disk ppageno = 17152, pptnid = 99, pindid = 0 pnextpg = 7, pprevpg = 0 plevel = 0, pstat = 0x300 pts_hi = 0, pts_lo = 1
00:00000:00026:2009/12/08 11:16:53.04 server  SDES Information:
     dbid = 2, objid = 99, sptnid = 99 scur.pageid = 15616
     sstat = 0x0, sstat2 = 0x0
     suid = 1, cacheid = 0
00:00000:00026:2009/12/08 11:16:53.04 server  PSS Information:
     pstat = 0x18000, pcurdb = 1, pspid = 26
     p2stat = 0x1000, p3stat = 0x40800
     plasterror = 695, preverror = 0, pattention = 0
00:00000:00026:2009/12/08 11:16:53.04 server  End diagnostics for read failure:
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363BB9C, 0x0000000C, 0x000003FC, 0x00000004)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363BB9C, 0x0363BF94, 0x0000270F, 0x00000002)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x001D001D, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x001D001D, 0x00000001, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x22D90054, 0x22DAA9B8, 0x2119FD20, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x007822E7 wrongpage__print_diagnostic+ 0x3a7 (0x22D90054, 0x2119FD20, 0x00000001, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x00781898 wrongpage+ 0x4b8 (0x2119FD20, 0x00000002, 0x00000020, 0x0363D0F0)
00:00000:00026:2009/12/08 11:16:53.04 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x2119FD20, 0x00003D00, 0x00000002, 0x2119FD20)
00:00000:00026:2009/12/08 11:16:53.09 kernel  pc: 0x00A8C0D5 pg_get_alloc_page+ 0x95 (0x2119E86C, 0x00003D00, 0x0363D214, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.09 kernel  pc: 0x00A8B6F6 pg__allocate_syslogs_extent+ 0x56 (0x2119E86C, 0x00003CFF, 0x0363D214, 0x207BBA6C)
00:00000:00026:2009/12/08 11:16:53.09 kernel  pc: 0x00A90991 pg_allocate_syslogs+ 0x1f1 (0x215653C4, 0x22DB514C, 0x00000001, 0x0363D3D0)
00:00000:00026:2009/12/08 11:16:53.10 kernel  pc: 0x007B8698 log__newpage+ 0x108 (0x207E4BCC, 0x00010000, 0x00000000, 0xFFFFFFFF)
00:00000:00026:2009/12/08 11:16:53.10 kernel  pc: 0x0078F491 plc__flush+ 0x821 (0x2156516C, 0x0363D400, 0x00000058, 0x22D82000)
00:00000:00026:2009/12/08 11:16:53.10 kernel  pc: 0x007B6C98 xls_logoperation+ 0xa18 (0x0363D740, 0x0363D7A0, 0x0363D7C4, 0x03630728)
00:00000:00026:2009/12/08 11:16:53.10 kernel  pc: 0x007E3617 do_log_clr+ 0x507 (0x0363D740, 0x0363D7A0, 0x0363D7C4, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x008179A4 undo_twopage_log_clr+ 0x104 (0x0363D740, 0x2289B2A0, 0x0363D7A8, 0x0363D7C4)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x008135D0 undo_apl_xalloc+ 0x590 (0x2156516C, 0x0363D7C4, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x007E1D5D rec_undo_session+ 0xd8d (0x2156516C, 0x2119E258, 0x0363D928, 0x00000002)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0363DA74, 0x2119E258, 0x20202020, 0x20202020)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00A09052 xact__rollbackxact+ 0xdf2 (0x0363DA74, 0x2119E258, 0x00000000, 0x2156516C)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00A0808C xact__rollback_local+ 0x6c (0x0363DA74, 0x0363DC14, 0x02507758, 0x20202020)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00A07F28 xact_rollback+ 0x178 (0x00000024, 0x00000002, 0x00000019, 0x17120121)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00D936E2 s_handle+ 0xf12 (0x00000024, 0x00000002, 0x00000019, 0x17120121)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00D9438B s_handle+ 0x1bbb (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x22DC510C, 0x2119EC90, 0x00000001, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00781CF9 wrongpage+ 0x919 (0x2119EC90, 0x00000004, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x2119EC90, 0x00000000, 0x020000ED, 0x2119EC90)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x00784FAF apl_getnext+ 0x21af (0x215653C4, 0x0363E530, 0x0363E518, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x007C1379 xsc__syslogs_getnext+ 0x29 (0x2156516C, 0x0363E518, 0x0363F354, 0x02507758)
00:00000:00026:2009/12/08 11:16:53.12 kernel  pc: 0x007C0122 xls_getnext+ 0x82 (0x2156516C, 0x00000000, 0x0363EBD0, 0x0363EBE4)
00:00000:00026:2009/12/08 11:16:53.12 kernel  end of stack trace, spid 26, kpid 1900573, suid 1
00:00000:00026:2009/12/08 11:16:53.12 server  Error: 695, Severity: 21, State: 1
00:00000:00026:2009/12/08 11:16:53.12 server  An attempt was made to read logical page '15616' for database 'tempdb' (2), object '' (99), index '<Unknown>' (0), partition '<Unknown>' (99) from disk. Wrong logical page '17152' was brought into cache 'default data cache'.
00:00000:00026:2009/12/08 11:16:53.14 kernel  ************************************
00:00000:00026:2009/12/08 11:16:53.14 kernel  SQL causing error : insert into tempdb..#lzf
select * from tempdb..#lzf

00:00000:00026:2009/12/08 11:16:53.14 kernel  ************************************
00:00000:00026:2009/12/08 11:16:53.14 server  SQL Text: insert into tempdb..#lzf
select * from tempdb..#lzf
00:00000:00026:2009/12/08 11:16:53.14 kernel  curdb = 1 tempdb = 2 pstat = 0x10000
00:00000:00026:2009/12/08 11:16:53.14 kernel  lasterror = 695 preverror = 0 transtate = 0
00:00000:00026:2009/12/08 11:16:53.14 kernel  curcmd = 195 program = isql                         
00:00000:00026:2009/12/08 11:16:53.14 kernel  extended error information: hostname: xxxxxxxxx login: sa
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363BC8C, 0x0000000C, 0x000003FC, 0x00000004)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363BC8C, 0x0363C084, 0x0000270F, 0x00000002)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x001D001D, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x001D001D, 0x00000001, 0x0363D588, 0x02507758)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x00000000, 0xFFFFFFFF, 0x0363D488, 0x00E5DFF8)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x0040A556 terminate_process+ 0x1266 (0x0363D594, 0x00D943C5, 0x00000021, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00E5E01C close_network+ 0xc (0x00000021, 0x00000000, 0x00000019, 0x017E0053)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00E5DFF8 hdl_default+ 0x38 (0x00000021, 0x00000000, 0x00000019, 0x017E0053)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D943C5 s_handle+ 0x1bf5 (0x00000021, 0x00000000, 0x00000019, 0x017E0053)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x2156516C, 0x0363D7C4, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x007E1348 rec_undo_session+ 0x378 (0x2156516C, 0x2119E258, 0x0363D928, 0x00000002)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0363DA74, 0x2119E258, 0x20202020, 0x20202020)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00A09052 xact__rollbackxact+ 0xdf2 (0x0363DA74, 0x2119E258, 0x00000000, 0x2156516C)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00A0808C xact__rollback_local+ 0x6c (0x0363DA74, 0x0363DC14, 0x02507758, 0x20202020)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00A07F28 xact_rollback+ 0x178 (0x00000024, 0x00000002, 0x00000019, 0x17120121)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D936E2 s_handle+ 0xf12 (0x00000024, 0x00000002, 0x00000019, 0x17120121)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D9438B s_handle+ 0x1bbb (0x00000006, 0x0000005F, 0x00000015, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00E5D513 ex_raise+ 0x4e3 (0x22DC510C, 0x2119EC90, 0x00000001, 0x00000001)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00781CF9 wrongpage+ 0x919 (0x2119EC90, 0x00000004, 0x00000000, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x2119EC90, 0x00000000, 0x020000ED, 0x2119EC90)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00784FAF apl_getnext+ 0x21af (0x215653C4, 0x0363E530, 0x0363E518, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x007C1379 xsc__syslogs_getnext+ 0x29 (0x2156516C, 0x0363E518, 0x0363F354, 0x02507758)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x007C0122 xls_getnext+ 0x82 (0x2156516C, 0x00000000, 0x0363EBD0, 0x0363EBE4)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x016FC411 def_insert+ 0x1f1 (0x2156516C, 0x00000000, 0x2119E258, 0x0363EC28)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x016FB874 dodeferred+ 0x164 (0x2156516C, 0x00000000, 0x00000003, 0x218A2000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00A0C734 xact_endupdate+ 0x84 (0x2156516C, 0x218A0002, 0x0363FB64, 0x0206CEC0)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D7ADFF s__finish_cmd+ 0x12f (0x00000000, 0x00000000, 0x00000000, 0x0363D134)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D6D935 s_execute+ 0x9c05 (0x218DD000, 0x0363F5EC, 0x0045FF99, 0x0363FD57)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x2119E200, 0x0363FB64, 0x0206CEC0, 0x00000000)
00:00000:00026:2009/12/08 11:16:53.14 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0000000E, 0xBF3DD8D4, 0x0363FB64, 0x0206CEC0)
00:00000:00026:2009/12/08 11:16:53.14 kernel  end of stack trace, spid 26, kpid 1900573, suid 1
00:00000:00026:2009/12/08 11:16:53.15 server  Error: 1251, Severity: 26, State: 1
00:00000:00026:2009/12/08 11:16:53.15 server  An in-use preallocated semaphore cursor was encountered.
00:00000:00026:2009/12/08 11:16:53.15 server  Error while undoing log row in database 'tempdb'.  Rid pageid = 0x0; row num = 0x0.
00:00000:00026:2009/12/08 11:16:53.15 server  WARNING: Pss 0x2119E258 found with open sdes. pspid 26, psuid 1, pcurdb 1, range entry 0, sdesp 0x20DD06C8, objid 380007908.
00:00000:00026:2009/12/08 11:16:53.15 server  WARNING: Pss 0x2119E258 found with open sdes. pspid 26, psuid 1, pcurdb 1, range entry 1, sdesp 0x20DD06C8, objid 380007908.
00:00000:00026:2009/12/08 11:16:53.15 server  WARNING: Pss 0x2119E258 found with open sdes. pspid 26, psuid 1, pcurdb 1, system table entry 0, sdesp 0x20E6F1EC, objid 8.
00:00000:00026:2009/12/08 11:16:53.15 server  WARNING: Pss 0x2119E258 found with open sdes. pspid 26, psuid 1, pcurdb 1, system table entry 5, sdesp 0x20E6CACC, objid 99.
00:00000:00026:2009/12/08 11:16:53.15 server  Error: 6103, Severity: 17, State: 1
00:00000:00026:2009/12/08 11:16:53.15 server  Unable to do cleanup for the killed process; received Msg 3300.
00:00000:00026:2009/12/08 11:16:53.15 server  WARNING: spid 26 with suid 1 and curdbid 1 has an active transaction in dbid 2 with xactid (21357, 16).
00:00000:00031:2009/12/08 11:18:58.56 server  Starting diagnostics for read failure:
00:00000:00031:2009/12/08 11:18:58.56 server  Device Information:
     Device number = 2
     Phyname = D:\sybase\data\tempdbdev.dat
00:00000:00031:2009/12/08 11:18:58.56 server  Buffer Information:
     Buf addr = 0x22DAF05C, Mass addr = 0x22DAF05C
     Buf pageno = 808, Mass pageno = 808, dbid = 2
00:00000:00031:2009/12/08 11:18:58.57 server 
     Buf virtpg = 808, Mass virtpg = 1616
     Buf stat = 0x1, Mass stat = 0x44201008
     Mass keep = 1, Mass awaited = 0
00:00000:00031:2009/12/08 11:18:58.57 server  Page Information from first read attempt: Page read from cache ppageno = 2344, pptnid = 8, pindid = 0 pnextpg = 2345, pprevpg = 2343 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330441
00:00000:00031:2009/12/08 11:18:58.57 server  Page Information from second read attempt: Page read from disk ppageno = 2344, pptnid = 8, pindid = 0 pnextpg = 2345, pprevpg = 2343 plevel = 0, pstat = 0x1 pts_hi = 0, pts_lo = 330441
00:00000:00031:2009/12/08 11:18:58.57 server  SDES Information:
     dbid = 2, objid = 21, sptnid = 21 scur.pageid = 808
     sstat = 0x200, sstat2 = 0x0
     suid = 1, cacheid = 0
00:00000:00031:2009/12/08 11:18:58.57 server  PSS Information:
     pstat = 0x10000, pcurdb = 2, pspid = 31
     p2stat = 0x1000, p3stat = 0x800
     plasterror = 0, preverror = 0, pattention = 0
00:00000:00031:2009/12/08 11:18:58.57 server  End diagnostics for read failure:
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x03916F4C, 0x0000000C, 0x000003FC, 0x00000004)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x03916F4C, 0x03917344, 0x0000270F, 0x00000002)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x00220022, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x00220022, 0x00000001, 0x225803F0, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x22DAF05C, 0x22DA3F80, 0x211EFB2C, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x007822E7 wrongpage__print_diagnostic+ 0x3a7 (0x22DAF05C, 0x211EFB2C, 0x00000001, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00781898 wrongpage+ 0x4b8 (0x211EFB2C, 0x00000001, 0x00000020, 0x03918550)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0077D86B getpage_with_validation+ 0x173b (0x039185D0, 0x00000000, 0x211EFEB0, 0x20A1D608)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0084E804 bt__traverse+ 0x424 (0x211EFB2C, 0x00000000, 0x03918CE0, 0x0206CEC0)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0082CCEC bt__getstartpg+ 0x30c (0x211EFB2C, 0x00000000, 0x00000001, 0x03918ECC)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00831450 bt_getnext+ 0x270 (0x211EFB2C, 0x03919E3C, 0xBFCFA868, 0x00000003)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x007F73D9 dol_bt_getnext+ 0x869 (0x211EFB2C, 0x0391A328, 0x0206CEC0, 0xFFFFFFFE)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x007829E8 getnext+ 0x1e8 (0x0391A4C0, 0x00000000, 0x0391BDF4, 0x21DA9D50)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00F92322 attrib_getrow+ 0x392 (0x22531AFC, 0x0391B4B4, 0x0000001A, 0x00000002)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0391E0C8, 0x0391F354, 0x02507758, 0xFFFFFFFE)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00F657B8 crt_main+ 0x2628 (0x229F902C, 0x200B9FC0, 0x00ABB5BD, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x2244A000, 0x2073FE20, 0x2073FE20, 0x0391E7DC)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x218A3534, 0x218A35F4, 0x00000000, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x0391D134)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00D691D4 s_execute+ 0x54a4 (0x21866000, 0x0391F5EC, 0x0045FF99, 0x0391FD57)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x211EF000, 0x0391FCAC, 0x0206CEC0, 0x00000000)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000011, 0xBFCFD8D4, 0x0391FCAC, 0x0206CEC0)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214E0574, 0x0391FCAC, 0x0206CEC0, 0x214E0574)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x0115A9A0, 0x214E0574, 0x00000000, 0x00000008)
00:00000:00031:2009/12/08 11:18:58.57 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x0000002C, 0x200AC380, 0x00000000, 0x214E0574)
00:00000:00031:2009/12/08 11:18:58.57 kernel  end of stack trace, spid 31, kpid 2228258, suid 1

==============================================================

看来没有办法,重启服务器试一下吧!!

shutdown with nowait
go

在cmd下sc start sybsql_test启动服务器后,

先执行sp_helpdb看看临时库的状态。

1> sp_helpdb
2> go
Msg 921, Level 14, State 1:
Server 'TEST', Line 1:
Database 'sybsystemprocs' has not been recovered yet - please wait and try
again.
Msg 2812, Level 16, State 5:
Server 'TEST', Line 1:
Stored procedure 'sp_helpdb' not found. Specify owner.objectname or use sp_help
to check whether the object exists (sp_help may produce lots of output).

系统过程数据库没有正常启动起来,怎么回事?再次查看errorlog,发现问题麻烦了。提示存取访问冲突storage access violation!!!

==============================================================

00:00000:00017:2009/12/08 11:29:09.60 kernel  SQL Server system exception (0xc0000005) generated by a storage access violation.
00:00000:00017:2009/12/08 11:29:09.89 kernel  Symbolic stack trace information is successfully loaded
00:00000:00017:2009/12/08 11:29:10.21 kernel  pc: 0x00F6ACA4 crt_work+ 0xc4 (0x21113C4C, 0x21B18580, 0x00000000, 0x00030001)
00:00000:00017:2009/12/08 11:29:10.21 kernel  pc: 0x00F6ACA4 crt_work+ 0xc4 (0x217F0AC4, 0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF)
00:00000:00017:2009/12/08 11:29:10.21 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x217F0988, 0x00000000, 0x00000005, 0x21B1F848)
00:00000:00017:2009/12/08 11:29:10.25 kernel  pc: 0x00D7119A s__setup_tabsdes+ 0xbba (0x217F0988, 0x217F0988, 0x0363FB64, 0x0206CEC0)
00:00000:00017:2009/12/08 11:29:10.25 kernel  pc: 0x00D705A1 s_setuptables+ 0x81 (0x00000000, 0x00000000, 0x00000000, 0x0363D134)
00:00000:00017:2009/12/08 11:29:10.25 kernel  pc: 0x00D69749 s_execute+ 0x5a19 (0x217ED800, 0x0363F5EC, 0x0045FF99, 0x0363FD57)
00:00000:00017:2009/12/08 11:29:10.25 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x2110C800, 0x00000000, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.25 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000004, 0x7D2704FA, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.26 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214DEBDC, 0x00000000, 0x00000000, 0x214DEBDC)
00:00000:00017:2009/12/08 11:29:10.26 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.29 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.29 kernel  end of stack trace, spid 17, kpid 1310740, suid 1
00:00000:00017:2009/12/08 11:29:10.29 kernel  DUMP OF LOADED MODULES:-
00:00000:00017:2009/12/08 11:29:10.29 kernel  sqlsrvr.exe loaded at 00400000 [D:\sybase\ASE-15_0\bin\sqlsrvr.exe]
00:00000:00017:2009/12/08 11:29:10.29 kernel  ntdll.dll loaded at 7C920000 [C:\WINDOWS\system32\ntdll.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  kernel32.dll loaded at 7C800000 [C:\WINDOWS\system32\kernel32.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  MSVCR80.dll loaded at 78130000 [C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  msvcrt.dll loaded at 77BE0000 [C:\WINDOWS\system32\msvcrt.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  ADVAPI32.dll loaded at 77DA0000 [C:\WINDOWS\system32\ADVAPI32.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  RPCRT4.dll loaded at 77E50000 [C:\WINDOWS\system32\RPCRT4.dll]
00:00000:00017:2009/12/08 11:29:10.29 kernel  Secur32.dll loaded at 77FC0000 [C:\WINDOWS\system32\Secur32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybblk.dll loaded at 10000000 [D:\sybase\ASE-15_0\bin\libsybblk.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybct.dll loaded at 002D0000 [D:\sybase\ASE-15_0\bin\libsybct.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybcs.dll loaded at 00340000 [D:\sybase\ASE-15_0\bin\libsybcs.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybcomn.dll loaded at 00360000 [D:\sybase\ASE-15_0\bin\libsybcomn.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybintl.dll loaded at 003F0000 [D:\sybase\ASE-15_0\bin\libsybintl.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybunic.dll loaded at 02730000 [D:\sybase\OCS-15_0\dll\libsybunic.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  libsybtcl.dll loaded at 02790000 [D:\sybase\ASE-15_0\bin\libsybtcl.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  WS2_32.dll loaded at 71A20000 [C:\WINDOWS\system32\WS2_32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  WS2HELP.dll loaded at 71A10000 [C:\WINDOWS\system32\WS2HELP.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  WSOCK32.dll loaded at 71A40000 [C:\WINDOWS\system32\WSOCK32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  MSWSOCK.dll loaded at 719C0000 [C:\WINDOWS\system32\MSWSOCK.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  sbgse2.dll loaded at 027C0000 [D:\sybase\ASE-15_0\bin\sbgse2.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  GDI32.dll loaded at 77EF0000 [C:\WINDOWS\system32\GDI32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  USER32.dll loaded at 77D10000 [C:\WINDOWS\system32\USER32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  comdlg32.dll loaded at 76320000 [C:\WINDOWS\system32\comdlg32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  COMCTL32.dll loaded at 5D170000 [C:\WINDOWS\system32\COMCTL32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  SHELL32.dll loaded at 7D590000 [C:\WINDOWS\system32\SHELL32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  SHLWAPI.dll loaded at 77F40000 [C:\WINDOWS\system32\SHLWAPI.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  NETAPI32.dll loaded at 5FDD0000 [C:\WINDOWS\system32\NETAPI32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  imagehlp.dll loaded at 76C60000 [C:\WINDOWS\system32\imagehlp.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  PSAPI.DLL loaded at 76BC0000 [C:\WINDOWS\system32\PSAPI.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  IMM32.DLL loaded at 76300000 [C:\WINDOWS\system32\IMM32.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  LPK.DLL loaded at 62C20000 [C:\WINDOWS\system32\LPK.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  USP10.dll loaded at 73FA0000 [C:\WINDOWS\system32\USP10.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  comctl32.dll loaded at 77180000 [C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  dbghelp.dll loaded at 03000000 [D:\sybase\ASE-15_0\bin\dbghelp.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  SYBEVENT.dll loaded at 60000000 [D:\sybase\ASE-15_0\dll\SYBEVENT.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  iphlpapi.dll loaded at 76D30000 [C:\WINDOWS\system32\iphlpapi.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  icmp.Dll loaded at 741F0000 [C:\WINDOWS\system32\icmp.Dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  XOLEHLP.DLL loaded at 58960000 [C:\WINDOWS\system32\XOLEHLP.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  MSDTCPRX.dll loaded at 6E8F0000 [C:\WINDOWS\system32\MSDTCPRX.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  MSVCP60.dll loaded at 780C0000 [D:\sybase\ASE-15_0\bin\MSVCP60.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  MTXCLU.DLL loaded at 75050000 [C:\WINDOWS\system32\MTXCLU.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  COMRes.dll loaded at 77020000 [C:\WINDOWS\system32\COMRes.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  VERSION.dll loaded at 77BD0000 [C:\WINDOWS\system32\VERSION.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  ole32.dll loaded at 76990000 [C:\WINDOWS\system32\ole32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  CLUSAPI.DLL loaded at 762A0000 [C:\WINDOWS\system32\CLUSAPI.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  OLEAUT32.dll loaded at 770F0000 [C:\WINDOWS\system32\OLEAUT32.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  RESUTILS.DLL loaded at 75010000 [C:\WINDOWS\system32\RESUTILS.DLL]
00:00000:00017:2009/12/08 11:29:10.31 kernel  USERENV.dll loaded at 759D0000 [C:\WINDOWS\system32\USERENV.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  DNSAPI.dll loaded at 76EF0000 [C:\WINDOWS\system32\DNSAPI.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  dnsq.dll loaded at 30460000 [D:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\dnsq.dll]
00:00000:00017:2009/12/08 11:29:10.31 kernel  winrnr.dll loaded at 76F80000 [C:\WINDOWS\System32\winrnr.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  WLDAP32.dll loaded at 76F30000 [C:\WINDOWS\system32\WLDAP32.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  rasadhlp.dll loaded at 76F90000 [C:\WINDOWS\system32\rasadhlp.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  miscr3.dll loaded at 305E0000 [D:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\miscr3.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  libsybaseldap.dll loaded at 03470000 [D:\sybase\OCS-15_0\lib3p\libsybaseldap.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  rsaenh.dll loaded at 68000000 [C:\WINDOWS\system32\rsaenh.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  hnetcfg.dll loaded at 60FD0000 [C:\WINDOWS\system32\hnetcfg.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  wshtcpip.dll loaded at 71A00000 [C:\WINDOWS\System32\wshtcpip.dll]
00:00000:00017:2009/12/08 11:29:10.32 kernel  ************************************
00:00000:00017:2009/12/08 11:29:10.32 kernel  SQL causing error : select charset_description = a.description, sort_order_description = b.description from master.dbo.syscharsets a, master.dbo.syscharsets b where a.id
00:00000:00017:2009/12/08 11:29:10.32 kernel  ************************************
00:00000:00017:2009/12/08 11:29:10.32 server  SQL Text: select charset_description = a.description, sort_order_description = b.description from master.dbo.syscharsets a, master.dbo.syscharsets b where a.id = (select value from master.dbo.syscurconfigs where config = 131) and b.id = (select value from master.dbo.syscurconfigs where config = 123) and b.csid = (select value from master.dbo.syscurconfigs where config = 131)
00:00000:00017:2009/12/08 11:29:10.32 kernel  curdb = 1 tempdb = 2 pstat = 0x10000
00:00000:00017:2009/12/08 11:29:10.32 kernel  lasterror = 921 preverror = 0 transtate = 1
00:00000:00017:2009/12/08 11:29:10.32 kernel  curcmd = 193 program = SC_ASE_Plugin                
00:00000:00017:2009/12/08 11:29:10.32 kernel  extended error information: hostname: xxxxxxxxx  login: sa
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CD98, 0x00000000, 0x00000044, 0x0363DE10)
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CD98, 0x0363D190, 0x0000270F, 0x00000002)
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x00140014, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x00140014, 0x00000001, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x00140014, 0xFFFFFFFF, 0x0363E5A4, 0xC0000005)
00:00000:00017:2009/12/08 11:29:10.32 kernel  pc: 0x0040A556 terminate_process+ 0x1266 (0xC0000005, 0x7813E16C, 0x01E20048, 0x0363FFB4)
00:00000:00017:2009/12/08 11:29:10.34 kernel  pc: 0x011590C8 kiexception+ 0x488 (0x01E20048, 0x0363FFB4, 0x01E20038, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.35 kernel  pc: 0x0115AAB0 kpntwrapper+ 0x110 (0x0115AAB1, 0x00000000, 0xFFFFFFFE, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.39 kernel  pc: 0x7813E16C seh_longjmp_unwind4+ 0x2e (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00017:2009/12/08 11:29:10.39 kernel  end of stack trace, spid 17, kpid 1310740, suid 1
00:00000:00018:2009/12/08 11:29:16.90 kernel  SQL Server system exception (0xc0000005) generated by a storage access violation.
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00F6ACA4 crt_work+ 0xc4 (0x21123F38, 0x21B5C580, 0x00000000, 0x00030001)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00F6ACA4 crt_work+ 0xc4 (0x217EF2C4, 0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x217EF188, 0x00000000, 0x00000005, 0x21B63848)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00D7119A s__setup_tabsdes+ 0xbba (0x217EF188, 0x217EF188, 0x0363FB64, 0x0206CEC0)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00D705A1 s_setuptables+ 0x81 (0x00000000, 0x00000000, 0x00000000, 0x0363D134)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00D69749 s_execute+ 0x5a19 (0x217F0000, 0x0363F5EC, 0x0045FF99, 0x0363FD57)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00D8D610 sequencer+ 0x1c50 (0x2111CA00, 0x00000000, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000005, 0x7D2704FA, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x0042444D conn_hdlr+ 0x405d (0x214DEDB0, 0x00000000, 0x00000000, 0x214DEDB0)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x00EC62F3 sendtablename+ 0x9d3 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.90 kernel  pc: 0x7C80B729 GetModuleFileNameA+ 0x1ba (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.90 kernel  end of stack trace, spid 18, kpid 1376277, suid 1
00:00000:00018:2009/12/08 11:29:16.90 kernel  DUMP OF LOADED MODULES:-
00:00000:00018:2009/12/08 11:29:16.90 kernel  sqlsrvr.exe loaded at 00400000 [D:\sybase\ASE-15_0\bin\sqlsrvr.exe]
00:00000:00018:2009/12/08 11:29:16.90 kernel  ntdll.dll loaded at 7C920000 [C:\WINDOWS\system32\ntdll.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  kernel32.dll loaded at 7C800000 [C:\WINDOWS\system32\kernel32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  MSVCR80.dll loaded at 78130000 [C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  msvcrt.dll loaded at 77BE0000 [C:\WINDOWS\system32\msvcrt.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  ADVAPI32.dll loaded at 77DA0000 [C:\WINDOWS\system32\ADVAPI32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  RPCRT4.dll loaded at 77E50000 [C:\WINDOWS\system32\RPCRT4.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  Secur32.dll loaded at 77FC0000 [C:\WINDOWS\system32\Secur32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybblk.dll loaded at 10000000 [D:\sybase\ASE-15_0\bin\libsybblk.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybct.dll loaded at 002D0000 [D:\sybase\ASE-15_0\bin\libsybct.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybcs.dll loaded at 00340000 [D:\sybase\ASE-15_0\bin\libsybcs.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybcomn.dll loaded at 00360000 [D:\sybase\ASE-15_0\bin\libsybcomn.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybintl.dll loaded at 003F0000 [D:\sybase\ASE-15_0\bin\libsybintl.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybunic.dll loaded at 02730000 [D:\sybase\OCS-15_0\dll\libsybunic.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  libsybtcl.dll loaded at 02790000 [D:\sybase\ASE-15_0\bin\libsybtcl.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  WS2_32.dll loaded at 71A20000 [C:\WINDOWS\system32\WS2_32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  WS2HELP.dll loaded at 71A10000 [C:\WINDOWS\system32\WS2HELP.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  WSOCK32.dll loaded at 71A40000 [C:\WINDOWS\system32\WSOCK32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  MSWSOCK.dll loaded at 719C0000 [C:\WINDOWS\system32\MSWSOCK.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  sbgse2.dll loaded at 027C0000 [D:\sybase\ASE-15_0\bin\sbgse2.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  GDI32.dll loaded at 77EF0000 [C:\WINDOWS\system32\GDI32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  USER32.dll loaded at 77D10000 [C:\WINDOWS\system32\USER32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  comdlg32.dll loaded at 76320000 [C:\WINDOWS\system32\comdlg32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  COMCTL32.dll loaded at 5D170000 [C:\WINDOWS\system32\COMCTL32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  SHELL32.dll loaded at 7D590000 [C:\WINDOWS\system32\SHELL32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  SHLWAPI.dll loaded at 77F40000 [C:\WINDOWS\system32\SHLWAPI.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  NETAPI32.dll loaded at 5FDD0000 [C:\WINDOWS\system32\NETAPI32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  imagehlp.dll loaded at 76C60000 [C:\WINDOWS\system32\imagehlp.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  PSAPI.DLL loaded at 76BC0000 [C:\WINDOWS\system32\PSAPI.DLL]
00:00000:00018:2009/12/08 11:29:16.90 kernel  IMM32.DLL loaded at 76300000 [C:\WINDOWS\system32\IMM32.DLL]
00:00000:00018:2009/12/08 11:29:16.90 kernel  LPK.DLL loaded at 62C20000 [C:\WINDOWS\system32\LPK.DLL]
00:00000:00018:2009/12/08 11:29:16.90 kernel  USP10.dll loaded at 73FA0000 [C:\WINDOWS\system32\USP10.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  comctl32.dll loaded at 77180000 [C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  dbghelp.dll loaded at 03000000 [D:\sybase\ASE-15_0\bin\dbghelp.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  SYBEVENT.dll loaded at 60000000 [D:\sybase\ASE-15_0\dll\SYBEVENT.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  iphlpapi.dll loaded at 76D30000 [C:\WINDOWS\system32\iphlpapi.dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  icmp.Dll loaded at 741F0000 [C:\WINDOWS\system32\icmp.Dll]
00:00000:00018:2009/12/08 11:29:16.90 kernel  XOLEHLP.DLL loaded at 58960000 [C:\WINDOWS\system32\XOLEHLP.DLL]
00:00000:00018:2009/12/08 11:29:16.92 kernel  MSDTCPRX.dll loaded at 6E8F0000 [C:\WINDOWS\system32\MSDTCPRX.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  MSVCP60.dll loaded at 780C0000 [D:\sybase\ASE-15_0\bin\MSVCP60.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  MTXCLU.DLL loaded at 75050000 [C:\WINDOWS\system32\MTXCLU.DLL]
00:00000:00018:2009/12/08 11:29:16.92 kernel  COMRes.dll loaded at 77020000 [C:\WINDOWS\system32\COMRes.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  VERSION.dll loaded at 77BD0000 [C:\WINDOWS\system32\VERSION.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  ole32.dll loaded at 76990000 [C:\WINDOWS\system32\ole32.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  CLUSAPI.DLL loaded at 762A0000 [C:\WINDOWS\system32\CLUSAPI.DLL]
00:00000:00018:2009/12/08 11:29:16.92 kernel  OLEAUT32.dll loaded at 770F0000 [C:\WINDOWS\system32\OLEAUT32.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  RESUTILS.DLL loaded at 75010000 [C:\WINDOWS\system32\RESUTILS.DLL]
00:00000:00018:2009/12/08 11:29:16.92 kernel  USERENV.dll loaded at 759D0000 [C:\WINDOWS\system32\USERENV.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  DNSAPI.dll loaded at 76EF0000 [C:\WINDOWS\system32\DNSAPI.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  dnsq.dll loaded at 30460000 [D:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\dnsq.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  winrnr.dll loaded at 76F80000 [C:\WINDOWS\System32\winrnr.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  WLDAP32.dll loaded at 76F30000 [C:\WINDOWS\system32\WLDAP32.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  rasadhlp.dll loaded at 76F90000 [C:\WINDOWS\system32\rasadhlp.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  miscr3.dll loaded at 305E0000 [D:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\miscr3.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  libsybaseldap.dll loaded at 03470000 [D:\sybase\OCS-15_0\lib3p\libsybaseldap.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  rsaenh.dll loaded at 68000000 [C:\WINDOWS\system32\rsaenh.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  hnetcfg.dll loaded at 60FD0000 [C:\WINDOWS\system32\hnetcfg.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  wshtcpip.dll loaded at 71A00000 [C:\WINDOWS\System32\wshtcpip.dll]
00:00000:00018:2009/12/08 11:29:16.92 kernel  ************************************
00:00000:00018:2009/12/08 11:29:16.92 kernel  SQL causing error : select charset_description = a.description, sort_order_description = b.description from master.dbo.syscharsets a, master.dbo.syscharsets b where a.id
00:00000:00018:2009/12/08 11:29:16.92 kernel  ************************************
00:00000:00018:2009/12/08 11:29:16.92 server  SQL Text: select charset_description = a.description, sort_order_description = b.description from master.dbo.syscharsets a, master.dbo.syscharsets b where a.id = (select value from master.dbo.syscurconfigs where config = 131) and b.id = (select value from master.dbo.syscurconfigs where config = 123) and b.csid = (select value from master.dbo.syscurconfigs where config = 131)
00:00000:00018:2009/12/08 11:29:16.92 kernel  curdb = 1 tempdb = 2 pstat = 0x10000
00:00000:00018:2009/12/08 11:29:16.92 kernel  lasterror = 921 preverror = 0 transtate = 1
00:00000:00018:2009/12/08 11:29:16.92 kernel  curcmd = 193 program = SC_ASE_Plugin                
00:00000:00018:2009/12/08 11:29:16.92 kernel  extended error information: hostname: xxxxxxxxx login: sa
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CD98, 0x00000000, 0x00000044, 0x0363DE10)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x0121BF14 os_get_cur_stk_desc+ 0x184 (0x0363CD98, 0x0363D190, 0x0000270F, 0x00000002)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x011CAE1A pcstkwalk+ 0x2fa (0x00150015, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x011CA8CE ucstkgentrace+ 0x23e (0x00150015, 0x00000001, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x0116854B ucbacktrace+ 0xab (0x00150015, 0xFFFFFFFF, 0x0363E5A4, 0xC0000005)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x0040A556 terminate_process+ 0x1266 (0xC0000005, 0x7813E16C, 0x01E20048, 0x0363FFB4)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x011590C8 kiexception+ 0x488 (0x01E20048, 0x0363FFB4, 0x01E20038, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x0115AAB0 kpntwrapper+ 0x110 (0x0115AAB1, 0x00000000, 0xFFFFFFFE, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.92 kernel  pc: 0x7813E16C seh_longjmp_unwind4+ 0x2e (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00018:2009/12/08 11:29:16.92 kernel  end of stack trace, spid 18, kpid 1376277, suid 1

==============================================================

问题比较严重,仅仅能够执行类似select * from sysusages,select * from sysdatabases的语句了。发现temdb,sybmgmtdb,sybsystemprocs,还有一个用户数据库状态处于无法恢复中。

1> select dbid,name,status from sysdatabases
2> go
 dbid   name                           status
 ------ ------------------------------ ------
      1 master                              0
      3 model                               0
      2 tempdb                             76
  31513 sybsystemdb                         8
  31514 sybsystemprocs                     72
  31515 sybmgmtdb                          76
      4 escourt5                          580

其中状态64:正在恢复数据库(内部使用)

通过bypass的方式来启动吧

1> begin tran
2> go
1> update sysdatabases
2> set status = -32768
3> where status >=72 and status <=76
4> go
(3 rows affected)
1>  select dbid,name,status from sysdatabases
2>  go
3> go
 dbid   name                           status
 ------ ------------------------------ ------
      1 master                              0
      3 model                               0
      2 tempdb                         -32768
  31513 sybsystemdb                         8
  31514 sybsystemprocs                 -32768
  31515 sybmgmtdb                      -32768
      4 escourt5                          580

(7 rows affected)
1> shutdown with nowait
2> go
Server SHUTDOWN by request.
ASE is terminating this process.

发现问题依旧,仍然是报storage access violation的错误。都怪自己太粗心,在上面的事务中忘记提交了。

 查看sysusages表中tempdb的信息,才发现问题的原因所在。

lstart字段表示:数据库内分配空间的逻辑页面的起始页号。27136和39936是错误的,分别应该为25600和38400。系统分配的这个值比实际的都大1536, 说明什么?原本tempdb在master设备上是有3m(1536页)空间的,我强制删除后系统好像还认为在master上有3m的空间。于是alter database tempdb的时候分配了错误的lstart值。修改如下:

1> select segmap,lstart,size,vstart from sysusages
2> where dbid =2
3> go
 segmap      lstart      size        vstart
 ----------- ----------- ----------- -----------
           7           0       25600           0
           3       27136         12800       51200
           4       39936        12800       76800

(3 rows affected)
1> begin tran
2> go
1> update sysusages
2> set lstart =25600 where dbid = 2 and segmap = 3
3> go
(1 row affected)
1> select segmap,lstart,size,vstart from sysusages
2> where dbid =2
3> go
 segmap      lstart      size        vstart
 ----------- ----------- ----------- -----------
           7           0       25600           0
           3       25600       12800       51200
           4       39936       12800       76800

(3 rows affected)
1> update sysusages
2> set lstart=38400
3> where dbid =2  and vstart=76800
4> go
(1 row affected)
1> select segmap,lstart,size,vstart from sysusages
2> where dbid =2
3> go
 segmap      lstart      size        vstart
 ----------- ----------- ----------- -----------
           7           0       25600           0
           3       25600       12800       51200
           4       38400       12800       76800

(3 rows affected)
1> commit
2> go
1> shutdown
2> go 

启动后发现能够查看数据库,能够正常访问了。但是处于bypass状态。将status为-32768的改为0后再次重启。数据库的所有状态都正常了。

总结:在删除sysusages中tempdb在master上分配的空间时,如果重启sybase服务器。可能就不会出现我所遇到的问题了!今天问题中报storage access violation的错误信息和以前用monitor server时报的错误差不多。要是逻辑页面读取错误,那么监控的时候是什么原因呢?需要向sybase tech 求助了!!

————————————————————————————————————
——— 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
——— 转载务必注明原始出处 : http://www.dbainfo.net
——— 关键字: ASE 15.0.3 tempdb master 逻辑读 695 logical page read
————————————————————————————————————

  • 本文链接地址:http://www.sybrepair.com/delete-temp-db-from-master-device.htm
  • 本文为dbainfo个人原创,请在尊重作者劳动成果的前提下进行转载;
  • 转载务必注明原始出处 : Sybase数据库技术,数据库恢复专家
  • 对《将tempdb从master设备中转移时出现逻辑页面读取错误问题的解决》有何疑问或见解,请在本文下方发表;
  • 对网站还有其他问题或建议,请提交在留言板,谢谢!
  • 目前还没有任何评论.
    :wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)