Linked Server Query - Timeout Error Under Load

Apr 23, 2002

Hello,

I am researching alternatives to a stored procedure that uses a linked server query that my ASP page uses to retrieve records to the page.

Should I:

Use replication (Data is constantly updated, so a snapshot won't do. Merge replication?)

Break up the stored procedure into subqueries?

Use a view on the remote server instead of the actual tables?

I am trying to reduce the amount of table scans, what is the best way to do this?

Here is the stored procedure I am trying to tune:
(@startDate and @endDate are parameters passed from the web page):

CREATE PROCEDURE dbo.spELRMCcardXtionByDate @dcid nvarchar(255), @startDate datetime, @endDate datetime
AS
SELECT Store.[Str#], Store.[Dcid#], E.card_number, E.program_number
, E.start_date, E.end_date, E.card_number, E.event_number
, E.status, E.budget, E.scheduled_date, P.tx_time, P.purchase_amount
, L.merchant_name
FROM (Store INNER JOIN Event E ON Store.[DemoID#] = E.event_number)
LEFT JOIN (Location L RIGHT JOIN POS_TX P ON L.location_number = P.location_number)
ON E.event_number = P.event_number
WHERE (((Store.[Dcid#])= @dcid)) AND E.scheduled_date BETWEEN @startDate AND @endDate
ORDER BY Store.[Str#]
GO

Any suggestions on my sp or anything else that can implement would be greatly appreciated.

TIA,

Bruce Johnston
Programmer/Analyst

View 1 Replies


ADVERTISEMENT

Linked Server Login Timeout Expired Error

Aug 3, 2007

Hello All,

My application is dependent on two databases one is on sql 2005 machine and other is on sql 2000 machine. A linked server is establish between these two using sql account which has appropriate rights on both server's databases.

application works fine but after some time it crashes and if i see error from sql profiler i get the error

OLE DB provider "SQLNCLI" for linked server "sql2000machine" returned message "Login timeout expired".

Few days back applciation was working absolutly fine, but i was trying to make linked sever through windows account, i dnt know wat has i changed during achiveing that setup that now application (linked server) is not working even with sql account.

please help its urgent.

View 1 Replies View Related

Transact SQL :: Linked Server Return Message Query Timeout

Jul 22, 2015

Error below was returned from an agent job:

OLE DB provider "SQLNCLI11" for linked server returned message "Query timeout expired". [SQLSTATE 01000]

A linked Server was set up against a remote database to backup a database and it runs perfectly well when executed directly against the remote server but returns the above error when set up through Sql Server Agent. Permissions are good as the step returns success. I reset the query timeout property to zero but error persist. What else should I be looking at to make this work?

View 3 Replies View Related

Odbc-timeout Error On A Linked Table From Access2k

Dec 12, 2006

Hi.I have the problem that some records in a ms sqlserver table is unableto update from Access.I get the error message odbc-time out error in linked table......I tried to copy this table to another database, where none but me wasaktive.And then it worked quit ok when I try to save the record.I am thinking about if there is some trigger och restraint that Idon't know about, but I don't know how to se all of this in thedatabase.I have changed the odbc-timeout settings in Access but that doesn'tseed to make any differenceSo what's the problem?Does anyone have an idea?/regards BigOlle

View 1 Replies View Related

Server Load And Timeout Expiry

Feb 24, 2004

Hi all,

The company that I work for has an internet application that has been running in our client's environment for 2 years.

The SQL box is a quad Xeon 750 with 4 gig of ram and over 50gig of disk. This box has 4 databases that are used for the application. The primary database is about 1.5gig in size (.mdf file) the others are relatively small.

The box is queried from a separate windows 2000 server box with our COM based application running under IIS.

The boxes are located on the same switched LAN.

Up until recently the application has been running fine, but all of a sudden we have had masses of database time outs and the processor utilisation is always 80-100. In turn these time outs crash IIS eventually.

I Understand all of the ideas about increasing the timeout in a command object, etc.

I have monitored blocking on the SQL server and over a 30 minute period of live usage I saw 1 block and 0 deadlocks.

In addition to the above often our application gets an imediate time out error, hence after no time.

We have also monitored the network bandwidth between the two boxes and they only use about 30% on average of available bandwidth.

My 1st question is - Does SQL give a time out error (hence refuses connections) if it is running at 100% and cannot handle any more load??

My 2nd question is, In other peoples experience is the box we are using powerful enough.

My 3rd question is, Can the network have an effect on the time outs even though there is plenty of bandwidth.

Thank you in advance for your time in reading this and I appreciate any input that you may have.

Simon Gratton
Senior/Lead Developer
Fastrack Software Ltd.

View 2 Replies View Related

'Timeout Expired' Error Due To Long Query Or Busy Server?

May 2, 2008

We have been bothered with this problem for a while.  Usually I happens in the early moring.  Later on after the error is gone on auser, the error never happens again on any user for the day.  Is this a web Server problem or an aspx.vb coding error? Thanks,Jeffrey 
Server Error in '/SSSSS' Application.


Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.Source Error:



Line 270: oDBCommand.Connection.Open()
Line 271:
Line 272: Dim myReader As SqlDataReader _
Line 273: = oDBCommand.ExecuteReader(CommandBehavior.CloseConnection)
Line 274:Source File: E:SSSSSScheduling.aspx.vb    Line: 272 Stack Trace:



[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +862234
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739110
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +903
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +62
Soma.Scheduling.GetNextAutoAppointment() in E:SSSSSAScheduling.aspx.vb:272
Soma.Scheduling.Page_Load(Object sender, EventArgs e) in E:SSSSSScheduling.aspx.vb:61
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

View 7 Replies View Related

Error : Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Jul 3, 2007

Hi,
I am running a stored procedure that collects some records from two tables do some calculations with those records and insert those calculation result in a temp. table. I am calling this stored procedure in my aspx page and then later select all the records from temp table and show it in a table.
When I run this application on browser it give me Timeout expired error but whn I execute the stored procedure it runs properly but takes around 3:10 mins to execute in query analyzer. I did some google work and based on that I specified CommandTimeout = 300 for SP and Connection timeout=400 in web.config. But still it didnt worked. Sometimes it runs properly but sometimes its not.
Where I am doing mistake? and Wht should i do to resolve this? Plz. help.
Thanks in adv.
Regards,
Yogita
 
 

View 1 Replies View Related

Error: Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Dec 26, 2007

Guys,
I am trying to attach a database object to the App_Data directory I got thie error
  Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This is what I did. I right click the App_Data folder and click Add New Item. Then I click the SQL Database. This is where I got the error.
What should I do? Please help

View 2 Replies View Related

Linked Server Query Error

Feb 10, 2003

SQL 2000
I have a process that calls several stored procs which access a database on a linked server.
code that fails:

SELECT DISTINCT em.er_id, em.er_name, bp.bpo_id, bp.bpo_name
FROM [dbrptc13dayoldprod].ues.dbo.Employer em
Inner Join [dbrptc13dayoldprod].ues.dbo.BPO bp ON
em.er_bpoid = bp.bpo_id

Error message:
Server: Msg 913, Level 16, State 8, Line 1 Could not find database ID 6. Database may not be activated yet or may be in transition.

The database is accessible from query analyzer with a simple select from the linked server. Also if I change any letter in the ues.dbo.Employer em or ues.dbo.BPO bp part to a different case it works fine.
For example: -changed the BPO to BPo- this works!
SELECT DISTINCT em.er_id, em.er_name, bp.bpo_id, bp.bpo_name
FROM [dbrptc13dayoldprod].ues.dbo.Employer em
Inner Join [dbrptc13dayoldprod].ues.dbo.BPo bp ON
em.er_bpoid = bp.bpo_id


Please help I can't figure this one out.

Thanks.

View 1 Replies View Related

Linked Server Problem Login Timeout Expired

Aug 3, 2007



Hello All,

My application is dependent on two databases one is on sql 2005 machine and other is on sql 2000 machine. A linked server is establish between these two using sql account which has appropriate rights on both server's databases.

application works fine but after some time it crashes and if i see error from sql profiler i get the error

OLE DB provider "SQLNCLI" for linked server "sql2000machine" returned message "Login timeout expired".

Few days back applciation was working absolutly fine, but i was trying to make linked sever through windows account, i dnt know wat has i changed during achiveing that setup that now application (linked server) is not working even with sql account.

please help its urgent.

View 2 Replies View Related

Error Query Data Through Linked Server , SQL Server 2005

May 27, 2008

Hello,

I have a development and a production SQL server instance environment set up on 2 independent machines. Each machine is running Windows 2003 for an OS, while each server instance is version SQL Server 2005. On friday, I experienced difficulties querying one environment from the other through linked servers. I would get the error below:
.

Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "dev_server". The provider supports the interface, but returns a failure code when it is used


The linked servers had been previously set up and had been running without any issues. Dropping and recreating the linked servers did not help at all, and all attempts to google the error led to accounts of either SQL Server 2005-SQL Server 2000 procedures compatibility or 64 bit - 32 bit compatibily related errors. Neither of the two were relevant as both my environment have the same technology, both hardware and software.

Mysteriously, the linked server worked this morning without any issue at all. One co-worker suggests gremlins are at work, while another figures that my set up had 'checked out for the long weekend'. Unfortunately, neither explanation is plausible, so my quest to find out what could have gone wrong, and hopefully put preventitive measures in place for the future goes on. Does anybody have any idea what the issue could have been?

Thanks,
Simba

View 1 Replies View Related

Stored Procedure Query Optimization - Query TimeOut Error

Nov 23, 2004

How to optimize the following Stored procedure running on MSSQL server 2000 sp4 :

CREATE PROCEDURE proc1
@Franchise ObjectId
, @dtmStart DATETIME
, @dtmEnd DATETIME
AS
BEGIN


SET NOCOUNT ON

SELECT p.Product
, c.Currency
, c.Minor
, a.ACDef
, e.Event
, t.Dec
, count(1) "Count"
, sum(Amount) "Total"
FROM tb_Event t
JOIN tb_Prod p
ON ( t.ProdId = p.ProdId )
JOIN tb_ACDef a
ON ( t.ACDefId = a.ACDefId )
JOIN tb_Curr c
ON ( t.CurrId = c.CurrId )
JOIN tb_Event e
ON ( t.EventId = e.EventId )
JOIN tb_Setl s
ON ( s.BUId = t.BUId
and s.SetlD = t.SetlD )
WHERE Fran = @Franchise
AND t.CDate >= @dtmStart
AND t.CDate <= @dtmEnd
AND s.Status = 1
GROUP BY p.Product
, c.Currency
, c.Minor
, a.ACDef
, e.Event
, t.Dec

RETURN 1
END



GO

View 8 Replies View Related

Severe Error After Installing SQL2005 SP2 Query To Linked Server Foxpro With Oledb

Oct 24, 2007

After installing sql2005 sp2 a simple select query to a linked server reports the following error message:

Msg 0, Level 11, State 0, Line 0A severe error occurred on the current command. The results, if any, should be discarded.Msg 0, Level 20, State 0, Line 0A severe error occurred on the current command. The results, if any, should be discarded.
Before installing SP2 we used sql2005 without any service packs, the linked server worked fine.

The linked server is a Visual FoxPro database.

After uninstalling and installing the 'Microsoft OLE DB Provider for Visual FoxPro 9.0' the issue stil remains.

View 3 Replies View Related

DB Engine :: Linked Server - Getting Error When Performing Cross Instance Query With Joins

Apr 26, 2015

I've successfully created a Linked Server that connects a local DB Engine with another DB Engine through an ip over an extranet. I am able to run simple Select statement queries on the Local DB Engine and get results from the linked server. However when attempting to perform more complex queries that join tables from the linked server with tables from the local DB server, I get the following error message after several minutes of execution:

OLE DB provider "SQLNCLI11" for linked server "<ip of Linked Server>" returned message "Protocol error in TDS stream".
OLE DB provider "SQLNCLI11" for linked server "<ip of Linked Server>" returned message "Communication link failure".

Msg -1, Level 16, State 1, Line 0

Session Provider: Physical connection is not usable [xFFFFFFFF].

OLE DB provider "SQLNCLI11" for linked server "<ip of Linked Server>" returned message "Communication link failure".

Msg -1, Level 16, State 1, Line 0

Session Provider: Physical connection is not usable [xFFFFFFFF].

OLE DB provider "SQLNCLI11" for linked server "<ip of Linked Server>" returned message "Communication link failure".

Msg 10054, Level 16, State 1, Line 0

TCP Provider: An existing connection was forcibly closed by the remote host.

How I can resolve it. I've read on Distributed Transactions but I understand that it only applies to manipulation statements?

Both are SQL servers. Linked Server is SQL2008R2 if not mistaken. Local DB Engine is SQL2014.

View 3 Replies View Related

Strang Query Timeout Error

Mar 19, 2008

I have created a stored procedure which searches one or more requests (request is a table) according to the given parameters and returns Rows from Request table. I have used Full Text Search function i.e. Contains() in this Query. I have problem with Full Text search, when user first time executes query with Contains() function it works fine and continues working fine for 10 to 15 times or more executions. But after some searches the system starts saying Timeout Error. The very strange situation is that the application is developed in Visual Basic and if we run stored procedure through Visual Basic it says Time Out but at the same time when we run the same stored procedure with same parameters from SQL Server Management Studio, it runs immediately and takes no time in execution. Also I have tested the Stored procedure without the Contains function and in this case it works fine. It only hangs when we search for more than 10 or 15 times.


Does anyone know what is the problem here?, i am posting here my code too,




Code Snippet
-- =============================================
-- Author: Arsalan Tamiz
-- Create date: 17-Mar-2007
-- Description: Request Search Engine
-- =============================================
ALTER PROCEDURE [RVO].[LookUpRequest]

-- Add the parameters for the stored procedure here
@Account_ID int = NULL,
@Comp_Name varchar(255) = NULL,
@RVO_ID varchar(100) = NULL,
@RVO_CreateDateStart datetime = NULL,
@RVO_CreateDateEnd datetime = NULL,
@RVO_LockStatus int = NULL, -- NULL = All, 0 = Not Locked / Open, 1 = Locked
@RVO_FinalizeStatus int = NULL, -- NULL = All, 0 = Not Finalized, 1 = Finalized
@SEStatus int = NULL, -- NULL = NOT use, 0 = NOT set, 1 = SET to any
@SE_ID varchar(100) = NULL, -- SE ID
@RVO_CommitStatus int = NULL, -- NULL = All, 0 = Not Commit, 1 = Committed
@RVO_Voided int = NULL, -- NULL = All, 0 = Not Voided, 1 = Voided
@Area_IDNotSet bit = NULL,
@NH_IDNotSet bit = NULL,
@LandmarkNotSet bit = NULL,
@ClassNotSet bit = NULL,
@City_ID int = NULL,
@Area_ID int = NULL,
@NH_ID int = NULL,
@Keyword varchar(255) = NULL,
@Brand varchar(255) = NULL,
@CompType_ID int = NULL
AS
BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @kc varchar(255);

If @Keyword IS NULL

SET @kc = @Keyword;
Else

SET @kc = Gen.GetContainsCriteriaGen(@Keyword);


SELECT *
FROM RVO.tbl_RequestRVO
WHERE

(@CompType_ID IS NULL OR CompType_ID = @CompType_ID) AND
(

@kc IS NULL OR

Contains(RVO_Keywords, @kc)
) AND
(

@Brand IS NULL OR

Exists(

SELECT * FROM RVO.tbl_RequestRVOBrand


WHERE Brand_Name LIKE @Brand + '%' AND Request_ID = RVO.tbl_RequestRVO.Request_ID
)
) AND
(

(
@City_ID IS NULL AND
@Area_ID IS NULL AND
@NH_ID IS NULL AND
@Area_IDNotSet IS NULL AND
@NH_IDNotSet IS NULL
) OR
Exists(


SELECT * FROM RVO.tbl_RequestRVOAddress


WHERE (


@Area_IDNotSet IS NULL OR
(@Area_IDNotSet = 1 AND Area_ID IS NULL)
) AND

(

@NH_IDNotSet IS NULL OR
(@NH_IDNotSet = 1 AND NH_ID IS NULL)
) AND
(@City_ID IS NULL OR City_ID = @City_ID) AND
(@Area_ID IS NULL OR Area_ID = @Area_ID) AND
(@NH_ID IS NULL OR NH_ID = @NH_ID) AND
Request_ID = RVO.tbl_RequestRVO.Request_ID AND
Address_Voided = 0
)
) AND
(

@LandmarkNotSet IS NULL
OR
NOT Exists (


SELECT TOP 1 *
FROM RVO.tbl_RequestRVOAddressLandmark

INNER JOIN RVO.tbl_RequestRVOAddress ON RVO.tbl_RequestRVOAddressLandmark.RequestAddress_ID = RVO.tbl_RequestRVOAddress.RequestAddress_ID
WHERE Request_ID = RVO.tbl_RequestRVO.Request_ID AND

Address_Voided = 0
)
) AND
(

@ClassNotSet IS NULL
OR
NOT Exists (


SELECT TOP 1 *
FROM RVO.tbl_RequestRVOClass
WHERE Request_ID = RVO.tbl_RequestRVO.Request_ID
)
) AND
(Account_ID = @Account_ID OR @Account_ID IS NULL) AND
(@Comp_Name IS NULL OR RVO_CompName LIKE @Comp_Name) AND
(@RVO_ID IS NULL OR RVO_ID = @RVO_ID) AND
(RVO_CreateDate >= @RVO_CreateDateStart OR @RVO_CreateDateStart IS NULL) AND
(RVO_CreateDate <= @RVO_CreateDateEnd OR @RVO_CreateDateEnd IS NULL) AND
(

@RVO_LockStatus IS NULL OR
(RVO_LockDate IS NULL AND @RVO_LockStatus = 0) OR
(RVO_LockDate IS NOT NULL AND @RVO_LockStatus = 1)
) AND
(

@RVO_FinalizeStatus IS NULL OR
(MO_FinalizeDate IS NULL AND @RVO_FinalizeStatus = 0) OR
(MO_FinalizeDate IS NOT NULL AND @RVO_FinalizeStatus = 1)
) AND
(

@RVO_CommitStatus IS NULL OR
(Comp_ID IS NULL AND @RVO_CommitStatus = 0) OR
(Comp_ID IS NOT NULL AND @RVO_CommitStatus = 1)
) AND
(

( -- if SE = SET Then SE_ID must NOT be NULL

@SEStatus = 1 AND
(

(SE_ID IS NOT NULL AND @SE_ID IS NULL) OR
(SE_ID = @SE_ID)
)
) OR
(@SEStatus = 0 AND SE_ID IS NULL) OR
@SEStatus IS NULL
) AND
(RVO_Voided = @RVO_Voided OR @RVO_Voided IS NULL)
ORDER BY

Account_ID, RVO_CreateDate;



END

View 6 Replies View Related

Error Executing Non Query: Timeout Expired

May 23, 2007

I was having some errors from the webpage accessing the OLlinks table in the database.
Error executing non query: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
StackTrace:   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()   at System.Data.SqlClient.SqlDataReader.get_MetaData()   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader()   at admin_admOLEditLinks.selectData(String strID) in e:wwwroothomeadminadmOLEditLinks.aspx.cs:line 101DateTime:5/23/2007 1:14:10 PMSource:http://www.myDomain.comiAdmin/admOLEditLinks.aspx?ID=3ErrorMessage:Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
I kept getting the above error so then I try to access the table directly inside of MS SQL Server Management Studio and then I recieved the following error:
SQL Execution Error.
Executed SQL statement: SELECT lnkID, linkFromID, linkToID FROM OLlinks
Error Source: .Net SqlClient Data Provider
Error Message: Timeout expired. The timeout period elapsed prior to completion of the opration or the server is not responding.
 
Open any other table works fine except this table only. Any help is much appreciated.

View 7 Replies View Related

Group By Query Casues TimeOut Error

Oct 22, 2006

I have a table with 6 million rows.I'm trying to perform a group by query that incudes a row count of thePK column:SELECT COUNT(DataID) AS Cnt, Column1NameFROM dbo.TableNameWHERE (Column2Name = N'p')GROUP BY Column1NameI have the query timeout set to 0 in Enterprise Manger. However, if Irun this query, either in Enterprise Manager or in Query Analyzer, Iget the following error message:[Microsoft][ODBC SQL Server Driver]Timeout expiredA little baffled as to why and how to run this query.Any help is appreciated.lq

View 2 Replies View Related

SQL Express Query Timeout Error On Stored Procedures

Dec 12, 2007

I've been researching this problem for weeks and I haven't gotten very far with it so I was hoping to get some help here.

Here's the error information we get:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

This particular error comes from a .net application, but we've seen similar "query timeout errors" from a vb6 application roughly 6 months ago.

Here are the facts we've narrowed down:

1) The timeout happens at seemingly random times (very sporadic).
2) It's currently only happening on a few stored procedures (if requested, I'll provide one of the stored procedures, but it's basically a complex search procedure).
3) To resolve the timeout error, we've found 2 temporary solutions:

A) have all clients exit the program thus closing all active connections (less than 10 connection in a 4-5 user setup)
B) I run the following script when the timeout occurs and then the stored procedure runs smoothly:




Code Block

sp_configure 'remote query timeout', 0
reconfigure with override
sp_configure 'remote query timeout', 600
reconfigure with override
4) Running the stored procedure from our application and from SQL Management studio express, is the same, except management studio doesn't time out and actually runs as long as it takes (roughly 1 minute 20 seconds or under 1 second after the script above runs).

We're pretty stumpted and it's happened at 5 different client sites with little in common. One of our sites is even running SQL express off the workstation with nothing else running and it still occurs.

I'm open to trying practically anything at this point, but unfortuntenly we have not been able to reproduce this behavior in our testing enviroment so I can't give much information for others to reproduce.

Thanks in advance!

View 1 Replies View Related

Query Timeout Expired.... Message 7412. How To Catch This Error??

Oct 26, 2007

Hi All,

I have the same question and error that Chopaka is getting:

"I have a SQL 2005 job that calls a stored proc. The job step returns the message "Query timeout expired....Message 7412...The step succeeded." The proc never actually ever did anything due to the query timeout, and the job continued on to other steps. I'm going to address the timeout issue eventually, but first I'd like to trap the timeout problem and force the job to end.

It appears that the query timeout isn't really an error, just a message. I've tried TRY-CATCH in the SP but the situation isn't caught, again probably due to the interpretation that it isn't an error."


I have reduced the "Remote Query time out" to 1 sec, in order to catch the error and to prevent the job from running, but the error is not caught.


Is there a way to catch this in the SQL or in the job step to prevent the job from continuing?

This is the script that I'm using without any luck
BEGIN TRY
BEGIN Transaction
Create table #tmpSummaryTable
(
)
insert into #tmpSummaryTable
select * from CDRServer01.iXtemp.dbo.gx_tbFTRSummary_test

COMMIT Transaction
END TRY

BEGIN CATCH
DECLARE @err int
SELECT @err = @@error
PRINT '@@error: ' + ltrim(str(@err))

SELECT ERROR_NUMBER() ERNumber,


ERROR_MESSAGE() Error_Message
ROLLBACK
Return

END CATCH

View 3 Replies View Related

Error : Timeout Expired. The Timeout Period Elapsed...

Nov 10, 2006

Hi,I
get this error from our web application every once in a while. " Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding". I email
myself when an error occurs, and once every 2-3 days I get this timeout
error emails, like 5-10 emails in a span of few minutes. Then it goes
away. I have set the command timeout for 60 secs.
It
doesn't happen from the same stored procedure, actually I have seen it
timeout from really simple 1 or 2 line stored procedures, which shouldn't normally take 1 sec. Its like
sql server just shuts down for few minutes. We have some
backups and maintenance jobs scheduled, but they run only after
midnight. I have checked the
application event viewer, there are no warnings or
error messages for MSSQLSERVER. Can
any one tell me how to check whats going on during that short timespan
when timeout error occurs, and what causes it? I don't want to run sql
profiler continuously for 2-3 days, I am afraid it will slow down the
server more. Thanks.

View 3 Replies View Related

Load A SSIS Package Via Web Service: The Package Failed To Load Due To Error 0xC0011008 Error Loading From XML.WHAT IS THAT?

May 19, 2006

Hello,

I have a big problem and i'm not able to find any hint on the Network.

I have a window2000 pc, VS2005,II5 and SQLServer 2005(dev edition)

I created an SSIS Package (query to DB and the result is loaded into an Excel file) that works fine.

I imported the dtsx file inside my "Stored Packages".

I would like to load and run the package programmatically on a Remote Scenario using the web services.

I created a solution with web service and web page that invoke the web service.

When my code execute:
Microsoft.SqlServer.Dts.Runtime.Application.LoadFromDtsServer(packagePath, ".", Nothing)

I got the Error:
Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.

The error message doesn't help so much and there is nothing on the www to give me and advice....

Is it a SSIS problem???

Thank you for any help!!

Marina B.



View 10 Replies View Related

Timeout Expired Error - SQL Server 2005 Error After Exactly 1 Hour

Aug 27, 2007

We have several large government web sites that we help look after. We recently migrated one of them from SQL Server 2000 to 2005 and are having a problem with our nightly email job in that if it runs for more than an hour then after exactly 1 hour the email job gets a "Timeout expired" message back from SQL Server.

Our batch jobs do run on a different server and connect remotely to our SQL Server DB. I did change the connections - remote query timeout and increased it 10 fold, but this didn't make any difference. Is there any other parameter that may be causing the Timeout expired error after exactly 1 hour?

Thanks !

View 1 Replies View Related

SQL Server Timeout Error

Oct 3, 2005

Coupleof my users receive a "timeout expired" error when using an ADP project application that connects to sql server. Others do not have this problem at all. What could be the issue? The queries that are being run are not large queries at all so they should not take more than 30 seconds to run.

View 1 Replies View Related

SQL Server 2000 Timeout On SELECT Query

Mar 29, 2007

 The SQL statement below works without the WHERE statement but as soon as i try to use the where it stops working, I think it has something to do with the HAVING statement in the vwMultiAE2 view but I am not sure.It did the same thing when I had it in one view. Anyone know what is going on here?SELECT Ch, Reg, FMM, AE, Acc, Totals FROM vwMultiAE2 WHERE (g1ID = @g1 or @g1 = 'All') AND (g2ID = @g2 or @g2 = 'All') AND (g3ID = @g3 or @g3 = 'All') AND (AEID = @g4 or @g4 = 'All')
 
vwMultiAE2 >
 SELECT TOP 100 PERCENT
Ch,
Reg,
FMM,
AE,
Acc,
Totals,
g1ID,
g2ID,
g3ID,
AEID
FROM
vwMultAE
WHERE
Account_ID IN (SELECT Account_ID FROM vwMultAE GROUP BY g2ID, Account_ID HAVING ( COUNT(Account_ID) > 1 ))
ORDER BY
g2ID, Account_ID 
 
 
 

View 5 Replies View Related

Timeout Or Server Busy Error During Backup......WHY?

Mar 1, 2007

I have the standard version of SQL2005 and have a backup maintenance plan that runs every Sunday consisting of the following steps.

1. Check Database Integrity

2. Rebuild Index

3. Back Up Database (Full)

The backup itself works fine, but sometimes during the backup I am unable to insert new records into the database that I am backing up.

I believe from all the documentation and other comments I have read that the database should always be available for inserts or updates even during the backup operation. The error I receive from VB.NET application is:

System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

The problem only occurs during a full backup, not differentials or tranaction log backups. Sometimes after catching the above error I can insert into another table, but at other times I am not able to insert into the desired or backup table and simply have to write the data to a file and insert it manually at a later time.

This problem does not consistently occur since a backup may take 10 minutes and during that period maybe 5 of 6 records are inserted correctly, but one will fail.

Why doesn't the database always allow inserts during the backup? It should, shouldn't it?

Thanks for any help!

View 6 Replies View Related

Timeout Error When Starting Sql Server And Other Services

Jan 9, 2008

Hi,

I am trying to start Sql server, anlysis services and other things through Configuration manager and iam getting time out error every time.

I was able to start and stop earlier. Please suggest a solution. I am using Sql server 2008 Nov CTP on XP machine.

View 9 Replies View Related

Get Timeout Error With TableAdapter But Not With SQL Server Management Studio

Jan 4, 2008

I have found a similar problem in Google but that thread doesn't have any conclusion. So that I wish a new thread can help solve this problem ultimately.http://forums.asp.net/rss.aspx?ForumID=54&PostID=1600414Problem description:TableAdapter will raise timeout exception when I try to execute a SQL containing subquery and grouping. However, if the same SQL is executed in SQL Server Management Studio. The response time is always less than 1 second.Solution provided in previous link:Increase the timeout setting of the command - I think this is not the solution. As the default timeout should be 15 seconds, how could it get a timeout error if it execute a SQL supposed to be finished within a second?I have encountered similar problem before. However, I can't remember the exact detail. My solution for that moment seems to be using join instead of subquery in the SQL. Unluckily, this trick does not work this time.Please provide any other suggestion. Thanks in advance.

View 6 Replies View Related

Error - ODBC Sql Server Driver Timeout Expired

Sep 28, 2005

Hi everyone

I have installed SQL server on my server machine. using localsystem and mixmode option.
It is working fine.

I installed sql server with connectivity tools only option on my client computer.

now, When i try to connect to server using data source from control panel --> Administrative tools --> Data source(ODBC).

but I cant connect.It gives me error as below.

Connection Failed:
SQLState:'HYT00'
Sql Server Error:0
[Microsoft][ODBC SQL Server Driver] Timeout Expired.

I uninstalled sql server from my client and server computer. and installed again.

I tried to ping from client computer to server computer it is working.

even i tried telnet sqlservername 1433

this one is also ok.


But same error facing

Please help me out.

Regards,
ASIF

View 1 Replies View Related

SQL Server Error '80040e31' Timeout Expired Strange.

Oct 30, 2007



Hi All,

we are working on a web application created in ASP & SQL 2000 environment.
In the code , we have a single connectionstring to connect database.
The application was running fine for the past 3 years, but all of a sudden we are getting "timeout expired" error only in someparts of the application but not on all database access.
The code which raises this error is a bit large which need to look into table of 8k recs with more conditions.
The same sql query took 1:01 minutes to execute in query qnqlyser.
I changes the script timeout to 900secs,
I herd we need to upgrade MDAC or we need to change connection timeout or we need to cahnge the code.

we cannot change the query, it is the most possible way we could get that.

Can somebody help me with the possible solution.


Thanks & Regards,
Sai. K.K

View 5 Replies View Related

Timeout Problem With Large Update Query From VB.Net To SQL Server 2000

Jul 20, 2005

Hi all,I am doing some large updates,that may update 10,000 plus rows.This works fine when I execute the SQL directlyin Query Analyzer.If I set the timeout on my VB connection to 0 (zero)the connection should not time out????But it does.If I set the time out to a high value, say 1200,I get the same problem well within 1200 seconds.Also, I am getting the problem that the log fills up,but it is set to auto grow????Any ideas would be appreciated.ThanksGreg

View 1 Replies View Related

Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Dec 28, 2006

Hey,
From time to time i get this error "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding." so I tried to change the connection string by adding thie following "Connect Timeout=200; pooling='true'; Max Pool Size=200" but still it is giving the same error! so why is this happening ? and what can I do!
btw the timeout expired happens when a stored procedure is executed at the Fill method !
Thank you in advance
Hiba

View 2 Replies View Related

Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Mar 1, 2007

Hi All,
I am facing a problem in SQL Server 2005 and the .NET Environment. I have an SP, which will return me the result within fraction of second when i execute it in SQL Server Management studio. But randomly (Frequently), its giving timeout when i execute it from .NET Envirnment.
If i execute it at that same time in Management studio, i am not getting the error. But getting the Timeout when i execute it in the Server Explorere of VS 2005 or in the Application which uses it.
Can any one figure out the solution.

View 9 Replies View Related

Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

May 19, 2007

Hi Team Iam working in a asp.net web application. In my system i have installed the xp as os and the in my network is of 2003 server. All files and database are there. But when me accessing the files from my laptop it shows the error as follows Timeout expired.  The timeout period elapsed prior to completion of the
operation or the server is not responding.Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: Timeout expired.  The timeout period
elapsed prior to completion of the operation or the server is not
responding.Source Error:



Line 19: con = New SqlConnection(constring)Line 20: If con.State = ConnectionState.Open Then con.Close()Line 21: con.Open()Line 22: cmdobj = New SqlCommand(query, con) Source File:
Y:Inetpubwwwrootsreeskybuilderssreeskybuildersdbmain.vb    Line:
21 If me accessing that same from that mechine there were no errors and i can go thru that program successfully. So please help me to do access the db from anywhere in my network Thanks Rajesh.C.S 

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved