为什么程序运行中连接数据库失败!?急!

hellof1 2002-12-02 01:14:52
应用程序中有个库存查询界面,5秒钟对这个界面上的数据更新一遍,两三台机子进行测试,没有问题.30、40台机子一起用后,会随机的出现某几台机子会出现与数据库断开的情况!!不知道是不是刷新的关系!?还是由于其他的原因?!服务器(win2000 server与sybase数据库,1G的内存),sybase的server。cfg文件中我设置了50用户,200M的内存!
请各位大虾多多赐教!
...全文
526 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
wanghai 2002-12-06
  • 打赏
  • 举报
回复
server.001,server.002,server.003是正常的,菜单里就有dsedit,这个不熟你怎么配置客户端的啊
hellof1 2002-12-06
  • 打赏
  • 举报
回复
那个sybase文件夹,我看了一下,原来只有server.cfg文件,但现在友好多个像server.001,server.002,server.003等等七、八个文件,里面内容都一样!
/*
就是说Dsedit里配的是named pipe 而不是TCP协议
这个错误是一个网络错误
*/
上面这个dsedit本人不熟悉,它是在哪里配置的,如何配置?
谢谢!
hellof1 2002-12-06
  • 打赏
  • 举报
回复
不好意思!我真的不清楚!好象没有用到dsedit,你能说的详细一点好吗?
(在哪里配置、如何配置?)
非常感谢!
wanghai 2002-12-05
  • 打赏
  • 举报
回复
'C:\SYBASE\/SERVER.cfg'
文件名有问题吧,为什么有“/”
wanghai 2002-12-05
  • 打赏
  • 举报
回复
/*
kernel nl__write_defer: write failed on socket 10.
: Write to the named pipe failed - Error is 109.
怎么用的是命名管道不是TCP
*/
就是说Dsedit里配的是named pipe 而不是TCP协议
这个错误是一个网络错误
hellof1 2002-12-05
  • 打赏
  • 举报
回复
wanghai你好!
我的server.cfg改过的
cache:manager
procedure cache percent=10
network communication
max network packet size=4096
physical memory
total memory=204800
additional network memory=153600
user environment
number of use connections=100
lock manager
number of locks=50000
deadlock checking period=1000
就改了这些!
上面这些错误信息,我如何到应用程序中去查出出错的地方!不然还会发生与数据库断开的情况!
/*
kernel nl__write_defer: write failed on socket 10.
: Write to the named pipe failed - Error is 109.
怎么用的是命名管道不是TCP
*/
这段话我不太清楚!能不能解释的清楚一点!?
谢谢!
realfool 2002-12-05
  • 打赏
  • 举报
回复
界面上的select 加上 no lock(脏读),避免了锁的问题再说。
wanghai 2002-12-04
  • 打赏
  • 举报
回复
100用户不算多的,内存给个%80给sybase好了
如果procedure用的比较多,procedure cache多给一点
不然的话就data cahce 给多一点
hellof1 2002-12-04
  • 打赏
  • 举报
回复
我把设置改了,但是还有断开的情况发生,而且有时还发生所有的用户都无法登陆数据库,必须在服务器把sybase服务断开,然后重新启动服务才可以!
不知道各位对sybase数据库是如何配置的?能否举个100用户的配置例子,我的服务器配置是win2k+sybase11,内存1G!
我的email是hellof1@msn.com
谢谢!
big106 2002-12-04
  • 打赏
  • 举报
回复
启动信息没有什么错误,还是加大内存和用户数吧
wanghai 2002-12-04
  • 打赏
  • 举报
回复
'C:\SYBASE\/SERVER.cfg' 是不是修改过

A client process exited abnormally, or a network error was encountered. Unless other errors occurred, continue processing normally.
客户机异常死机,会导致进程不能终止,而且在这以后其他进程的日志都不能被清除,需要找出异常终止的进程,不然TEMPDB马上就满

kernel nl__write_defer: write failed on socket 10.
: Write to the named pipe failed - Error is 109.

怎么用的是命名管道不是TCP

server SQL Server terminating because of system shutdown.
系统异常导致sybase异常退出


server is unnamed
很奇怪的原因,server名难道没配,不可能的啊?
hellof1 2002-12-04
  • 打赏
  • 举报
回复
00:02/12/04 09:43:26.55 kernel shutdownproc: shutting down SQL Server!
00:02/12/04 09:43:26.61 kernel ueshutdown: exiting
00:02/12/04 09:43:38.50 kernel Using config area from primary master device.
00:02/12/04 09:43:38.52 kernel Warning: Using default file 'C:\SYBASE\/SERVER.cfg' since a configuration file was not specified. Specify a configuration file name in the RUNSERVER file to avoid this message.
00:02/12/04 09:43:38.52 kernel Kernel memory at 0x20000000, 5750784 bytes
00:02/12/04 09:43:38.52 kernel Server part of first shared memory region at 0x2057c000, 412815360 bytes
00:02/12/04 09:43:38.52 kernel Highest valid address is 0x2057c000
00:02/12/04 09:43:38.52 kernel Using 2048 file descriptors.
00:02/12/04 09:43:38.63 kernel SQL Server/11.0.1/P/PC Intel/Windows NT 3.5/1/OPT/Mon Apr 8 00:49:24 UTC 1996
00:02/12/04 09:43:38.63 kernel Confidential property of Sybase, Inc.
00:02/12/04 09:43:38.63 kernel (c) Copyright Sybase Inc., 1987, 1996.
00:02/12/04 09:43:38.63 kernel All rights reserved.
00:02/12/04 09:43:38.63 kernel
00:02/12/04 09:43:38.63 kernel Use, duplication, or disclosure by the United States Government
00:02/12/04 09:43:38.63 kernel is subject to restrictions as set forth in FAR subparagraphs
00:02/12/04 09:43:38.63 kernel 52.227-19(a)-(d) for civilian agency contracts and DFARS
00:02/12/04 09:43:38.63 kernel 252.227-7013(c) (1) (ii) for Department of Defense contracts.
00:02/12/04 09:43:38.63 kernel Sybase reserves all unpublished rights under the copyright
00:02/12/04 09:43:38.63 kernel laws of the United States.
00:02/12/04 09:43:38.63 kernel Sybase, Inc. 6475 Christie Avenue, Emeryville, CA 94608 USA.
00:02/12/04 09:43:38.63 kernel Using 'C:\SYBASE\/SERVER.cfg' for configuration information.
00:02/12/04 09:43:38.70 kernel Logging SQL Server messages in file 'C:\SYBASE\install\errorlog'
.
00:02/12/04 09:43:38.78 kernel Network and device connection limit is 2040.
00:02/12/04 09:43:38.78 server Number of proc buffers allocated: 9781.
00:02/12/04 09:43:38.81 server Number of blocks left for proc headers: 9915.
00:02/12/04 09:43:38.81 server Memory allocated for the default data cache cache: 353100 Kb
00:02/12/04 09:43:38.86 server Size of the 2K memory pool: 353100 Kb
00:02/12/04 09:43:38.86 kernel Initializing virtual device 0, 'C:\SYBASE\DATA\MASTER.DAT'
00:02/12/04 09:43:38.86 kernel Virtual device 0 started using asynchronous i/o.
00:02/12/04 09:43:38.86 server Opening Master Database ...
00:02/12/04 09:43:38.89 server Loading SQL Server's default sort order and character set
00:02/12/04 09:43:38.89 server Recovering database 'master'
00:02/12/04 09:43:38.89 server Recovery dbid 1 ckpt (1987,23)
00:02/12/04 09:43:38.89 server Recovery no active transactions before ckpt.
00:02/12/04 09:43:39.05 server Database 'master' is now online.
00:02/12/04 09:43:39.05 server The transaction log in the database 'master' will use I/O size of 2 Kb.
00:02/12/04 09:43:39.08 server server is unnamed
00:02/12/04 09:43:39.14 server Activating disk 'log'.
00:02/12/04 09:43:39.14 kernel Initializing virtual device 4, 'd:\nsk\log.dat'
00:02/12/04 09:43:39.14 kernel Virtual device 4 started using asynchronous i/o.
00:02/12/04 09:43:39.20 server Activating disk 'nsk1'.
00:02/12/04 09:43:39.20 kernel Initializing virtual device 2, 'd:\nsk\nsk1.dat'
00:02/12/04 09:43:39.20 kernel Virtual device 2 started using asynchronous i/o.
00:02/12/04 09:43:39.25 server Activating disk 'nsk2'.
00:02/12/04 09:43:39.25 kernel Initializing virtual device 3, 'd:\nsk\nsk2.dat'
00:02/12/04 09:43:39.25 kernel Virtual device 3 started using asynchronous i/o.
00:02/12/04 09:43:39.30 server Activating disk 'sysprocsdev'.
00:02/12/04 09:43:39.30 kernel Initializing virtual device 1, 'C:\SYBASE\DATA\SYBPROCS.DAT'
00:02/12/04 09:43:39.30 kernel Virtual device 1 started using asynchronous i/o.
00:02/12/04 09:43:39.34 server Activating disk 'tempdevice'.
00:02/12/04 09:43:39.34 kernel Initializing virtual device 5, 'd:\nsk\tempdevice.dat'
00:02/12/04 09:43:39.34 kernel Virtual device 5 started using asynchronous i/o.
00:02/12/04 09:43:39.42 server Recovering database 'model'.
00:02/12/04 09:43:39.42 server Recovery dbid 3 ckpt (441,6)
00:02/12/04 09:43:39.42 server Recovery no active transactions before ckpt.
00:02/12/04 09:43:39.47 server The transaction log in the database 'model' will use I/O size of 2 Kb.
00:02/12/04 09:43:39.55 server Database 'model' is now online.
00:02/12/04 09:43:39.55 server Clearing temp db
00:02/12/04 09:43:40.14 server Recovering database 'sybsystemprocs'.
00:02/12/04 09:43:40.14 server Recovery dbid 4 ckpt (7290,7)
00:02/12/04 09:43:40.14 server Recovery no active transactions before ckpt.
00:02/12/04 09:43:40.31 server The transaction log in the database 'sybsystemprocs' will use I/O size of 2 Kb.
00:02/12/04 09:43:40.39 server Database 'sybsystemprocs' is now online.
00:02/12/04 09:43:40.58 server Recovering database 'nsk'.
00:02/12/04 09:43:42.98 server Recovery dbid 5 ckpt (113636,17) oldest tran=(109842,8)
00:02/12/04 09:43:45.81 server 3 transactions rolled back.
00:02/12/04 09:43:48.22 server The transaction log in the database 'nsk' will use I/O size of 2 Kb.
00:02/12/04 09:43:48.30 server Database 'nsk' is now online.
00:02/12/04 09:43:48.30 server Recovery complete.
00:02/12/04 09:43:48.30 server SQL Server's default sort order is:
00:02/12/04 09:43:48.30 server 'bin_cp850' (ID = 50)
00:02/12/04 09:43:48.30 server on top of default character set:
00:02/12/04 09:43:48.30 server 'cp850' (ID = 2).
上面一段是服务重启后的信息!!
hellof1 2002-12-04
  • 打赏
  • 举报
回复
00:02/12/03 13:20:56.26 kernel nl__write_defer: write failed on socket 10.
: Write to the named pipe failed - Error is 109.
00:02/12/03 13:20:56.26 kernel Cannot send, host process disconnected: 3072 spid: 13
00:02/12/03 13:20:56.26 server Error: 1608, Severity: 21, State: 4
00:02/12/03 13:20:56.26 server A client process exited abnormally, or a network error was encountered. Unless other errors occurred, continue processing normally.
00:02/12/03 13:34:11.59 kernel nl__read_defer: read failed on socket 16.
: Cannot perform more than one read.
00:02/12/03 17:14:15.39 server SQL Server terminating because of system shutdown.
00:02/12/03 17:14:15.50 kernel Failed to log the current message in the Windows NT event log
00:02/12/03 17:14:15.51 kernel WARNING: Windows NT event logging turned off!
00:02/12/03 17:14:15.54 kernel shutdownproc: shutting down SQL Server!
00:02/12/03 17:14:15.90 kernel ueshutdown: exiting
00:02/12/03 17:17:27.37 kernel Using config area from primary master device.
00:02/12/03 17:17:27.38 kernel Warning: Using default file 'C:\SYBASE\/SERVER.cfg' since a configuration file was not specified. Specify a configuration file name in the RUNSERVER file to avoid this message.

上面一段是从errorlog文件中筛选出来的,请各位帮我分析分析,是什么原因导致sybase服务终止!?
hellof1 2002-12-03
  • 打赏
  • 举报
回复
多谢各位的关注和建议!
我先试试看!如果有问题还得麻烦大家多出主意!
对了,那个errorlog文件在哪里能够察看?!
wanghai 2002-12-03
  • 打赏
  • 举报
回复
有问题的时候要多看日志
amjie 2002-12-03
  • 打赏
  • 举报
回复
缺省的errorlog文件在sybase的install目录下,不过你是可以修改其放置目录的,可以在sever config下配置。查看可以用写字板即可!
hanps 2002-12-02
  • 打赏
  • 举报
回复
把用户数扩大一些,再看看
wanghai 2002-12-02
  • 打赏
  • 举报
回复
发生死锁时SYBASE会选择杀死其中一个进程,所以客户端便会断开
如果单单是查询应该不导致死锁
hellof1 2002-12-02
  • 打赏
  • 举报
回复
那errorlog文件在什么路径下,该如何操作?
hellof1 2002-12-02
  • 打赏
  • 举报
回复
我在想会不会是我的程序编的有缺陷,当对数据库表进行操作的用户太多后,发生死锁情况!
还有今天看到sybase书中有系统错误诊断这一张,其中讲到应用程序发生错误的等级,当大于18级的错误会引起数据库与该客户端断开的情况!!
但是讲的不详细,不知道有没有人知道详细的资料!?
加载更多回复(5)

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧