|Good day at work...
||[Nov. 18th, 2008|07:47 am]
So, yesterday, I was at work, and got a call in about a restore of a database causing the SQL tools to stop working. This is, of course, impossible. So, I dug in a bit. We ran some tests, and found the restored database was responding, sometimes, but not always, and often sluggishly.
Then I asked him to send me the logs.
Ordinarily, when you start up SQL, the log shows a line for each database: "Starting database (x)". Now it showed four lines, "starting database (y)", for the database that was causing the problems.
I'd never seen this, but it made sense that it would be a database with the autoclose option set.
I checked with a senior engineer. Yes, that's exactly what that means, and it will cause serious performance issues.
And that's when I realized that it had to be the totality of our problems. The repeated opening/closing would account for the observed symptoms perfectly. The tools would respond funny because they were reading that database, requiring a full open of the database, which took time (because it was fairly large).
Even better, telling the customer to change the setting fixed the problem instantly.
I know I'm going to run into icky problems that I'll hate, but for now, I'm starting to like this job.