informix出现一特怪异常??
环境: SCO 5.05, informix 5出现一特怪异常:程序在一段时间内做的数据库修改记录,数据库都没有记录下来,比如insert记录,update记录等.重启informix后数据库又正常了.
从业这么多年,第一次碰到这种问题,请问有没有人碰到此类似问题,是如何解决的. 这里面最关健的是,这些修改数据库操作(insert或update)居然都没有报错!!! 个人怀疑如下:
1,你的数据库用的是缓冲日志模式
2,数据库的空间不足了
informix 5,好早的版本啊。用的是文件系统吧。在你提交语句的时候,成功执行。由于延迟写入,在写入器写入时候,文件系统空间满了。造成数据丢失。缓冲日志,确实会造成数据丢失的。如果你改成无缓冲的模式,应该就没有这个问题:) 猜测的。祝你好运 原帖由 ivhb 于 2008-11-20 22:54 发表 http://bbs.chinaunix.net/images/common/back.gif
个人怀疑如下:
1,你的数据库用的是缓冲日志模式
2,数据库的空间不足了
informix 5,好早的版本啊。用的是文件系统吧。在你提交语句的时候,成功执行。由于延迟写入,在写入器写入时候,文件系统空间满了 ...
:em06: :em06: :em06: 这都被你想到了... 我想也是
改成unbuffer试一下 如果采用unbuffer模式,那我的事务不是全部没用了吗? 数据库是采用buffered模式的,采用的是文件系统,便文件系统空间是有的.下面是tbstat -a打印出来的信息
RSAM Version 5.10.UC1 -- On-Line -- Up 00:38:15 -- 522352 Kbytes
Message Log File: /usr/informix/online.log
3Checkpoint Completed
16:05:57Checkpoint Completed
19:33:59Checkpoint Completed
Fri Nov 21 06:35:32 2008
06:35:32Checkpoint Completed
Fri Nov 21 10:04:56 2008
10:04:56INFORMIX-OnLine Initialized -- Shared Memory Initialized
10:04:56Physical Recovery Started
10:04:56Checkpoint Completed
10:04:56Physical Recovery Complete: 0 Pages Restored
10:04:57Checkpoint Completed
10:04:57Logical Recovery Complete
0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks
10:04:57On-Line Mode
Configuration File: /usr/informix/etc/tbconfig.std
#**************************************************************************
#
# INFORMIX SOFTWARE, INC.
#
#Title: tbconfig.std
#Sccsid: %W% %G%%U%
#Description: INFORMIX-OnLine Configuration Parameters
#
#**************************************************************************
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /u/dbspace/rootdbs # Path for device containing root dbspace
ROOTOFFSET 0 # Offset of root dbspace into device (Kbytes)
ROOTSIZE 2000000 # Size of root dbspace (Kbytes)
# Disk Mirroring Configuration
MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH # Path for device containing root dbspace mirror
MIRROROFFSET 0 # Offset into mirror device (Kbytes)
# Physical Log Configuration
PHYSDBS rootdbs # Name of dbspace that contains physical log
PHYSFILE 100000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 20 # Number of logical log files
LOGSIZE 20000 # Size of each logical log file (Kbytes)
# Message Files
MSGPATH /usr/informix/online.log # OnLine message log pathname
CONSOLE /dev/null # System console message pathname
# Archive Tape Device
TAPEDEV /dev/null # Archive tape device pathname
TAPEBLK 16 # Archive tape block size (Kbytes)
TAPESIZE 10240 # Max amount of data to put on tape (Kbytes)
# Logical Log Backup Tape Device
LTAPEDEV /dev/null # Logical log tape device pathname
LTAPEBLK 16 # Logical log tape block size (Kbytes)
LTAPESIZE 10240 # Max amount of data to put on log tape (Kbytes)
# Identification Parameters
SERVERNUM 0 # Unique id associated with this OnLine instance
DBSERVERNAME ONLINE # Unique name of this OnLine instance
# Shared Memory Parameters
RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)
USERS 1000 # Maximum number of concurrent user processes
TRANSACTIONS 1000 # Maximum number of concurrent transactions
LOCKS 8000000 # Maximum number of locks
BUFFERS 90000 # Maximum number of shared memory buffers
TBLSPACES 20000 # Maximum number of active tblspaces
CHUNKS 8 # Maximum number of chunks
DBSPACES 8 # Maximum number of dbspaces and blobspaces
PHYSBUFF 2048 # Size of physical log buffers (Kbytes)
LOGBUFF 2048 # Size of logical log buffers (Kbytes)
LOGSMAX 20 # Maximum number of logical log files
CLEANERS 1 # Number of page-cleaner processes
SHMBASE 0x10000000 # Shared memory base address
CKPTINTVL 300 # Checkpoint interval (in seconds)
LRUS 8 # Number of LRU queues
LRU_MAX_DIRTY 60 # LRU modified begin-cleaning limit (percent)
LRU_MIN_DIRTY 50 # LRU modified end-cleaning limit (percent)
LTXHWM 50 # Long TX high-water mark (percent)
LTXEHWM 60 # Long TX exclusive high-water mark (percent)
# Machine- and Product-Specific Parameters
DYNSHMSZ 0 # Dynamic shared memory size (Kbytes)
GTRID_CMP_SZ 32 # Number of bytes to use in GTRID comparision
DEADLOCK_TIMEOUT 60 # Max time to wait for lock in distributed env.
TXTIMEOUT 300 # Transaction timeout for I-STAR (in seconds)
SPINCNT 0 # No. of times process tries for latch
STAGEBLOB # Reserved for INFORMIX-OnLine/Optical
# System Page Size
BUFFSIZE 2048 # Page size (do not change!)
Users
addressflags pid user tty wait tout locks nreads nwrites
10001a1c ------D 383 informix - 0 0 0 49 2
10001aac ------D 0 informix - 0 0 0 0 0
10001b3c ------F 424 informix 0 0 0 0 0
3 active, 1000 total
Transactions
addressflags user locks log begin isolation retrys coordinator
10024c9c A---- 10001a1c 0 0 NOTRANS 0
100252c0 A---- 10001aac 0 0 NOTRANS 0
2 active, 1000 total
Latches with lock or user set
name addresslock wait user
Locks
addresswtlist owner lklist type tblsnumrowid size
0 active, 8000000 total, 524288 hash buckets
Buffers
addressuser flgs pagenummemaddrnslots pgflgs xflgs owner waitlist
0 modified, 90000 total, 131072 hash buckets, 2048 buffer size
Tblspaces
n addressflgs ucnt tblnum physaddr npages nusednpdata nrowsnextns
0 21a5577c 1 1 100000110000e 8063 43 0 0 1
1 active, 20000 total, 8192 hash buckets
Dbspaces
addressnumber flags fchunk nchunksflags owner name
101a4dfc 1 1 1 2 N informix rootdbs
1 active, 8 total
Chunks
addresschk/dbs offset size free bpages flags pathname
101a493c 1 1 0 1000000673337 PO- /u/dbspace/rootdbs
101a49d4 2 1 0 1000000999997 PO- /u/dbspace/rootdbs_add_1
2 active, 8 total
Physical Logging
Buffer bufusedbufsizenumpages numwrits pages/io
P-20 1024 0 0 0.00%
phybegin physizephypos phyused%used
101f8c 50000 48686 0 0.00
Logical Logging
Buffer bufusedbufsizenumrecsnumpages numwrits recs/pages pages/io
L-20 1024 1 1 1 1.0 1.0
addressnumber flags uniqid begin size used %used
2241977c 1 U---C-L1 10e2dc 10000 2218 22.18%
22419798 2 F------0 1109ec 10000 0 0.00%
224197b4 3 F------0 1130fc 10000 0 0.00%
224197d0 4 F------0 11580c 10000 0 0.00%
224197ec 5 F------0 117f1c 10000 0 0.00%
22419808 6 F------0 11a62c 10000 0 0.00%
22419824 7 F------0 11cd3c 10000 0 0.00%
22419840 8 F------0 11f44c 10000 0 0.00%
2241985c 9 F------0 121b5c 10000 0 0.00%
22419878 10 F------0 12426c 10000 0 0.00%
22419894 11 F------0 12697c 10000 0 0.00%
224198b0 12 F------0 12908c 10000 0 0.00%
224198cc 13 F------0 12b79c 10000 0 0.00%
224198e8 14 F------0 12deac 10000 0 0.00%
22419904 15 F------0 1305bc 10000 0 0.00%
22419920 16 F------0 132ccc 10000 0 0.00%
2241993c 17 F------0 1353dc 10000 0 0.00%
22419958 18 F------0 137aec 10000 0 0.00%
22419974 19 F------0 13a1fc 10000 0 0.00%
22419990 20 F------0 13c90c 10000 0 0.00%
Profile
dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
254 2372 64800 99.61 7 8 2 0.00
isamtotopen start read write rewritedelete commit rollbk
87907 3977 6929 34732 0 0 0 9073 0
ovtbls ovlock ovuser ovbuff usercpusyscpu numckpts flushes
0 0 0 0 0.51 0.10 2 21
bufwaits lokwaits lockreqs deadlksdltoutslchwaits ckpwaits compress
0 0 19544 0 0 0 0 0 :em17: :em17: :em17: unbuffer log 也是log的。。。
BTW:你所有空间都放在rootdbs里。。。。。。。。。。。。。。。。。:shock: :shock: 所有空间是都放在rootdbs里了,没有分.另:unbuffered 时,事务有效吗?能rollback? 下面是informix online.log记得日志,记录丢失的就是11:07:13 Checkpoint后到11:08:53记录,这后面服务器重启了一下,但系统管理员说机器没有人去重启,问机器怎么会自动重启的?
在11:07:13至11:08:53之间,丢失了这其间所有数据库操作记录,数据库重启产生rollback,但下面显示又0 rollback,是不是因为logical log是记在/dev/null的原因?
11:00:29UNKNOWN ONLINE SIGNAL
11:00:30UNKNOWN ONLINE SIGNAL
11:00:30UNKNOWN ONLINE SIGNAL
11:01:53Checkpoint Completed
11:07:13Checkpoint Completed
Tue Nov 18 11:17:45 2008
11:17:45INFORMIX-OnLine Initialized -- Shared Memory Initialized
11:17:45Physical Recovery Started
11:17:46Checkpoint Completed
11:17:46Physical Recovery Complete: 0 Pages Restored
11:17:46Checkpoint Completed
11:17:46Logical Recovery Complete
0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks
11:17:46On-Line Mode
11:28:33Checkpoint Completed
11:33:53Checkpoint Completed
页:
[1]
2