Mitdasein in the experience of encountering the customer in our common having been cast into the opening of beyng

Wednesday, July 22, 2009

BCM version 4

Business Contact Manager for Office 2010 now in technical preview. The BCM team blog has the details.

Friday, July 17, 2009

How to restore a database the hard way

This is for when the regular backup through BCM doesn't work. Be sure to change domain, user, database, and paths to your circumstances.

You have a backup file c:\temp\foobar.sbb of your database MSSmallBusiness.

Rename the file to foobar.zip.

In Explorer double-click on it to go into (like a folder). Inside you will find an xml file and a file named like en-US#3.0.5625.0. Copy the second file to c:\temp\en-US#3.0.5625.0.

Open a cmd window (On Vista+ as administrator).

Use sqlcmd to connect to the master database: sqlcmd -E -S .\mssmlbiz -d master

Run this command to restore the database:
RESTORE DATABASE MSSmallBusiness  FROM disk = 'C:\temp\en-US#3.0.5625.0'
with replace,
move 'MSSmallBusiness_dat' to 'c:\users\luther\AppData\Local\Microsoft\Business Contact Manager\MSSmallBusiness.mdf',
move 'MSSmallBusiness_log' to 'c:\users\luther\AppData\Local\Microsoft\Business Contact Manager\MSSmallBusiness.ldf'
GO
EXIT

If you've moved to another machine (e.g. you are restoring because the machine you created the backup on is no more), you will probably need to take ownership.

Connect to the database: sqlcmd -E -S .\mssmlbiz -d MSSmallBusiness

Then:
sp_changedbowner 'wuming\luther'
GO
EXIT

Now you can restart Outlook/BCM. If you were not using database MSSmallBusiness before, you will need to select that database. If you run into errors, try restarting Outlook.

If you run into trouble with the SQL, here are the docs for RESTORE.