sql超时错误 [英] Time out error in sql

查看:136
本文介绍了sql超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的sql server数据库位于一个位置(例如-Mumbai)和C#应用程序安装在其他位置(如德里)。但是当从远程计算机访问sql server上的数据时,应用程序变得太慢,有时会给出超时过期错误。

有什么解决方案吗?

解决方案

有很多原因

1.连接

2.带宽

3.您的查询(可能包含子查询或相关查询等....)

4.数据库索引


在不了解您的查询,数据库中的索引,结果集的大小,客户端计算机与SQL服务器之间的链接速度,导致客户端计算机缓慢的原因的情况下,。 ..,等等,等等,等等...



由于你提供的细节完全缺乏,几乎不可能回答你的问题。

检查这些

肮脏的方式

增加 SQL连接 [ ^ ]

增加 SQL命令 [ ^ ]。



好方法

使用 SQL Server Profiler [ ^ ]

如何通过分析Profiler输出来识别SQL Server性能问题? [< a href =http://vyaskn.tripod.com/analyzing_profiler_output.htmtarget =_ blanktitle =New Window> ^ ]

SQL Server最佳实践 [ ^ ]



对于优化,

在SQL Server中优化数据访问的十大步骤:第一部分(使用索引) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第二部分(Re -factor TSQL并应用最佳实践) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第三部分(应用高级索引和非规范化) [ ^ ]

前10个步骤优化SQL Server中的数据访问:第IV部分(诊断数据库性能问题) [ ^ ]

优化数据的十大步骤SQL Server中的访问:第五部分(优化数据库文件并应用分区) [ ^ ]


I have sql server database located at one location(For example-Mumbai) and C# application installed at other location(like Delhi). But while accessing data at sql server from remote computer, application becomes too slow and sometime gives timeout expired error.
Is there any solution?

解决方案

Yes Lots of Reasons there
1. Connection
2. Bandwidth
3. Your Query(it may contain sub query or correlated query etc....)
4. Database Index


Without knowing anything about your query, indexing in the database, the size of the result set, the speed of the links between the client machines and the SQL server, what's causing the slowness on the client machines, ..., blah, blah, blah, ...

It's pretty much impossible to answer your question with the complete lack of detail you've provided.


check these
Dirty ways
Increase timeout for SQL connection[^]
Increase timeout for SQL command[^].

Good ways
Use SQL Server Profiler[^]
How to identify SQL Server performance issues, by analyzing Profiler output?[^]
SQL Server Best Practices[^]

For optimization,
Top 10 steps to optimize data access in SQL Server: Part I (use indexing)[^]
Top 10 steps to optimize data access in SQL Server: Part II (Re-factor TSQL and apply best practices)[^]
Top 10 steps to optimize data access in SQL Server: Part III (Apply advanced indexing and denormalization)[^]
Top 10 steps to optimize data access in SQL Server: Part IV (Diagnose database performance problems)[^]
Top 10 steps to optimize data access in SQL Server: Part V (Optimize database files and apply partitioning)[^]


这篇关于sql超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆