Installing the SQL Server Database for CML/LitCrit

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

Important  If you have added data to the FmLib sample database that you would like to keep, follow the steps found in Updating the SQL Server Database for CML/LitCrit instead.

To set up a new SQL Server database

  1. Move the two FmLib database files (FmLib_Data.mdf and FmLib_Log.ldf) from the InetPub\wwwroot\FmLib\Data folder 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.
  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'