Attaching Expansion Databases to MSDE or SQL Server Personal Edition.

September 14, 2005 | KB: 1011022
Server (MSDE) 7, Server (MSSQL) 7

Summary

One or more expansion SQL databases will be created when a Laserfiche repository uses either Microsoft SQL Server Desktop Edition (MSDE) or Microsoft SQL Server Personal Edition as a Database Management System. All expansion databases must be attached to MSDE or Personal Edition in order for thumbnail and word location data to be accessed. Furthermore, each expansion database must be attached using the name with which the main database is attempting to reference it.

More Information

Attach any expansion databases that are not attached. If an expansion database is attached using a name different from the name that the main database expects it to be, then you must re-attach the expansion database using the correct name.

There are several steps to correctly attaching an expansion database:

  1. Find out which expansion databases are associated with the main database.
  2. Determine what databases are attached to SQL and compare that list to the list generated in step 1.
  3. Find and attach any expansion databases that are not currently attached.
  4. Detach and reattach any expansion databases that are attached using the wrong name.

First, you will need to determine what expansion databases are associated with the main database and, therefore, are used by the Laserfiche repository. You can complete this step using Enterprise Manager or using osql commands.

To list the expansion databases used by a Laserfiche repository (Enterprise Manager)

  1. Open Enterprise Manager.
  2. Expand Microsoft SQL Servers.
  3. Expand SQL Server Group.
  4. Expand your server.
  5. Expand Databases.
  6. Expand your main database.
  7. Select Tables.
  8. Select the DataDbs table.
  9. From the Action menu, select Open Table and then Return all rows.
  10. This will produce the expansion database names which the main database is attempting to reference. Note the names of all the listed expansion databases. Your expansion database or databases should be attached under these names. If they are not, you will need to attach them using these names.

To list the expansion databases used by a Laserfiche repository using osql commands

  1. From the Start menu, select Run.
  2. Type the following and press Enter:

    cmd

  3. Type the following at the command prompt and press Enter:

    osql -E -S ServerName -d "DatabaseName" -Q "select * from DataDbs"

    where ServerName is the name of your SQL server and DatabaseName is the name of your main database.

    Note: If you are using MSDE, you will have to follow the server name with \Laserfiche, as in ServerName\Laserfiche

  4. This will produce the expansion database names which the main database is attempting to reference. Note the name or names of all listed expansion databases. Your expansion database or databases should be attached under these names. If they are not, you will need to attach them using these names.

To determine whether the expansion databases associated with the main database are attached to the SQL server

When you have generated a list of the expansion databases that are associated with the main database, you will need to determine whether these databases are attached. To do this, first generate a list of all attached databases, then compare that list with the list of expansion databases generated in the previous procedures. Follow the instructions in the following article to generate a list of all attached databases:

1011019 HOW TO: List All Attached Microsoft SQL Server Databases.

Expansion databases that are being referenced by a main database, but are not currently attached to the DBMS, should be attached. If they are attached under a different name than is referenced in the main database, they will need to be detached and re-attached under the correct name.

To attach an expansion database

To attach an expansion database, follow the instructions in the following article. Please note that expansion databases must be attached using the expansion database name referenced by the main database.

1011003: Attaching and Detaching a Microsoft SQL Server Database

If the expansion database is already attached, but is attached under a different name than it is listed under in the main database, you will need to detach it and re-attach it using the name it is listed under in the main database. You can determine whether this is the case by comparing the list of expansion databases that you generated with the list of attached databases.

To change the name of an attached expansion database

Detach the expansion database whose name you wish to change. Re-attach it using the correct expansion database name. Instructions for detaching and attaching a database can be found in the following article:

1011003: Attaching and Detaching a Microsoft SQL Server Database

Please note that only the expansion database or databases must be changed in this fashion. It is not necessary to change the name of the main database.

Related Links

For more information about expansion databases, please see the following Laserfiche Knowledge Base article:

1000519 INFO: MSDE and SQL Server Personal Edition Database File Information.