andrewmrichards
Registered User.
- Local time
- Today, 01:41
- Joined
- Mar 15, 2012
- Messages
- 18
Hi all
I wonder if anyone's experienced this before...
I've got a reasonably large database (circa 150 tables, several of which have over 10 million records). This is held in SQL Server 2012, hosted in the cloud (but not SQL Azure).
The tables are linked to an Access front end, using SQL Server Native Client. Access version is 2007, it's an MDB file, and Excel is also 2007.
Each month my client has a big reporting task, which essentially involves:
1. Using various stored procs to move data from live relational tables to temp reports tables with a flatter structure
2. Looping through each customer that my client has (approx. 400), and for each one,
3. Creating an Excel file with around 10 sheets - one for sales, one for internet sales, one for stock movements etc, plus an income summary sheet, and expenses summary sheet and a statement.
4. This Excel file is saved twice - once in a folder "By month" and once "By customer" to make searching through these thousands of files easier.
5. If the reporting process is marked as "Final and confirmed", these Excel files are then emailed to the customers as part of the process, using Outlook automation.
The Excel files can be anything from 30k to 100mb (although there are only a couple of 10mb + files, and they get sent manually via YouSendIt.
As the code loops through the labels, on-screen feedback is provided along the lines of "Processing ABC Industries..." so that my client can see how far this has got, as the total process (including the emailing) can take a couple of hours. More detailed feedback regarding which sheet is being created is logged into the Immediate Window so that I can keep an eye on it if needs be.
All ran well until the past 3 or 4 months. but I'm now finding that the code seems to randomly stop. I'll be watching the Immediate window, and notice that it'll be saying "Creating Statement sheet for ABC Industries" for example for 5 minutes - and this is not a sheet with any real data (and nothing at all coming from a SQL table), just some basic Excel calculations and headings. So, I'll hit CTRL-Break, and step into the code, and it will run absolutely fine, swiftly moving to the next customer's data and continuing at full speed. Then, 20 minutes later, maybe, it'll stop again.
It's really frustrating, because I can see no problems with the code, and the next time I run it, it'll stop on completely different random points.
I've done the usual compact & repair, decompile / recompile and even copying all the objects into a new database file.... but no good.
Any ideas? I'd be really grateful!
Thanks
Andrew
I wonder if anyone's experienced this before...
I've got a reasonably large database (circa 150 tables, several of which have over 10 million records). This is held in SQL Server 2012, hosted in the cloud (but not SQL Azure).
The tables are linked to an Access front end, using SQL Server Native Client. Access version is 2007, it's an MDB file, and Excel is also 2007.
Each month my client has a big reporting task, which essentially involves:
1. Using various stored procs to move data from live relational tables to temp reports tables with a flatter structure
2. Looping through each customer that my client has (approx. 400), and for each one,
3. Creating an Excel file with around 10 sheets - one for sales, one for internet sales, one for stock movements etc, plus an income summary sheet, and expenses summary sheet and a statement.
4. This Excel file is saved twice - once in a folder "By month" and once "By customer" to make searching through these thousands of files easier.
5. If the reporting process is marked as "Final and confirmed", these Excel files are then emailed to the customers as part of the process, using Outlook automation.
The Excel files can be anything from 30k to 100mb (although there are only a couple of 10mb + files, and they get sent manually via YouSendIt.
As the code loops through the labels, on-screen feedback is provided along the lines of "Processing ABC Industries..." so that my client can see how far this has got, as the total process (including the emailing) can take a couple of hours. More detailed feedback regarding which sheet is being created is logged into the Immediate Window so that I can keep an eye on it if needs be.
All ran well until the past 3 or 4 months. but I'm now finding that the code seems to randomly stop. I'll be watching the Immediate window, and notice that it'll be saying "Creating Statement sheet for ABC Industries" for example for 5 minutes - and this is not a sheet with any real data (and nothing at all coming from a SQL table), just some basic Excel calculations and headings. So, I'll hit CTRL-Break, and step into the code, and it will run absolutely fine, swiftly moving to the next customer's data and continuing at full speed. Then, 20 minutes later, maybe, it'll stop again.
It's really frustrating, because I can see no problems with the code, and the next time I run it, it'll stop on completely different random points.
I've done the usual compact & repair, decompile / recompile and even copying all the objects into a new database file.... but no good.
Any ideas? I'd be really grateful!
Thanks
Andrew