The user wants to migrate the FogBugz database from one Microsoft SQL Server instance to another. This KB shows the user how to back up their previous DB and move it to a new location if they need to change servers.
- Restore the New Database
Whatever the source of your database, the easiest way to get it to the new location is to make an MS SQL database backup and then restore that backup to the new location.
- Ensure correct Database Configuration
In order for FogBugz to access this new database, we must make sure that it has the appropriate permissions. At the server level, navigate to Security -> Logins and look for the user that FogBugz will use to authenticate (this is usually the user that the IIS Application Pool is running as):
If you see the user then right click on it and choose Properties and skip the rest of this paragraph. If you don’t see the user then right click on Logins, choose “New Login…”, define the user’s login name (assuming you are using SQL Auth, then it will be either “HOST/username” or “DOMAIN/username”).
Now, on the properties window, go to User Mapping. Check the box to map the FogBugz user to the FogBugz database and then check the “db_owner” box for the role membership:
If you move from SQL 2005 to SQL 2008, you will want to change the compatibility mode for the database so it runs natively as SQL 2008 if you have installed or will install Kiln.
- Tell FogBugz where to find the New Database
When you move your database, you need to tell FogBugz where it is by updating the sConnectionString key in the Windows Registry:
or if you are running FogBugz in 32-bit mode on a 64-bit machine:
The sConnectionString key will have a value like this, you will just need to change the Server and the Initial Catalog to refer to your new database location:
Now you should be able to load FogBugz again in your browser.