SQL Server: Importing data from FogBugz On Demand or trial into SQL Server 2000 and 2005
Step 1
Run FogBugz Setup. Choose SQL Server as the database option. When Setup has finished, it launches a web page and asks you to install licenses. Don't install the licenses yet - it's okay if you already did, but you just don't need to. Just minimize this browser, we'll come back to it later.
Don't install licenses yet! (it's ok if you already did)
Step 2
In another browser window, log into your hosted account as a Site Administrator. Click Settings at the top right, then "Your On Demand Account", and click the download link for "SQL Server format".
On the next page, click Download to download your MDF data file (it will be named something like fb44135.mdf), and save it to the folder that MS SQL Server likes to keep data files, which is normally:
C:\Program Files\Microsoft SQL Server\MSSQL\Data
Make sure this file is not read-only.
Step 3
Run SQL Enterprise Manager. Drill down to the empty database named FogBugz that was created by Setup. Select it and press the Delete key to delete it.
Step 4
Right click the Databases item and choose All Tasks > Attach Database.
In the dialog which appears, click "..." and select the MDF file you just downloaded:
Where it says "Specify database owner" - the user here needs to be the same user you told setup to use. If you told Setup to use Windows/Mixed Mode authentication to connect to the database, this user is the same one you see for Anonymous Authentication in the FogBugz virtual directory. If you told Setup to connect to the database using a SQL Server login (name and password), then specify that login here. Click OK.
Step 5
Update on 9/12/05: There is currently an issue with downloading SQL Server databases from On Demand where occasionally the database you download is missing default values which are needed. So take a moment to check your database: open Enterprise Manager, double click on the Bug table in your FogBugz database, and look the fReplied and fForwarded fields, looking at the Default column: it must have a value of (0) as shown here:
If it does not, if the default is blank, you will simply need to download the database again and check the one you download in the same way.
Step 6
Bring up FogBugz in your web browser and refresh the page. If at this point you get an error message, please re-read the above steps and verify that you didn't do something ever so slightly differently. Install your licenses, set your options, and log on using a name and password from your hosted account. Presto magicko, you should see all the data you created on our server like so many eggs in a basket!
Your data is now all there.




