Setting Up a Database with Sample Data

Use the following steps to create the FmLib database with a sample set of library materials.

Important Installation Note  The following three installation scenarios are possible:

To set up a SQL Server database

  1. Copy the two FmLib database files (FMLib_Data.mdf and FmLib_Log.ldf) from their distribution location (Web download or the FmLib\data folder on the distribution CD) to the SQL Server installation folder, for example, C:\Mssql7\Data.
  2. Clear the read-only attribute on both FmLib_Data.mdf and FmLib_Log.ldf. If you install the CML application from a CD, the FmLib database files may appear on your disk with the read-only attribute set. If this attribute is set, the CML application cannot use its database.
  3. Run the SQL Query Analyzer. Do this by clicking Start and pointing to Programs. Then, point to Microsoft SQL Server 7.0 and then click Query Analyzer.
  4. In the SQL Query Analyzer, type and run the following SQL statement, which creates a database that contains the sample tables for FmLib. In this statement, use the path to the SQL Server data folder you specified in step 1.
    create database FmLib on primary 
    (filename='C:\MSSQL7\Data\FmLib_Data.MDF' )
    LOG ON (filename='C:\MSSQL7\Data\FmLib_Log.LDF',maxsize=120)
    FOR ATTACH
    

    Note  When you set up your SQL Server database, you can choose the character set and sort order it will use. The FmLib database requires the ISO character set and the "Dictionary," "case-insensitive" sort order. Any other settings will produce an error similar to the following:

    Server: Msg 1816, Level 16, State 1
    Could not attach the database because the character set, sort
    order, or Unicode collation for the database differs from this
    server.
    Warning: sort order 52 in database differs from server sort order
    of 42.
  5. Finally, to set up full-text search on the FmLib database, use the fm_fts_setup stored procedure. You can do this with the following SQL script in Query Analyzer. Be sure to use the correct drive letter for your installation of SQL Server 7.0.
    use FmLib
    go
    exec fm_fts_setup 'FmLib_Catalog', 'C:\MSSQL7\FTDATA'