SQL Server 我需要修复“超时已过期"的错误.超

SQl Server I need to fix the error of quot;Timeout expired. The timeout period elapsedquot;(SQL Server 我需要修复“超时已过期的错误.超时时间已过)
本文介绍了SQL Server 我需要修复“超时已过期"的错误.超时时间已过"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有人问过很多次,但我似乎无法获得已阅读的修复程序来解决我的问题.我收到 SQL Server 错误,提示操作完成之前超时时间已过,或者服务器没有响应."根据 选项>设计器>覆盖连接字符串超时值"下的设置更改为 120 秒the-timeout-for-a-manually-executed-query-in-sql-server">this 发布,但是......它仍然在 30 秒后超时.我正在从 Visual Studio 访问数据库,直接使用它,而不是在客户端代码中使用 ado.我愿意接受建议......这是查询顺便说一句:

I know it's been asked a bunch of times but I can't seem to get the fixes I've read to solve my issue. I'm getting the SQL Server error that "the timeout period elapsed prior to completion of the operation or the server is not responding." I changed the setting under Tools>Options>Designers>"Override connection string time- out value" to 120 seconds as per this posting, but... it still times out after 30 seconds. I'm accessing the database from visual studio, working directly with it, and not with ado in client code. I'm open to suggestions... here's the query btw:

<代码>选择象征从tblSymbolsMain在哪里((SELECT dbo.LatestDateInDailyPricingVolBySymbol(tblSymbolsMain.Symbol) AS Expr1) < dbo.RecentTradingDateByNumber(5))

简而言之,目标是返回主代码表中的所有股票代码,这些代码表中至少有 5 个交易日没有每日定价数据点.

In a nutshell, the goal is to return all stock symbols from a main symbols table that don't have a daily pricing data point in the pricing table for at least 5 trading days.

一如既往地提前致谢..

As always thanks in advance..

推荐答案

代码似乎不正确...您有 ...WHERE (SELECT...)什么地方?

The code doesnt appear to be correct ... you have ...WHERE (SELECT...) WHERE what?

你确定你不是在追求

SELECT MyCols FROM MyTable WHERE ID IN (...)

SELECT MyCols FROM MyTable WHERE ID NOT IN (...)

其中 (...) 代表另一个返回某种 ID 的选择.

Where (...) represents another select returning some sort of ID.

否则当然会超时.该选择可能会返回一个计数,WHERE 1 可以继续……

Otherwise of course you'd get a timeout. That select may return a count and WHERE 1 can go on and on and on...

这篇关于SQL Server 我需要修复“超时已过期"的错误.超时时间已过"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)