3709-The Connection Cannot Be Used To Perform This Operation. It Is Either Closed Or Invalid In This Context
Feb 10, 2008
We have a nagging issue here in our application side, which I was trying to troubleshoot and reach no where. Can I have your valuable inputs for resolving/understanding the root cause of the issue?
3709-The connection cannot be used to perform this operation. It is either closed or invalid in this context
This error is not coming regularly (twice it happened and after the program is running successfully with out any problem). Problem having exe is running every 2 minutes interval.
Most of the sites saying this is something related to code written in the application but if that is the case why this error is not happening continuously? The problem having exe is running past 4 months with 2 minutes interval and suddenly thrown this error.
I found one MS site describing about this error but not able to find any fixes for this issue (http://support.microsoft.com/kb/839428). We are on the process of upgrading the operating system with SP2; will this help us to resolve this issue? Please advice.
Details
1. Windows 2003 with SP1
2. MDAC 2.8
3. SQL 2005 with SP1
4. VB Application.
View 1 Replies
ADVERTISEMENT
Aug 7, 2007
I have this stored procedure on SQL 2005:
USE [Eventlog]
GO
/****** Object: StoredProcedure [dbo].[SelectCustomerSoftwareLicenses] Script Date: 08/07/2007 16:56:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SelectCustomerSoftwareLicenses]
(
@CustomerID char(8)
)
AS
BEGIN
DECLARE @Temp TABLE (SoftwareID int)
INSERT INTO @Temp
SELECT SoftwareID FROM Workstations
JOIN WorkstationSoftware ON Workstations.WorkstationID = WorkstationSoftware.WorkstationID
WHERE Workstations.CustomerID = @CustomerID
UNION ALL
SELECT SoftwareID FROM Notebooks
JOIN NotebookSoftware ON Notebooks.NotebookID = NotebookSoftware.NotebookID
WHERE Notebooks.CustomerID = @CustomerID
UNION ALL
SELECT SoftwareID FROM Machines
JOIN MachinesSoftware ON Machines.MachineID = MachinesSoftware.MachineID
WHERE Machines.CustomerID = @CustomerID
DECLARE @SoftwareInstalls TABLE (rowid int identity(1,1), SoftwareID int, Installs int)
INSERT INTO @SoftwareInstalls
SELECT SoftwareID, COUNT(*) AS Installs FROM @Temp
GROUP BY SoftwareID
DECLARE @rowid int
SET @rowid = (SELECT COUNT(*) FROM @SoftwareInstalls)
WHILE @rowid > 0 BEGIN
UPDATE SoftwareLicenses
SET Installs = (SELECT Installs FROM @SoftwareInstalls WHERE rowid = @rowid)
WHERE SoftwareID = (SELECT SoftwareID FROM @SoftwareInstalls WHERE rowid = @rowid)
DELETE FROM @SoftwareInstalls
WHERE rowid = @rowid
SET @rowid = (SELECT COUNT(*) FROM @SoftwareInstalls)
END
SELECT SoftwareLicenses.SoftwareID, Software.Software, SoftwareLicenses.Licenses, SoftwareLicenses.Installs FROM SoftwareLicenses
JOIN Software ON SoftwareLicenses.SoftwareID = Software.SoftwareID
WHERE SoftwareLicenses.CustomerID = @CustomerID
ORDER BY Software.Software
END
When i execute it in a Query in SQL Studio it works fine, but when i execute it from an ASP page, i get following error:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/administration/licenses_edit.asp, line 56
Here the conection:
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.ConnectionTimeout = Session("ConnectionTimeout")
OBJdbConnection.CommandTimeout = Session("CommandTimeout")
OBJdbConnection.Open Session("ConnectionString")
Set SQLStmt = Server.CreateObject("ADODB.Command")
Set RS = Server.CreateObject("ADODB.Recordset")
SQLStmt.CommandText = "EXECUTE SelectCustomerSoftwareLicenses '" & Request("CustomerID") & "'"
SQLStmt.CommandType = 1
Set SQLStmt.ActiveConnection = OBJdbConnection
RS.Open SQLStmt
RS.Close
Can anyone help please?
It this because of the variable tables?
View 7 Replies
View Related
Jan 18, 2003
I have a sp that creates a #temp table and performs a bulk insert.
CREATE TABLE #template (template varchar(8000))
EXEC ('bulk INSERT #template FROM "' + @filename + '"')
SET @html = (SELECT template FROM #template)
DROP TABLE #template
...
When I access this sp with any other user than 'sa' I get this error message:
The current user is not the database or object owner of table '#template'. Cannot perform SET operation.
I've been everywhere (with no success) in the sql srv admin to look for the appropriate check box to allow another named user to access this sp.
Can anyone help?
View 2 Replies
View Related
Apr 14, 2008
IDENTITY_INSERT is already ON for table 'Elbalazo.dbo.DeliveryOption'. Cannot perform SET operation for table 'City'
Here's my entire script:
--------------------------------------------------------------------
/*Disable Constraints & Triggers*/
exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL'
/*Perform delete operation on all table for cleanup*/
exec sp_MSforeachtable 'DELETE ?'
/*Enable Constraints & Triggers again*/
--exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL'
/*Reset Identity on tables with identity column*/
exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID(''?''), ''TableHasIdentity'') = 1 BEGIN DBCC CHECKIDENT (''?'',RESEED,0) END'
-- City
SET IDENTITY_INSERT City ON
INSERT INTO Elbalazo.dbo.City (
[CityID]
,[CityName]
,[CountyID]
,[Active])
SELECT [CityID],[CityName],[CountyID],1
FROM [ElbalazoProduction].dbo.tbl_City
SET IDENTITY_INSERT City OFF
-- State
SET IDENTITY_INSERT [State] ON
INSERT INTO Elbalazo.dbo.State (
[StateID]
,[State]
,[Active])
SELECT [StateID],[State],1
FROM [ElbalazoProduction].dbo.tbl_State
SET IDENTITY_INSERT [State] OFF
-- NumberOfPeopleOption
SET IDENTITY_INSERT NumberOfPeopleOption ON
INSERT INTO [Elbalazo].[dbo].[NumberOfPeopleOption]
([NumberOfPeopleOptionID]
,[NumberOfPeopleNameOption]
,[Active])
SELECT [NumberOfPeopleID], [NumberOfPeopleName],1
FROM [ElbalazoProduction].dbo.tbl_NumberOfPeople
SET IDENTITY_INSERT NumberOfPeopleOption OFF
-- DeliveryOption
SET IDENTITY_INSERT DeliveryOption ON
INSERT INTO [Elbalazo].[dbo].[DeliveryOption]
([DeliveryOptionID]
,[DeliveryOptionName]
,[Active])
SELECT [DeliveryOptionID], [DeliveryOptionName],1
FROM [ElbalazoProduction].dbo.tbl_DeliveryOption
SET IDENTITY_INSERT DeliveryOption OFF
-- User
SET IDENTITY_INSERT [User] ON
INSERT INTO [Elbalazo].[dbo].[User]
([UserID]
,[FirstName]
,[LastName]
,[Address1]
,[Address2]
,[CityID]
,[StateID]
,[Zip]
,[PhoneAreaCode]
,[PhonePrefix]
,[PhoneSuffix]
,[Email]
,[CreateDate]
,[Active])
SELECT [CustomerID]
,[FirstName]
,[LastName]
,[AddressLine1]
,NULL
,[CityID]
,[StateID]
,[Zip]
,[PhoneAreaCode]
,[PhonePrefix]
,[PhoneSuffix]
,[EmailPrefix] + '@' + [EmailSuffix]
,[CreateDate]
,1
FROM [ElbalazoProduction].dbo.tbl_Customer
SET IDENTITY_INSERT [User] OFF
-- EntreeOption
SET IDENTITY_INSERT EntreeOption ON
INSERT INTO [Elbalazo].[dbo].[EntreeOption]
([EntreeOptionID]
,[EntreeOptionName]
,[Active])
SELECT [EntreeOptionID]
,[EntreeOptionName]
,1
FROM [ElbalazoProduction].dbo.tbl_EntreeOption
SET IDENTITY_INSERT EntreeOption OFF
-- CateringOrder
SET IDENTITY_INSERT CateringOrder ON
INSERT INTO [Elbalazo].[dbo].[CateringOrder]
([CateringOrderID]
,[UserID]
,[NumberOfPeopleID]
,[BeanOptionID]
,[TortillaOptionID]
,[CreateDate]
,[Notes]
,[EventDate]
,[DeliveryOptionID])
SELECT [CateringOrderID]
,[CustomerID]
,[NumberOfPeopleID]
,[BeanOptionID]
,[TortillaOptionID]
,[CreateDate]
,[Notes]
,[EventDate]
,[DeliveryOptionID]
FROM [ElbalazoProduction].dbo.tbl_CateringOrder
SET IDENTITY_INSERT CateringOrder OFF
-- CateringOrder_EntreeItem
SET IDENTITY_INSERT CateringOrderEntreeItem ON
INSERT INTO [Elbalazo].[dbo].[CateringOrderEntreeItem]
([CateringOrderEntreeItemID]
,[CateringOrderID]
,[EntreeItemID])
SELECT [CateringORder_EntreeItemID]
,[CateringOrderID]
,[EntreeItemID]
FROM [ElbalazoProduction].dbo.tbl_CateringOrder_EntreeItem
SET IDENTITY_INSERT CateringOrderEntreeItem OFF
select * from BeanOption
select * from CateringItemIncluded
select * from CateringOrder
select * from CateringOrderEntreeItem
select * from CateringOrderEntrees
select * from City
select * from Country
select * from DeliveryOption
select * from EntreeOption
select * from NumberOfPeopleOption
select * from [State]
select * from [User]
View 15 Replies
View Related
Jan 11, 2007
Hi all,
can anyone tell where this error is popping up im my SQL because i can't see why i am getting this error.
Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bksb_Diag_ESOL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bksb_Diag_ESOL]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bksb_Diag_StuDetails]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bksb_Diag_StuDetails]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bksb_StuRecs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bksb_StuRecs]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bskb_Diag_Assessments]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bskb_Diag_Assessments]
GO
CREATE TABLE [dbo].[bksb_Diag_ESOL] (
[Stu Ref No] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[English First Lang] [nvarchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Other Lang Work] [nvarchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Other Lang Home] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Other Lang Friends] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[bksb_Diag_StuDetails] (
[Stu Ref No] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Group Ref No] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[First Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Last Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Dob] [smalldatetime] NULL ,
[Maths] [nvarchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[English] [nvarchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[bksb_StuRecs] (
[StuRefNo] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LastName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[bskb_Diag_Assessments] (
[Stu Ref No] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Assessment] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Section Name] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Curric] [nvarchar] (36) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Total Score] [decimal](18, 0) NULL ,
[Out Of] [decimal](18, 0) NULL ,
[Answers] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Date] [smalldatetime] NULL
) ON [PRIMARY]
GO
Regards
Liam
View 4 Replies
View Related
Dec 21, 2004
never seen this before, but I keep getting an error > "Operationg is not allowed while the object is closed" I thought maybe I was getting this due to an error in my stored procedure, however the procedure runs fine. Could this be an error in my procedure that it's just not catching? Or is it more likely to be in my VB code? Anyone know in general why this happens? Thanks.
View 1 Replies
View Related
Sep 7, 2007
Wait, please don't ignore this one ... I've already tried all the obvious stuff.
I am currently on a contract assignment, and so cannot post the exact code (at least not at this time), but I should be able to layout the problem enough anyway.
I have a section of code that hits a remote database (same network, same subnet, but different city than the primary SQL database) to retrieve information logged by a digital phone system for display on an intranet screen.
The code is your typical recordset iteration, and looks basically like this.
Note: the connection is created and opened inside the PhoneCenter class. SQL statement used has been verified correct in SQL Server Management Studio.
<snip>
....
Dim rs as adodb.recordset = objPhoneCenter.Conn.execute(SQL)
If rs.recordcount > 0 then
while not rs.eof
.... Data processed here
rs.MoveNext
end while
end if
....
</snip>
This code runs flawlessly, every time, on the development platform but fails at "rs.MoveNext" when pushed out to the production server. What mystifies me is that the "Operation is not allowed when the object is closed" should not occur on code inside an rs.eof test, since the recordset must be open and have data in order to enter such a block.
This is, however, exactly what is happening. In 7 years working with SQL Server and ADO, I've never seen anything quite like this. Does anyone have any insight into what might be going on here?
P.S. I am in the process of attempting to gather more detailed information about this error, which I will post as it arrives if needed. At the moment, the above message is all I have to go on.
View 2 Replies
View Related
Jul 20, 2005
I am trying to use Bulk Insert for a user that is not sysadmin.I have already set up the user as a member of "bulkadmin".When I run the following script:DECLARE @SQLVARCHAR(1000)CREATE TABLE amdbo.#temp ([id] [varchar] (10) NULL,[fld2] [varchar] (10) NULL,[fld3] [varchar] (10) NULL)set @SQL ='BULK INSERT amdbo.#tempFROM ''F: est.txt''WITH (DATAFILETYPE = ''char'', FIELDTERMINATOR = ''|'', ROWTERMINATOR= '''')'EXEC (@SQL)select * from #tempI still get the message ...Server: Msg 8104, Level 16, State 2, Line 1The current user is not the database or object owner of table '#temp'.Cannot perform SET operation.Anyone have an idea what I am doing wrong?Drew.
View 3 Replies
View Related
Apr 29, 2015
I have scenario in which I am getting a row from XLS and in that ro I have data for multiple tables based on if one table has some data or not
EXAMPLE :
Search a table in database on basis of column in the xls row
STEP #1 If TABLE A has that row then do nothing and move to next step else insert new row into TABLE A and move to next step
STEP #2 If TABLE B has that row then do nothing and move to next step else insert new row into TABLE B and move to next step
STEP #3 If TABLE C has that row then do nothing and move to next step else insert new row into TABLE C and move to next step
STEP #4 If TABLE D has that row then do nothing and move to next step else insert new row into TABLE D and move to next step
STEP #5 If TABLE E has that row then do nothing else insert new row into TABLE E
Currently I am trying to achieve this by using multicast and from that multicast putting inputs into 5 OLE DB DESTINATION but by doing this some time one step execute earlier then previous and integrity constrain violated so getting error.
View 5 Replies
View Related
Sep 29, 2009
I'm trying to install SQL Server 2008 on a virtual machine with Windows 2008 R2. Setup fails with the error "Attempted to perform an unauthorized operation". Looking at the installation log, I see these details:
2009-09-29 08:24:49 SQLBrowser: sRegLocation = 'SOFTWAREMicrosoftMicrosoft SQL Server', regView = 'Wow6432', sSddl = '(A;CI;KR;;;[SQLServer2005SQLBrowserUser$ITISFIM])', bOptional = 'False'.
2009-09-29 08:24:49 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
[code]....
View 35 Replies
View Related
Jul 23, 2005
Aaaaaarrgghh ! (that's better)I am trying to convert a field within my Oracle 9i Database that is oftype BLOB (but this BLOB may contain a combination of clobs/varchars orimages such as gif images, jpg images) to Microsoft SQL Server 2000using Microsoft DTS.On trying to perform this simple conversion I recieved the error "Needto run the object to perform the operation - Exception AccessViolation" from Microsoft DTS and my table that contains this BLOBfield is not converted across.After further investigation I implemented the fixes suggested by theMicrosoft Knowledge Base and "sqldts.com" but still no joy the errorkept occuring.I discovered my modifying the step in the DTS package that handled thistable conversion that contained the BLOB column that when I changed thedata type on my SQL Server target table to VARBINARY and modified thequery so that only the BLOBs that contained clobs/varchars were broughtacross that the error went away.I then proceeded to create another DTS package step that had a querythat only brought across the BLOB column that contained images such asgif images/jpeg images etc. and the error went away and the target typefor the SQL Server target table was set to IMAGE.As the data for this BLOB contains a combination of VARCHARS/CLOBS(concatanted) and also GIF IMAGES/JPEGS in the same source column withOracle 9i I require the same in my target table within SQL server asone column (and I should be able to do that with type IMAGE especiallyas it can store larger objects than VARBINARY but any source BLOBS thatcontain VARCHAR/CLOBs don't seem to want to be loaded as IMAGE theywill only load in to VARBINARY).However judging by my experiences above this doesn't seem to bepossible ?Can anyone help me out with this ?I am on Microsoft SQL Server 2000 Service Pack 4 with latest MDAC(2.8.1).Cheers,Gary
View 1 Replies
View Related
Sep 18, 2015
I am getting an error about "Cannot perform a shrinkfile operation inside a user transaction", but I don't have a shrinkfile command in my procedure. Â Does SQL hang on to that command if it was received earlier in a different procedure?
View 5 Replies
View Related
Oct 25, 2015
I have an SSIS package, that move file from one folder (Download) to another folder (Working), where it will be processed and passed to (Processed) folder. The folder (Working) is created at run time and deleted after finishing process. I ran this package using SQL Server Agent (I created a sql job). My problem is that the package fails to move the file from Download to Working, Although it can move it to other folders (say I skipped Working and move it directly to the already-created folder "Processed").
I traced the problem and found the error "Access is denied", when run the package without Agent (double click). I provided the necessary permissions to all levels of folders to the user XX, which I made it the (SQL Server Agent Service Account) as well as the Job Owner. By this, the package executes successfully (again by double clicking it), but with Agent it FAILS.
Why Agent cannot move the file to the run-time-created folder (Working) ?
View 3 Replies
View Related
Apr 14, 2015
having on mind that this is my Target server: what is the way of creating shared folder in order to perform operation from the title (and, of course, to continue with installation of packages etc...)? SQL SERVER 2008 R2
View 26 Replies
View Related
Aug 11, 2007
I was going to post a long message but I found the problem. Yet I do not know how to correct it efficiently.I have a request to my DB using that kind of code : With SQL_Commande valiSqlConnection(True) ' Configure SQL_Commande. .Connection = SQL_Connection .CommandText = "_Fonctions_valiUtilInfo" .CommandType = Data.CommandType.StoredProcedure .Parameters.Clear() Dim SQL_Lecteur As SqlDataReader = SQL_Commande.ExecuteReader If SQL_Lecteur.Read And Not IsDBNull(SQL_Lecteur(0)) Then Return SQL_Lecteur(0) Else Return Nothing valiSqlConnection(False, SQL_Lecteur) End WithMy problem is that I need use a function within the "With" section, and that function calls a request on the DB then closes the query, and when it gets back at executing the remaining part of the code, it stop saying that the query is closed and cannot be excuted anymore. How can I nest a query within an other one without having this problem?
View 2 Replies
View Related
Jun 6, 2006
I am getting this exception sporadically in a certain block of code (it usually works):
"System.InvalidOperationException: Invalid attempt to MetaData when reader is closed"The code is below:
cmd.CommandText = "[dbo].CountryGetList";
cmd.CommandType = CommandType.StoredProcedure;
IDataReader rdr = cmd.ExecuteReader();
List countries = new List();
...
while (rdr.Read())
{
//do stuff
CountryID = (Guid)rdr["CountryID"]; //blows up on the next line cty.Name = (string)rdr["Name"]; } }
rdr.Close();
Any ideas!?
View 1 Replies
View Related
Dec 13, 2007
Since installing Reporting Services on my machine, I have been getting an error whenever I try to execute a reader.read line.
When I ran the same exact code on another machine using someone else's credentials who did not have Reporting Services it ran fine. When I tried to run it on someone else's machine who did not have Reporting Services using my own credentials, I got the same error. Also, when the person who's pc and credentials worked fine on his machine ran the same code back on my machine using his own credentials, he got the same error. When another person who also had Reporting Services tried to run it on his own pc, he got the error as well.
When the reader is first executed (MyDataReader = sSql.ExecuteReader) these were the property values:
depth = 0
fieldcount = 5
hasrows = true
isclosed = false
Item = In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.
recordsaffected = -1 (even though there are records)
VisibleFieldCount = 5
When the reader is loaded into a table (MyTable.Load(MyDataReader)) then the property values changed to:
Depth = {"Invalid attempt to Depth when reader is closed."}
FieldCount = {"Invalid attempt to Depth when reader is closed."}
HasRows = {"Invalid attempt to Depth when reader is closed."}
IsClosed= True
Item = In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.
RecordsAffect = -1
VisibleFieldCount = {"Invalid attempt to Depth when reader is closed."}
And when I execute the the following code:
dtReader = MyTable.CreateDataReader()
While (dtReader.Read())
I get this error:
"DataTableReader is Invalid for Current DataTable"
Since the code works with someone else's credentials on a machine that does not have SSRS, and the same problem happens for me regardless of what machine I am on as long as I am using my own credentials what could be causing my problem?
View 1 Replies
View Related
Oct 20, 2015
Let's say if the date is 01/01/2015 till 01/01/2016
I want split these dates monthly format wise and then use them in variable in cursors to loop
For an example Monthly date should be 01/01/2015 and 01/31/2015 and use these two values in 2 variables and make a loop until it never ends whole date range which is 01/01/2016
View 2 Replies
View Related
Sep 25, 2006
I get the following error when generating a report. I use the "render" method in an asp.net page. I have also seen Timeout errors, which is the second error listed below.
Configuration
db-SQL Server 2000 on clustered windows 2003 server SP1, 5.5 GB RAM
SSRS 2005 and IIS 6.0 on 2nd windows 2003 server SP1, 3.75 GB RAM
generating SSRS Report using asp.net
Error is on large amounts of data, main source table has 11.2 Million records. The stored procedure returns
507,387 rows in approx. 25 minutes.
No problem with smaller amounts of data using the same source of 11.2 million records, but returning
much less.
Error 1: (from try/catch on render method)
System.Web.Services.Protocols.SoapException: An error has occurred during report processing. ---> An error has occurred during report processing. ---> An error has occurred during report processing. ---> The Group expression used in grouping €˜territory€™ references a data set field which contains an error: System.InvalidOperationException: Invalid attempt to MetaData when reader is closed. at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) at Microsoft.ReportingServices.DataExtensions.DataReaderWrapper.GetValue(Int32 fieldIndex) at Microsoft.ReportingServices.DataExtensions.MappingDataReader.GetFieldValue(Int32 aliasIndex) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at rptsvc.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) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesswisherreports842e8e9d5ff5a831App_WebReferences.no0lpcgz.0.cs:line 1706 at ar_sum_aging.btnGenRpt_Click(Object sender, EventArgs e) in U:Visual Studio 2005ProjectsSwisherReportsar_sum_aging.aspx.vb:line 32
Error 2: (from ReportServer error log)
w3wp!processing!1!9/25/2006-18:32:53:: e ERROR: An exception has occurred in data source 'ar_sp'. Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.GetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassGetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPass()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
w3wp!processing!1!9/25/2006-18:32:53:: i INFO: Merge abort handler called for ID=-1. Aborting data sources ...
w3wp!processing!1!9/25/2006-18:32:53:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.GetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassGetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPass()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
--- End of inner exception stack trace ---
w3wp!processing!1!9/25/2006-18:32:53:: w WARN: Data source 'AR': Report processing has been aborted.
w3wp!processing!1!9/25/2006-18:32:53:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.GetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.FirstPassGetNextDetailRow()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPass()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.FirstPassProcess(Boolean& closeConnWhenFinish)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeReportDataSetNode.Process()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.ProcessConcurrent(Object threadSet)
--- End of inner exception stack trace ---
w3wp!library!1!09/25/2006-18:32:58:: e ERROR: Found System.OutOfMemoryException exception: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
w3wp!library!1!09/25/2006-18:32:58:: e ERROR: Terminating worker process
View 1 Replies
View Related
Apr 26, 2007
I am accessing SQL2005 with C# code using OleDbConnection.
A try and catch block catches the following error once a while between the Open() and Close() of the connection:
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
I do not even have any idea where to start to debug this. The ExecuteNonQuery() runs a delete SQL query. It works 99.9% of the time. I do not see anything wrong when this error happens.
Any hint would be greatly appreciated.
View 9 Replies
View Related
Jan 27, 2007
I have the Function, that fires from onLoad even of one of the asp:Label controls on my main page.
Here is it's code:
SqlConnection conn = new SqlConnection(); conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["UkraineConnectionString"].ToString(); SqlCommand comm = new SqlCommand("SELECT [Greeting] FROM [Misc]", conn);
try { conn.Open(); } catch { Response.Write("Error opening connection in Page_Load of default.aspx to retrieve the greetings"); }
string MyGreet = (string)comm.ExecuteScalar();
Greetings.Text = MyGreet;
try { conn.Close(); } catch { Response.Write("Error closing connection in Page_Load of default.aspx after retrieving the greetings"); } }
When it gests to conn.Open() in the debugging mode I see that the ServerVersion = 'conn.ServerVersion' threw an exception of type 'System.InvalidOperationException'.
The most interesting thing is that it used to work before.
Here is the connection string it retrieves fine.
"Data Source=MDM1;AttachDbFilename=|DataDirectory|Ukraine.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"
As I said it used to work, but one day I tried to access the web site and it said this error that I get, that the connection is closed. Then I was using the SQL Server Express. When in the Visual studio if I would run this same site in debug, everything was working fine. I decided to uninstall the SQL Express and installed the SQL Server.
If I open the SQL Server Managment Studio in the Server name field I see MDM1(this is the name of the PC, but probably it is the same name for the Server. Well, in the MAnagment Studio it conects fine to the MDM1 so it is no probably the naming problem. Ithink it has something to do with permisssions.
If someon can - please help. Thanks.
View 3 Replies
View Related
Jan 13, 2000
That is an app ACCESS 2000 wih Named Pipe ODBC to SQL Server 6.5.
After 10 minutes without use this app, the connection closed !
Have-you idea for correct this probleme ?
Regards
Alain
View 2 Replies
View Related
Jun 30, 2015
The application server gets below error while the job is being run intermittently:
An error occurred while performing connection management
com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(SQLServerConnection.java:1839)
[Code] ....
There is no error reported in SQL logs.
View 6 Replies
View Related
Dec 7, 2007
I am using MS JDBC driver 2005 1.2 and in-house written connection pooling that was working fine for a number of years. This combination worked OK with SQLserver 2000. But recently we switched to SQLServer 2005 (x64) on WIN Server 2003 Standard x64 eddition. Everything seems work OK during business hours, however, after business hours when there are lesser users and connection stays idle for sometime, I am getting the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.setAutoCommit(Unknown Source)
at com.nms.serverframework.dbaccess.OnlineTransactionManager.freeConnection(OnlineTransactionManager.java:420)
at com.nms.serverframework.dbaccess.OnlineTransactionManager.releaseConnection(OnlineTransactionManager.java:707)
at com.nms.serverframework.dbaccess.OnlineTransactionManager.releaseConnection(OnlineTransactionManager.java:688)
at com.nms.serverframework.dbaccess.OnlineTransactionManager.finalize(OnlineTransactionManager.java:399)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
Any help would be appreciated
thanks in advance
View 6 Replies
View Related
Jun 11, 2007
Hello,
While doing performance testing on a Tomcat based web application using the v1.1 JDBC driver connecting to SQL Server 2005, the tomcat server has been throwing the above exception at a fairly low rate. I have seen some related issues in the forums with v1.1 of the MS JDBC driver, but those were asking about connection reset related errors. In this case the 'invalid packet header' exception is consistently seen. I am in the process of repeating the test with some additional application side logging turned on, and have tried enabling FINEST level logging for the driver, but that leaves me with a 500MB log file and so far no instances of that exception in question being thrown. This is not unusual, the error has only been seen about 14 times in about 20 tests, with each test running about an hour and a half.
A few quick tests with the 1.2 driver did not throw this exception, but did throw a high number of '[Connection|Statement|Resultset] Closed'
While I gather more information, I was wondering if there is anything significant in this particular exception type that could point to a more specific set of tests I could run?
The exceptions seen so far:
Exception #1:
java.lang.NullPointerException
at com.microsoft.sqlserver.jdbc.DBComms.receive(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.receive(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.doCloseServerCursor(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement$CloseServerCursorRequest.execute(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.closeServerCursor(Unknown
Source)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.close(Unknown
Source)
at com.X.db.CSInternalDB.close(CSInternalDB.java:950)
at com.X.db.CSQuery.close(CSQuery.java:169)
at
com.X.container.ContainerManager.getFolderContent(ContainerManager.java:1313)
at
com.X.container.ContainerCommands.getContent(ContainerCommands.java:1086)
at
com.X.container.ContainerCommands.execCommand(ContainerCommands.java:192)
at
com.X.BaseHandler.getObjectFromDoc(BaseHandler.java:169)
at com.X.BaseHandler.processDOM(BaseHandler.java:284)
at com.X.Dispatcher.execIt(Dispatcher.java:546)
at com.X.Dispatcher.execCommand(Dispatcher.java:333)
at
com.X.BaseHandler.getObjectFromDoc(BaseHandler.java:169)
at com.X.X.execute(X.java:600)
at com.X.HttpReceiver.doRequest(HttpReceiver.java:275)
at com.X.HttpReceiver.doGet(HttpReceiver.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
#2:
java.sql.SQLException: The DBComms.receive operation resulted in an invalid
packet header type:-86. PktNum:0. nReceived:8.
at
com.X.db.CSPreparedStatement.executeQuery(CSPreparedStatement.java:474)
at com.X.db.CSAnalyzer.executeQuery(CSAnalyzer.java:485)
at com.X.db.CSQuery.sqlPrepareExecute(CSQuery.java:559)
at
com.X.form.FormManager.getInternalFormProps(FormManager.java:1803)
at
com.X.form.FormManager.getInternalFormProps(FormManager.java:1762)
at
com.X.route.RoutingCommands.genericPrepareRoutingPage(RoutingCommands.java:5618)
at
com.X.route.RoutingCommands.prepareRoutingPage(RoutingCommands.java:3899)
at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.X.iplugin.DynamicCommandMethod.execute(DynamicCommandMethod.java:35)
at
com.X.route.RoutingCommands.execCommand(RoutingCommands.java:209)
at
com.X.BaseHandler.getObjectFromDoc(BaseHandler.java:169)
at com.X.BaseHandler.processDOM(BaseHandler.java:284)
at com.X.Dispatcher.execIt(Dispatcher.java:546)
at com.X.Dispatcher.execCommand(Dispatcher.java:333)
at
com.X.BaseHandler.getObjectFromDoc(BaseHandler.java:169)
at com.X.X.execute(X.java:600)
at com.X.HttpReceiver.doRequest(HttpReceiver.java:275)
at com.X.HttpReceiver.doGet(HttpReceiver.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
View 3 Replies
View Related
Jan 21, 2008
Our system administrators have renamed the server that our Reporting Service 2000 runs on. The database that RS2000 uses is on the same server.
Now when I navigate to the Report Manager, the following error appears:
The underlying connection was closed: The remote name could not be resolved
Obviously I need to tell Reporting Services 2000 the name of the new server (even though it's just the same server??). Where do I do that?
View 1 Replies
View Related
Sep 26, 2007
hye everyone,
i have problem .
when i deploy the report, its failed and the error mesage :
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. d:
ptdemoClaimOTReport.rdl
any suggestion or idea
thank in advance
View 3 Replies
View Related
Aug 11, 2005
Dear members,I'am thinking about the "best" way to connect to my sql-server viaADO.Net (if there is a best way).My application uses the sql-server very intensively. At the momentevery database-operation opens a connection, executes and then closesthe connection.Another way would be to use only a single connection to the database,which is opened when the application starts.What do you think is the better way to get a high performing sqlserver: using one single application connection vs. using oneconnection for every operation?Cheers, Sebastian
View 2 Replies
View Related
Jun 26, 2007
Hi all
I have run a stranger issue:
I use ADO.NET 2.0 to access sql2000 database. during the whole process, I need stop sql server service which the program is connecting. my setup is like following:
1.Open a conection to access table and then close the connection;
2.restart sql server service ;
3.Re-open a connection to access table and then an exception was thrown out:
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed bythe remote host.)
4. try re-open a connection to access table and then no exception was thrown out.
I think this maybe related with connection pool. any guy know the detail, please give me a response. Thank you very much!
View 2 Replies
View Related
Aug 21, 2007
Hi experts,
I have sql express installed on my machine and i'm using visual studio to create database files. After i've build a connection to my database file thru Server Explorer (choose Add attach files) i opened Management Studio Express and found that the new database has been attached to sqlexpress database engine----technically speaking it's under the user instance which i use to run my visual studio. right?? that's totally fine.My question is, after i'v closed the connection in visual studio, that attached database file still exist.I want it to be detached immediately after i've closed the connection in visual studio.How can i do that?
I've searched through internet and was told that sp_config can solve this problem by setting the user instance time out. I ran sp_config against my database but did not find that item. Could anybody give me some directions? thanks in advance.
View 2 Replies
View Related
Feb 13, 2006
Hi,
I'm running a website using MSSQL 2000. Sometimes (not always) I get this error message on the website:
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I have also websites running with MySQL and those don't have this problem.I searched google but I couldn't find usefull information on this problem.
Someone who knows what's going on here ?
View 1 Replies
View Related
Nov 20, 2007
Help.
Today while trying to get the Windows NT security working i upgraded my reporting services IIS server to a domain controller and it screwed up all of my settings. First it changed password for ASPNET user and so I reinstalled .net framework.
Now i get the
The underlying connection was closed: Could not establish secure channel for SSL/TLS.
error message.
I do not want to use an SSL certificate for I do not have one right now. How can I configure my SQL Server 2000 Reporting services to not use SSL. I see they added something to SQL Reporting Services 2005 in the configuration tools but I cant find out how to modify the config files with SQL 2000 RS to eliminate the SSL.
Please help, my company is down waiting for me to get this back up.
Thanks a ton,
deep
View 3 Replies
View Related
Jul 22, 2005
I am getting this error in Enterprise Manager:
TCP Provider: An existing connection was forcibly closed by the remote host.
But, my web app can still connect just fine to the db, so it's still in
the same place with the same login/password. And my registration
in EM was working just fine (for years) until yesterday I got this
error. I've tried deleting the registration and re-creating it
but the same thing. What could have gone wrong to cause this to
happen?
Thanks for any pointers, I have no idea where to start looking on this one, the host says they haven't changed anything...
View 1 Replies
View Related