Temp files not clearing
nephtali
Posts: 4
Hello:
We are using the SQL Toolkit to script SQL Data Compare. The problem we are having is that after a couple of days we start to run low on disk space. The process is not failing or giving us any errors on the reports.
We are using the Windows Task Scheduler to run it under a user profile.
Let me know what could be the problem here.
We are using the SQL Toolkit to script SQL Data Compare. The problem we are having is that after a couple of days we start to run low on disk space. The process is not failing or giving us any errors on the reports.
We are using the Windows Task Scheduler to run it under a user profile.
Let me know what could be the problem here.
Comments
Have you written the Toolkit application yourself or are you using the pre-built command-line tools?
In your SQL Toolkit code, you'll want to make sure that you dispose all objects that have a Dispose() method attached. Particularly ComparisonSession. Calling Dispose() will clean up any temporary files allocated by the data comparison.
There could be potential problems with data comparisons that error out. I believe in some circumstances they do not clean up after themselves. This was a bug in previous Toolkit implementations, so you may want to try updating your RedGate.SQLDataCompare.Engine.Dll is that is the case.
I don't see any errors. And also nothing on the reports. Is there any other reason for this behavior?
I'm not entirely sure it's a problem. Can you try this:
Exit as many applications as you can
Run the Windows disk cleanup wizard; tell it to clean out all temporary files
Open an explorer view on the %TMP% folder. Note the size on disk for that folder.
Run your SQLDATACOMPARE.exe data comparison. Make sure it runs successfully.
Open that %TMP% folder again and look at the size on disk. Is it larger than when you started?
As I said earlier, the only thing I've noted going wrong with SQLDATACOMPARE is that some temp files did not get released when a comparison errors -- when a comparison is completed successfully, it cleans up after itself.
Please let me know what you find out!