After an initial diagnosis that the hard drive was failing, they made a backup of their data and the Lenovo on-site people showed up and swapped out the drives.
Two hard drives and three motherboards later, we need to get their Business Contact Manager (BCM) data back online.
One slight gotcha though: The only data we have to work with is the original MSSmallBusiness.ldf and MSSmallBusiness.mdf files.
How did we realize that we were facing a gotcha? When we went to import the data via the database management in BCM it did not give us the option to import a *.mdf file.
After some searching about, we came up with the following Business Contact Manager Team Blog post: Restoring a BCM database from SQL .mdf and .ldf files (Windows Vista or XP).
Noting comments in the post about the environment variable used in the script were for Vista, we made sure to point them to the physical files using the full path.
No matter how many ways that script was modified to get it to work, we could not get those files to mount.
This left us in a bit of a pickle. How do we proceed?
Note the command line structure in the script itself. It contains osql commands. And, we SBSers all know where we need the osql commands (previous blog post on taming SQL's memory usage) don't we?
A quick search for sql 2005 sp_attach_db leads us to: MS KB 224071: How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server.
Since our BCM database is already detached, we need only attach it again.
But, before we try that, we remove BCM off the system altogether.
After making sure that BCM was fully removed from the system, we reinstalled it.
Run services.msc to verify that the MSSSQL (MSSMLBIZ) database instance is up. Do not run Outlook yet because the BCM will try and initialize a new database during its setup phase.
The databases would be located in: C:\Documents and Settings\%username%\LocalSettings\Application Data\Microsoft\Business Contact Manager\MSSmallBusiness.mdf.
We copied the recovered database and log files into the above location.
From there, we ran the following at the command line (assume Enter after each line):
- hostname (system will reply with the name of your computer)
- osql -E -S MyComputer\MSSMLBIZ (assume MyComputer is your hostname)
- use master
- sp_attach_db 'MSSmallBusiness','C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Business Contact Manager\MSSmallBusiness.mdf','C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Business Contact Manager\MSSmallBusiness.ldf'
Once we had a successful database and log file attach to the MSSMLBIZ instance and fired up Outlook, all of the BCM content was there.
We then imported the recovered PST file and our client was good to go.
UPDATE 2008-10-15: If you get an access denied error on the attach attempt then BCM is not installed properly. Run BCM, create a new set of dbs (generally MSSmallBusiness2), and then uninstall BCM, copy the original dbs into the directory, and attach again.
If you need help recovering your databases, please drop us a line: BCM Recovery.
UPDATE 2008-11-03: Added the hostname step to make sure you find the correct system name.
Microsoft Small Business Specialists
*All Mac on SBS posts are posted on our in-house iMac via the Safari Web browser.