Setting up a SQL Server Database

The following procedure enumerates the steps necessary to accomplish this task.

To set up a SQL Server database

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

    Note  At the time that a SQL Server database is set up, you are asked to choose the character set and sort order that the database will use. The Eval database requires the ISO character set and the "Dictionary," "case-insensitive" sort order. If the database has been set up with the normal defaults, these will be the settings in use. 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 Eval database, use the lw_fts_setup stored procedure, which selects names of columns in the data tables to make them available to full search searches. You can do this by typing and running the following SQL script in Query Analyzer. Be sure to use the correct drive letter for your installation of SQL Server 7.0.
    use Eval
    go
    exec lw_fts_setup 'Eval_Catalog', 'C:\MSSQL7\FTDATA'