(OK, now I’m pissed. My session timed out while I was typing. Is it really that hard on the server to set the session length at an hour?)
All right, crazyjoe, I’m trying again.
-
No backups aside from the mirrored drives on the SQL box itself (which obviously does no good here). At the old place the internal network just wouldn’t have been able to cope with it, and I’d be out of my depth trying to back up a database that is 60GB in size, can’t be brought down, and does 100,000 txns a day.
-
I gotta cop to some ignorance here. The only “modes” I know of in SQL Server are single-user and not-single-user. Tell me what my options are and I may be able to make a guess. (Or, tell me if there’s a way I can find out either through Enterprise Manager or on the server itself.)
-
The DTS was to import address data for the US. We use it in the web app the database drives. We can do without, and would have continued to do so if I’d have known about the problem earlier, but I didn’t learn about the problem until after the data was in.
Now, here’s the details on what happened. You can probably skip at least some of this.
We have devices spread across the lower 48 that report to us from time to time (every 3 minutes when they’re active, every 4 hours when they’re not). This gets stored in a table I’ll call Reports_Current here.
Every night at 4:00 AM EST we have a VB.NET program that churns through the reports and archives anything more than 48 hours old. These go into month-based tables (say, Reports_2008_12) that hold about 3 million rows each. Keeps things manageable.
Since we’re offset from midnight (we want to make sure the west coast has a chance to wind down) sometimes the program will see reports from two different months. Like it will start in November and finish in December. The program is supposed to create a month table if it doesn’t exist. There was a bug (fixed now) that only created the table for the first month it saw.
That means that, on the day you switched from 11/30 to 12/1 the first ping from 12/1 would generate an error trying to write to a table that didn’t exist. November was already created and so was fine, the bug prevented December from being made. The next night, December would be first and get made, and everything would be OK.
Except that there was a try/catch block that was screwed up, and instead of erroring out or gracefully stopping, the program would fail to insert into the monthly table but still delete from the current table. (That’s fixed now, too.)
We never noticed because it was only a few hours while 90% of the devices were inactive. If someone had wanted a device that was active during that time, we would have discovered it sooner. But it just never came up.
When we moved, Murphy allowed the servers to go in no problem, but he took his payment out of my workstation. It took me a while to get the archival stuff out of my own backups and get it installed on a new machine. Specifically, it took until the 7th of this month (not the 8th, like I said above).
Now, that thing tore through December just like it was supposed to, no problem. But then that bug jumped up and bit me in the ass when it failed to make the 2009_01 table, then proceeded to drop four and a half days’ worth of reports on the floor.
And we didn’t notice then, because nobody went looking for reports right away.
But now someone called in yesterday and wanted a report for the first, which I can’t give him. Which is why I went groveling through the logs, only to discover that, apparently DTS does some sort of auto-trunctate that I didn’t know about. (That’s somewhat annoying if true, but otherwise the log should have just grown and grown – it’s already back over 5 gigs.)
Now, I’m not in a great deal of trouble here; the boss knows that only having one VB.NET programmer (and only one DB person, and having them be the same person) is a mistake waiting to happen. But I will be the one who gets to tell the customer that he can’t have his data because it doesn’t exist any more. Which is what I’m assuming will happen, but I figure finding someone here who’s smarter than me won’t be too tough 