Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to delete folder

Status
Not open for further replies.

compuveg

IS-IT--Management
Dec 3, 2001
307
US
We've got a web app here that used reporting services. Their programmers have coded every report that runs to create a new report in a temp_reports folder. They never come back and delete these.

I've got 30,000 reports in that temp folder now, and ~12GB tied up in them. You can imagine I would like to delete them.

In report manager I can't even display the contents of that folder, it times out. I've setup a different temp folder that I'm manually cleaning up daily. I want to delete the old folder.

I open report manager, to the folder that temp folder is in, and view details. Then I select the folder and delete it. The system spins for 2 minutes, then reports the following error...

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> 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.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected) at System.Data.SqlClient.TdsParserStateObject.ReadBuffer() at System.Data.SqlClient.TdsParserStateObject.ReadByte() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Library.DBInterface.DeleteObject(String objectName) at Microsoft.ReportingServices.Library.DeleteItemAction.PerformActionNow() at Microsoft.ReportingServices.Library.DeleteItemAction.PerformActionInBatch(CallParameters parameters) at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId) at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.ExecuteBatch() at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch() --- End of inner exception stack trace ---

I would prefer to know the setting that will adjust this 2 minute timeout to be longer. No settings in any of the .config files I've found will do this.

I only know there's 30,000 files in there by selecting count(*) from catalog where path = 'temp_reports'. I would like to delete them the same way, but am VERY hesitant to just go whacking rows from my report server DB. It at least works now, if not slowly. :)

Is there a function that can be scripted to delete these? I've seen indications that I might have to use rs.exe and writeup a vb.net script to drop the offending reports. (which would be not so bad, because I could then script daily deletion of these)

Anyone, anyone? :) Thanks, in advance!
 
This is just a guess so take it with a grain of salt. It sounds like the temp files are "in use." In order to truly delete them, I'd think you'd have to shut the Report server/asp.net/IIS down to "free" them? Hopefully this puts you on the right track. Sorry!
Brett

--------------------------
Web/.net Programmer & DBA
Central PA
 
After thinking about it, I'd have to think you do not have access to these reports (which is why you can't see them). You apparently do have access to the folder though. My thought is that it won't delete the folder since it isn't empty and you can't delete them (no access) anyway.

Once you get access to them, you should be able to delete them (log on as an admin?) Otherwise, I'd think you would have to delete them by hand off of the database. I'm not sure on the 2 minute timer, but that's usually found in IIS.

Hope that helps!
Brett

--------------------------
Web/.net Programmer & DBA
Central PA
 
Well, in the new temp folder, I can delete files without a problem. I can delete the whole folder, too. The problem seems to be that there's vb.net code that's being run by the webserver, and that code isn't getting back to IIS in time, so IIS gives up.

I know there's a RS.exe program that can be used to programatically generate reports, etc., but I've been unable to find code on how to delete reports using that interface. I believe that application behind report manager is this rs.exe, and it is just running dynamically generated scripts. That rs.exe is probably what's not getting back to the app pool in time, but it is hard to tell.

I know IIS's timers aren't set at 2 minute timeouts because I have reports that regularly run longer than 4 minutes.

Oh well, thanks for the stab at the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top