Reporting Services Timeout But Query Keep Running?
Apr 2, 2008
The Gobal value for the reporting timeout is 10 minutes (600).
I Have a report which takes around (1hr to run).. The report correctly timesout (page cannot be display)
but the query kept on running..until it completed.
Is there any way to stop this from happening (Report and Query timeout after 10 minutes)
I have look on the internet and in my rsreportserver.config ..
<Add Key="SQLCommandTimeoutSeconds" Value="60"/>
<Add Key="MaxActiveReqForOneUser" Value="20"/>
<Add Key="DatabaseQueryTimeout" Value="120"/>
.. This information seems to be ingnored
View 2 Replies
ADVERTISEMENT
May 18, 2012
I have a very frustrating problem. But given that this is a development forum, I'll keep that for my 'Envelope Lickers Rehab' and instead talk about an issue I'm having.
I have a very large query (line-wise) that executes in less than a minute when run from the SQL Management Studio as well as via Excel Services.
It is a stored procedure with one parameter. When I try to prime the designer with this query it gives me the following message:
"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated."
I've considered cracking open the xml source and manually creating the fields, but I'd rather not go there.
View 8 Replies
View Related
Jan 9, 2006
Hi there,
I've just developed this big report in RS SQL 2000 that includes 6 subreports (repeated for each item in the database) and that should print some 800 pages. A light version of the report that only queries part of the data (about 10%, for testing purposes) run with success, including all subreports in about 15 minutes. Once I try to test the report with all the data (all subreports and the main report query directly from the cube in AS), it fails under three different scenarios:
1st: The timeout setting is left as the default 1800 seconds. After half an hour the report gets partially displayed and the subreports that were not processed within the 30 minutes period display only "The subreport data could not be displayed".
2nd: The timeout value is set not to time out. After about 2 hours, the report fails ("The page cannot be displayed"). I checked all log files and the only one I could identify as related to this was the following:
SQL Server Scheduled Job 'ReportScheduler_CreateJobs' (0x4A64EE6822172C478B4DBF1E385699D6) - Status: Failed - Invoked on: 2006-01-09 13:00:00 - Message: The job failed. The Job was invoked by Schedule 1 (DailyRun). The last step to run was step 1 (spc_sched_CreateJobs).
3rd: Tried to export the file to PDF instead of rendering as HTML. I got the message on the page "Action Cancelled" and an IE message box displaying a "Permission Denied" error.
I've tried many things and ran out of ideas. If anyone could give me any suggestions, I'd greatly appreciate it.
Thanks,
Érico Maia
View 6 Replies
View Related
Feb 8, 2008
Hi,
We just started to use Reporting Services in integrated mode (SQL Server 2005, MOSS 2007). The huge problem is we unable to build models of big databases:
"Server was unable to process request. ---> The operation has timed out "
The process teminates correctly if database is small enouth to finish model building under appoximatly 100 sec. Curently I increased timeout values in site and RS service config files:
rsreportserver.config:
<Add Key="SQLCommandTimeoutSeconds" Value="2400"/>
<Add Key="DatabaseQueryTimeout" Value="9000"/>
site web.config :
<httpRuntime maxRequestLength="51200" executionTimeout="9000" />
Still having same problem. Any suggestions where I can find that 100 sec value? Please help.
View 2 Replies
View Related
Feb 23, 2007
I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, and then called the LogonUser().
Now, one of the functionality we have in the applicaiton is to set the reporting services Timeout for reports that take too long to run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout property is getting set.
I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.
How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout property for Reporting Services with Forms Authentication?
Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.
/**partial UILogon.aspx code for ReportServerProxy below**/
public class ReportServerProxy : ReportingService
{
protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest request;
request = (HttpWebRequest)HttpWebRequest.Create(uri);
// Create a cookie jar to hold the request cookie
CookieContainer cookieJar = new CookieContainer();
request.CookieContainer = cookieJar;
Cookie authCookie = AuthCookie;
// if the client already has an auth cookie
// place it in the request's cookie container
if (authCookie != null)
request.CookieContainer.Add(authCookie);
request.Timeout = -1;
request.Headers.Add("Accept-Language",
HttpContext.Current.Request.Headers["Accept-Language"]);
return request;
} ...}
/** Below is the Reports Web applicaiton code that calls the ReportsServerProxy LogonUser **/
Public Function GetReportServerProxy() As ReportServerProxy
Dim rsProx As New ReportServerProxy
rsProx.Url = ConfigurationSettings.AppSettings("REPORT_SERVER_URL") + "/ReportService.asmx"
Try
rsProx.LogonUser("SYSADMIN", "password", Nothing)
Return rsProx
Catch ex As Exception
Throw New Exception("GetReportServerProxy Failed.", ex)
End Try
End Function
Private Function CreateSnapShot() As String
...
Dim rs As RSCustomSecurity.ReportServerProxy
Try
rs = GetReportServerProxy()
' First set the parameters' default values
parameters = setParamters()
rs.SetReportParameters(reportPath, parameters)
If errorsList.Count > 0 Then Throw New Exception
'Server.ScriptTimeout = 10
rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))
lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)
'lblStatus.NavigateUrl = "ViewSnapShot.aspx?History_ID=" & lsHistoryID
lblStatus.Text = "Your request has been processed. View report as"
....
Catch ex As Exception
....
Finally
Debug.Write("End : " & Now.ToLongTimeString)
rs = Nothing
End Try
End Function
View 1 Replies
View Related
May 12, 2015
We run std 2008 r2. I've never been able to get to my ssrs server thru ssms as u can see as part of the question at
[URL] ..... but I've found workarounds to this point by knowing how to look at the rs db itself and by having access to the server itself thru rdp with an admin acct.
I'm looking at an error from a user that reminds me of what we used to call session timeouts. They would occur when the user has walked away from his desk long enough for ssrs to delete refs to the report he just ran.
I logged into the server itself hoping to find both exec and session timeout params via the rs config tool but did not see them there. What the config file is called and where i'd likely find it? Or perhaps a query I could use to see what the current values are?
View 8 Replies
View Related
Oct 26, 2007
Hello.
I am having problems with a couple of queries in the Development Studio (Reporting Services 205). I am working on a report that runs a lot of functions so I expect it to be slow. But it times out in 30 seconds.
Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The report finishes when clicking on the preview tab but not when on the data tab. If finishes fine when deployed as well. Is there a way to increase the amount of time the query designer in Visual Studio takes to time out on a query?
I have tried setting the Connect Timeout=60 on the Data Source but it seems to be overridden by a setting in Visual Studio 2005.
Thanks much for any help.
Leo
View 3 Replies
View Related
Sep 17, 2015
When a user runs the report after a minute or 3 the user gets a timeout message, if an administrator runs te same report he will get the results. No errors in log. report timeout on 1800 seconds
View 2 Replies
View Related
Dec 3, 2010
I have started getting this error since a week now when I try to schedule a report or change a schedule of a report. An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. (rsReportServerDatabaseError) Get Online support For more information about this error navigate to the report server on the local server machine, or enable remote errors..
We have SQL Server 2008 installed along with SSRS running on the server. I have never seen this happening before for almost a year now but suddenly it appeared. Along with this, report subscription is also messed up and some report are not been emailed as they have a error like..Failure sending mail: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.Mail will not be resent.
View 19 Replies
View Related
Dec 31, 2007
Hi,
Does any know how to increase a session timeout for Report Creation uing SQL Server 2005 Reporting Services. Iam trying to export a report (to a .pdf) using SQL 05 reporting services. However, it seems that the the query is timing out coz of session-time out. Can anyone tell me how to increase this value ?
Thanks
Nik
View 11 Replies
View Related
Jun 27, 2007
Hi,
I have recently installed SQL Reporting Service for SQL 2005 and started using it. I have one existing code that was using reporting services. But when now I try to run application it gives following error:
=============================================================
The request failed with HTTP status 503: Service Unavailable.
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.Net.WebException: The request failed with HTTP status 503: Service Unavailable.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 503: Service Unavailable.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533199
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
Ti.Dosa.Reports.ReportingServices.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) +175
Ti.UIWeb.NDD.ReportViewer.RenderReport(String[] reportParmsStr, String reportLocation, String reportFormat) +525
Ti.UIWeb.NDD.ReportViewer.Page_Load(Object sender, EventArgs e) +467
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
=============================================================
Please let me know what might be the problem.
Thanks,
Deepak
View 2 Replies
View Related
Feb 5, 2007
I have a question regarding Reporting Services:
I want to run the Reports on a system that has Oracle Database but reporting Services are not installed there. Only Application exe file will be there designed in .NET Windows Forms.
Reports will access oracle Database.
View 7 Replies
View Related
Oct 27, 2015
My problem is:
I have an order , (order id) and multiple boxes (ex: 7 boxes)
I must create a report, that contains among others a bar code => composed like this : "orderId+01" for the first box, "orderId+02" for the second box, .... , "orderId+07" for the 7-th box
I need this report to repeat itself for each box , only the bar code is changed.
Once I call it , it must generate 7 labels in this example.
Now i am able to generate only one report. Iam using report builder 3.0
View 5 Replies
View Related
Feb 21, 2006
I need some help, I am new to Microsoft SQL Server 2005 Integration Services and I am having some problems running Reporting Services ExecutionLog Package in Integration Services. After setting up and running the package, I received this warning message : "Truncation may occur due to inserting data from data flow column 'InstanceName' with a length of 38 to database column 'InstanceName' with a length of 32". I have modified the column length for 'InstanceName' from 32 to 38 in the affected table but I am still receiving this warning message : "The external metadata column collection is out of synchronization with the data source columns. The column 'InstanceName' needs to be updated in the external metadata column collection"
How do I update column 'InstanceName' in the external metadata column collection?
Where do I find the package steps logs (sysdtspackagelog or sysdtssteplog) when running the package as a job or manually.
View 1 Replies
View Related
Sep 29, 2015
We couldn't get the report through SSRS deployed URL. We found dead locks in SQL DB end.how to proceed further issue resolution.
View 5 Replies
View Related
Jul 20, 2015
On my report, I have two parameters that are used to filter my report. I would like for the report to initially run without filters and without having the user required to input parameters. I know that this can be accomplished by using the multi value parameter and having it "Select All" by default, but for my parameters, I would like for each parameter to only allow the user to select one value. Is it possible to have this requirement without having to enable select multi values?
View 2 Replies
View Related
Oct 20, 2015
I have the below chart.
In this, I need to add line charts for the three years specifying the running total. I already have bar charts for the respective years. This is the query that I used to get the dataset.
SELECT [Parent Name], [ID], [Year], [Month], SUM([Value]) AS 'Running Total'
FROM Regulus_Data_Backup
GROUP BY [Parent Name], [ID], [Year], [Month]
order by [Parent Name],[ID], [Year], DATEPART(mm,CAST([Month]+ Convert(varchar(4),[Year]) AS DATETIME))
Then I added a series with a expression that had the chart type as line as shown below.
My Expression was
=RunningValue(Fields!Running_Total.Value,SUM,"MonthWiseData")
My 3 parameter was "MonthWiseData" which is my dataset name. Is this correct? I use the same dataset to get the bar charts too. I get a error message now when loading the report saying "the scope parameter must be set to a string constant.
My goal is to get bar values for 3 years for the 12 months and in the same chart get the cumulative numbers for the 3 years for the 12 months. How can I do this?
View 14 Replies
View Related
Sep 2, 2015
After adding cascading parameters my report which was running earlier is failing. I'm using Report builder 3.0, windows 2008r2, am running the report from the server
Error message "An error has occurred during report processing.(rsProcessingAborted)
Query execution failed for dataset 'LastName' (rsErrorExecutinGcOMMAND)
Incorrect Syntax near ','."
Is there a way where i can look up the code in xml using report builder or some other way so that i can delete the extra '','.
View 6 Replies
View Related
Oct 9, 2009
How can I identify the computer of the person running an SRS report? If I query HOST_NAME() it gives me the host of the reporting server, not the person browsing.So, for example, Melissa opens a browser from computer named AAA to the SRS and pulls up her report. How do I get that report to show that the user is browsing from AAA?
View 12 Replies
View Related
May 28, 2015
I want to get a running total. But its a bit tricky. I have data depending on ID, YEAR, Month, Value like the following.
ID, Year, Month, Value
36002084 2014 Jan 8391
36002084 2014 Jan 0
36002084 2014 Jan 3440
36002084 2014 Jan 0
36002084 2014 Jan 548
36002084 2014 Jan 109
36002084 2014 Jan 125
I wrote the Query below
select
[UEP ID],[Year],[Month],sum([Total VtM EUR]) 'Running Total'
from
RegData
where
[UEP ID]=36002084 and [Year]=2014
group by [UEP ID],[Year],[Month]
I got this output
36002084 2014 Apr 887620
36002084 2014 Aug 789440
36002084 2014 Dec 528453
36002084 2014 Feb 606627
36002084 2014 Jan 331613
36002084 2014 Jul 681314
36002084 2014 Jun 330384
36002084 2014 Mar 1044301
36002084 2014 May 671818
36002084 2014 Nov 465576
36002084 2014 Oct 590147
36002084 2014 Sep 527861
Now I need to get a output like this,
36002084 2014 Jan 331613
36002084 2014 Feb 938240
A running total depending on the ID, Year and Month. Although I showed this for two steps I need to get it from one query.
Question is - To get a running total based on ID, Year, Month. If I do the normal group by and sum query I could get it for all the months for each id. But need to then add January value to February and updated February value.
View 10 Replies
View Related
Sep 17, 2007
Can you run SQL Server 2005 in SQL Server 2000 compatibility mode and still use it with Reporting Services 2005?
View 4 Replies
View Related
Oct 7, 2015
I created a view that i want to use in ssrs.In the view there is a column for running balance.In the table contain transaction of inventory with their quantity.
"SELECT TOP (100) PERCENT ITEMNMBR, TRXSORCE, DOCTYPE, DOCNUMBR, DOCDATE, HSTMODUL, UOFM, UNITCOST, EXTDCOST, TRXQtyInBase,
(SELECT SUM(TRXQtyInBase) AS Expr1
FROM dbo.INVTRXB AS b
WHERE (DEX_ROW_ID <= a.DEX_ROW_ID) AND (ITEMNMBR = a.ITEMNMBR)) AS ENDQTY
FROM dbo.INVTRXB AS a
ORDER BY ITEMNMBR, DOCDATE"
If i run the query on sql or use the view on ssr. The end qty is not showing accurately.I ran it on another database it works perfectly. Then i noticed that the dex_row_ID of the second database is sequential as the date. But for the initial database it was not sequential as with the date.
View 4 Replies
View Related
Jun 4, 2015
Is there any way to get SSRS 2014 report viewer to run in standards mode? We currently host SSRS report viewer in a standards mode IFrame. Seems to work fine for all browsers but IE8. In IE8, the report detail is missing.
I'm guessing that SSRS Viewer on IE 8 requires Quirks mode.
I noticed this article which states that SSRS 2014 Viewer only works in quirks mode.
Rendering issues with SQL Server Reporting Services reports in Internet Explorer
How do you get the SSRS viewer to run on IE8 in standards mode?
View 3 Replies
View Related
Jun 2, 2015
I want to create a datasource but the credentials I want to use will be based on the user running the report rater than hard coded.
I have tried using Windows Integrated Security but all i can is cant log in as NTAnonymous User?
View 8 Replies
View Related
Aug 27, 2015
I made one report in SSRS 2008 in which getting data from one SharePoint List.
three parameters in report :
Country
StartDate
EndDate
I am using query which I created with CAML.
query is running well and data is coming correctly if I run this on Query designer.and date format must be YYYY-MM-DD.but when I try to run through on run time then the date control is showing format dd/mm/yyyy.
I change the regional settings of windows and SharePoint site to English(United States). and when I select date control it is also putting date in format like "YYYY-MM-DD'. and in that format report is working well in Query designer view.But on run time still it is not working.
View 3 Replies
View Related
Oct 28, 2015
I have created 1 report with 2 datasets. This report is attached to the 1st dataset.For example,1st one is "Smallappliances", 2nd is "Largeappliances".
I created a tablix and, the 1st column extracts Total sales per Sales person between 2 dates from 1st dataset (Small appliances). I used running values expression and it works fine.
Now, I would like to add another column that extracts Total sales per sales person between 2 dates from 2nd dataset (Large appliances). I am aware that I need to use Lookup expression and it is giving me the single sales value rather than the total sales values. So, I wanted to use RunningValue expression within lookup table to get total sales for large appliances.
This is the lookup expression that I added for the 2nd column.
=Lookup(Fields!salesperson.Value,Fields!sales_person.Value,RunningValue(Fields!sales_amount.Value,
sum, " sales_person"),
"Largeappliances").
I get this error when I preview the report.An error occurred during local report processing.The definition of the report is invalid.An unexpected error occurred in report processing.
(processing): (SortExpression ++ m_context.ExpressionType)
View 7 Replies
View Related
Oct 1, 2015
I'm still receiving the emails of some subscriptions of reports that were already deleted, how these subscription could be deleted or turned off.
View 2 Replies
View Related
Dec 10, 2007
Although not totally related to this RS cat but since I'm using the query in Reporting Services perhaps I can get a work around from someone. I've created a Rolling 2 year 12 month comparison report that compare sales figures from current and previous years. The query works fine however the query fails to return 0's for no sales for a particular month with no records. Is there anyway I can return a 0 instead. As you can see I tried "isNull to no avail.
Query==========>
SELECT Customer.Country, MetaDates.Month, MetaDates.Year, isnull(SUM(Order_Line_Invoice.Sales),0) AS Sales, SUM(Order_Line_Invoice.Cost) AS Cost,
SUM(Order_Line_Invoice.Sales) - SUM(Order_Line_Invoice.Cost) AS GM, 'Current 12 Months' AS yearNum
FROM Order_Line_Invoice INNER JOIN
Customer ON Order_Line_Invoice.CustId = Customer.CustId INNER JOIN
MetaDates ON Order_Line_Invoice.InvoiceDate = MetaDates.Date LEFT OUTER JOIN
Product ON Order_Line_Invoice.ProdId = Product.ProdId
WHERE (Customer.country = @GroupByFieldFilter) and (Order_Line_Invoice.InvoiceDate BETWEEN dateadd(m, datediff(m, 0, DATEADD(month,-11,@EndDate) ), 0) AND @EndDate)
GROUP BY MetaDates.Year, MetaDates.Month, Customer.country
UNION
SELECT Customer.Country , MetaDates.Month, MetaDates.Year, isnull(SUM(Order_Line_Invoice.Sales),0) AS Sales, SUM(Order_Line_Invoice.Cost) AS Cost,
SUM(Order_Line_Invoice.Sales) - SUM(Order_Line_Invoice.Cost) AS GM, 'Previous 12 Months' AS yearNum
FROM Order_Line_Invoice INNER JOIN
Customer ON Order_Line_Invoice.CustId = Customer.CustId INNER JOIN
MetaDates ON Order_Line_Invoice.InvoiceDate = MetaDates.Date LEFT OUTER JOIN
Product ON Order_Line_Invoice.ProdId = Product.ProdId
WHERE (Customer.country = @GroupByFieldFilter) and (Order_Line_Invoice.InvoiceDate BETWEEN dateadd(m, datediff(m, 0, DATEADD(month,-23,@EndDate) ), 0) AND dateadd(m, datediff(m, 0, DATEADD(month,-11,@EndDate) ), -1))
GROUP BY MetaDates.Year, MetaDates.Month, Customer.country
order by MetaDates.Year, MetaDates.Month asc
End Query=========>
Any help would be much appreciated.
View 8 Replies
View Related
Feb 4, 2008
Hi,
I'm running a CLR stored procedure through my web using table adapters as follows:
res = BLL.contractRateAdviceAdapter.AutoGenCRA() 'with BLL being the business logic layer that hooks into the DAL containing the table adapters.
The AutoGen stored procedure runs fine when executed directly from within Management Studio, but times out after 30 seconds when run from my application. It's quite a complex stored procedure and will often take longer than 30 seconds to complete.
The stored procedure contains a number of queries and updates which all run as a single transaction. The transaction is defined as follows:
----------------------------------------------------------------------------------------------------------------------
options.IsolationLevel = Transactions.IsolationLevel.ReadUncommittedoptions.Timeout = New TimeSpan(1, 0, 0)
Using scope As New TransactionScope(TransactionScopeOption.Required, options)
'Once we've opened this connection, we need to pass it through to just about every
'function so it can be used throughout. Opening and closing the same connection doesn't seem to work
'within a single transactionUsing conn As New SqlConnection("Context Connection=true")
conn.Open()
ProcessEffectedCRAs(dtTableInfo, arDateList, conn)
scope.Complete()
End Using
End Using
----------------------------------------------------------------------------------------------------------------------
As I said, the code encompassed within this transaction performs a number of database table operations, using the one connection. Each of these operations uses it's own instance of SQLCommand. For example:
----------------------------------------------------------------------------------------------------------------------Dim dt As DataTable
Dim strSQL As StringDim cmd As New SqlCommand
cmd.Connection = conn
cmd.CommandType = CommandType.Text
cmd.CommandTimeout = 0Dim rdr As SqlDataReaderstrSQL = "SELECT * FROM " & Table
cmd.CommandText = strSQL
rdr = cmd.ExecuteReader
SqlContext.Pipe.Send(rdr)
rdr.Close()
----------------------------------------------------------------------------------------------------------------------
Each instance of SQLCommand throughout the stored procedure specifies cmd.CommandTimeout = 0, which is supposed to be endless. And the fact that the stored procedure is successful when run directly from Management studio indicates to me that the stored procedure itself is fine. I also know from output messages that there is no issues with the database connection.
I've set the ASP.Net configuration properties in IIS accordingly.
Are there any other settings that I need to change?
Can I set a timeout property when I'm calling the stored procedure in the first place?
Any advice would be appreciated.
Thanks
View 2 Replies
View Related
Jul 20, 2005
Hi GuysUpon creating and running a view in the SQL Svr 2000, Enterprise managerthat takes more than 30 secs to return, I get an 'ODBC SQL Driver Timeoutexpired'. I have tried resetting every timeout I can find but it makes nodifference. Its damned irritating as this is an ENORMOUS DB and most of theviews I create are going to take 60 seconds + to return.Anyone know how to reset the timeout to suit the circumstances.CheersPaulBJ
View 1 Replies
View Related
Feb 28, 2008
Forget it -- I decided to take to crappy way out --
Instead of executing a procedure and trying to get the output when running a SSIS package, I simply run the query in the first step of the SQL Agent Job and fill a table with the results.
All I have SSIS do is export the table to a flat file.
I'm getting the following when I try to run in BIDS:
[Execute SQL Task] Error: Executing the query "dbo.prcCreatePayExtract" failed with the following error: "Query timeout expired". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
It appears that the timeout hits at 30 seconds which I've captured in SQL Profiler but I can't see to find where on earth in the package I can set the timeout. The "Timeout" on the task is set to zero and the Connection Timeout and General Timeout are both zero.
Any help is greatly appreciated,
Sid
View 5 Replies
View Related
May 13, 2008
I have a process that stores a machine status every 2 minutes in a bit field of an SQL database. Running = True, Stopped = False. I am trying to build a report that shows the percent run time every hour. This information would be the count of Trues divided by the total count for each hour. I can select and group the data on the hour but I can either count() the total number of readings or count() the number of readings where the status is true. How do I collect both pieces of information in the same data collection?
SELECT TOP (100)
Max(Time) As Time_M,
Count(Running) As Count_T
FROM Compact10
Group by DatePart(mm,Time), DatePart(dd,Time), DatePart(hh,time)
Order by DatePart(mm,Time) desc, DatePart(dd,Time) desc, DatePart(hh,time) desc
View 3 Replies
View Related
Apr 21, 2007
When I execute a long running procedure, I get timeout errors when other users try to execute other procedures with UPDATE or INSERT statements.
I suspect that the other procedures are trying to execute DML statements on tables that are locked by the long running procedure.
I have a sharred trigger on all my tables that creates and updates records in tables AuditLogDetails and AuditLogParent for keeping a log of modifications. I suspect that tables AuditoLogDetails and AuditLogParent are locked by the long running procedure.
How can I change the LOCKING behavior of the long running procedure to fix the time out errors that I get?
The long running procedure is displayed below.
ALTER PROCEDURE [dbo].[spPostPresenceToHistory2]
@PostDate DateTime,
@Department Int,
@Division Int,
@Testing Bit = 0,
@XDoc xml OUTPUT,
@XDoc2 xml OUTPUT,
@ModifierID varchar(20),
@Comment varchar(200)
AS
BEGIN
BEGIN TRANSACTION
DECLARE @PostCount Int,@PreCount Int,@DiffCount Int
IF @Testing=1
BEGIN
PRINT 'DELETE FROM History2_Presence'
EXEC sp_SetPostingProperties 'History2_Presence',@ModifierID,@Comment
SELECT @PreCount=COUNT(*) FROM History2_Presence
IF EXISTS(SELECT E.ID FROM History2_Personel E WHERE E.PostDate=@PostDate)
BEGIN
DELETE FROM History2_Presence FROM History2_Presence H
INNER JOIN History2_Personel Ps ON H.Personel_ID=Ps.ID AND Ps.PostDate=@PostDate
WHERE Ps.Category_Department_ID=@Department AND Ps.Category_Division_ID=@Division AND H.Date_de_Presence=@PostDate
AND EXISTS (SELECT P.ID FROM Presence P
WHERE (P.Date_de_Presence=@PostDate AND P.Personel_ID=H.Personel_ID AND P.Travaille_de_Jour=H.Travaille_de_Jour) OR (P.ID=H.ID))
END
ELSE
BEGIN
DELETE FROM History2_Presence FROM History2_Presence H
INNER JOIN Personel As Ps ON H.Personel_ID=Ps.ID
WHERE Ps.Category_Department_ID=@Department AND Ps.Category_Division_ID=@Division AND H.Date_de_Presence=@PostDate
AND EXISTS (SELECT P.ID FROM Presence P
WHERE (P.Date_de_Presence=@PostDate AND P.Personel_ID=H.Personel_ID AND P.Travaille_de_Jour=H.Travaille_de_Jour) OR (P.ID=H.ID))
END
SELECT @PostCount=COUNT(*) FROM History2_Presence
IF @PreCount<>@PostCount
BEGIN
SET @DiffCount = @PreCount-@PostCount
SET @XDoc2.modify('
insert <Table Name="History2_Presence" RecordDeleted="{ sql:variable("@DiffCount") }"/> as last into /Deleted_Records[1]
')
END
END
PRINT 'INSERT INTO History2_Presence'
EXEC sp_SetPostingProperties 'History2_Presence',@ModifierID,@Comment
SELECT @PreCount=COUNT(*) FROM History2_Presence
INSERT INTO [dbo].[History2_Presence]
([ID]
,[User_ID]
,[Personel_ID]
,[Date_de_Presence]
,[Category_Motif_ID]
,[DateEntre]
,[Category_TypeDePresence_ID]
,[Travaille_de_Jour]
,[Heur_Supplementaire_Travaille]
,[prime_transport]
,[Tarif]
,[Jour_Travaille]
,[Montant_Supplementaire_Par_Heur]
,[Salair_par_Jour]
,[Salair_Minimum]
,[IsAutomaticRec])
SELECT [P].[ID]
,[P].[User_ID]
,[P].[Personel_ID]
,[P].[Date_de_Presence]
,[P].[Category_Motif_ID]
,[P].[DateEntre]
,[P].[Category_TypeDePresence_ID]
,[P].[Travaille_de_Jour]
,[P].[Heur_Supplementaire_Travaille]
,[P].[prime_transport]
,[P].[Tarif]
,[P].[Jour_Travaille]
,[P].[Montant_Supplementaire_Par_Heur]
,[P].[Salair_par_Jour]
,[P].[Salair_Minimum]
,[P].[IsAutomaticRec]
FROM [dbo].[Presence] AS P
INNER JOIN Personel As Ps ON P.Personel_ID=Ps.ID
WHERE P.Date_de_Presence=@PostDate AND Ps.Category_Department_ID=@Department AND Ps.Category_Division_ID=@Division
AND NOT EXISTS
(SELECT HP.ID FROM History2_Presence HP
WHERE (HP.Date_de_Presence=@PostDate AND HP.Personel_ID=P.Personel_ID AND HP.Travaille_de_Jour=P.Travaille_de_Jour) OR (HP.ID=P.ID))
SELECT @PostCount=COUNT(*) FROM History2_Presence
IF @PreCount<>@PostCount
BEGIN
SET @DiffCount = @PostCount-@PreCount
SET @xdoc.modify('
insert <Table Name="History2_Presence" RecordAdded="{ sql:variable("@DiffCount") }"/> as last into /Inserted_Records[1]
')
END
IF @Testing=0
BEGIN
PRINT 'DELETE FROM Presence'
EXEC sp_SetPostingProperties 'Presence',@ModifierID,@Comment
SELECT @PreCount=COUNT(*) FROM Presence
DELETE FROM Presence FROM Presence P
INNER JOIN Personel As Ps ON P.Personel_ID=Ps.ID
WHERE P.Date_de_Presence=@PostDate AND Ps.Category_Department_ID=@Department AND Ps.Category_Division_ID=@Division
AND EXISTS
(SELECT HP.ID FROM History2_Presence HP
WHERE (HP.Date_de_Presence=@PostDate AND HP.Personel_ID=P.Personel_ID AND HP.Travaille_de_Jour=P.Travaille_de_Jour) OR (HP.ID=P.ID))
SELECT @PostCount=COUNT(*) FROM Presence
IF @PreCount<>@PostCount
BEGIN
SET @DiffCount = @PreCount-@PostCount
SET @XDoc2.modify('
insert <Table Name="Presence" RecordDeleted="{ sql:variable("@DiffCount") }"/> as last into /Deleted_Records[1]
')
END
END
COMMIT TRANSACTION
END
View 1 Replies
View Related