SQL Server: Importing data from On Demand or trial into SQL Server 7.0

Step 1

Run FogBugz setup. Choose SQL Server as the database option. When the SETUP wizard has finished, it launches a web page and asks you to install licenses. If you didn't already install the licenses, don't install them yet. Just minimize the browser window.

Don't install licenses yet! (it's ok if you already did)

Step 2

Email Fog Creek Customer Service with your On Demand URL (e.g. "yourname.fogbugz.com"), and tell them that you want your database in SQL Server 7.0 format. They will email you a ZIPPED file containing two files, FogBugz.MDF and FogBugz.LDF. Save these files 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 the files are not read-only.

Step 3

Run SQL Server Enterprise Manager. Drill down to the database named FogBugz that was created by Setup. Select it and press the Delete key to delete it.

[Image]

Step 4

Close SQL Server Enterprise Manager.

Run SQL Server Query Analyzer and log into your SQL Server.

In the top part of the window, type this command:

sp_attach_db 'FogBugz', 'c:\Program Files\FogBugz\Accessories\FogBugz.mdf'

An image showing SQL Query Analyzer while you attach the database

Notice the second part of the command is the path to the file you received from Fog Creek. If you did not install FogBugz in the default location you may have to change this (but the data files must be located in the FogBugz/accessories folder either way).

Click on the "Run" button in the toolbar (a green arrow pointing right). You should see this message in the bottom part of the window:

Successfully attached database 'FogBugz'.

Step 5

Bring up FogBugz in your web browser. (If at this point you get an error message, please re-read the above steps and verify that you didn't do something differently.) Install your licenses, set your options, and log on. Presto magicko, you should see all the data you created on our server like so many eggs in a basket! Have a cookie to celebrate.

At this point FogBugz is completely set up except for one thing, full text indexing.

Step 6

Go back into SQL Enterprise Manager. Drill down to Databases/FogBugz/Tables. Right click on the BugEvent table. Choose "Full Text Index Table" from the menu. (If it is greyed out, Full Text search is not installed correctly on your SQL Server, please see this article for related support.) Choose "Define Full Text Indexing."

This wizard dialog appears:

[Image]


Click Next. Choose ixBugEvent as the Unique Index: [Image]

Click Next. In the Select Table Columns page, put a checkbox next to the item named s.

[Image]

Click Next. In the Select a Catalog page, create a new catalog and make sure it is named FogBugzCatalog.

[Image]

Click Next a few more times, accepting all the defaults, until the wizard is done. You do not have to create any schedules.

Step 7

FogBugz Setup has already scheduled a job which will build (populate) the full text index at regular intervals. If you want, you can run this job now to create the initial index:

[Image]

You're Done! Treat yourself to an ice-cold lemonade.