A Full tempdb Database Can Compromise Data Integrity.

July 18, 2005 | KB: 1000588
Server (MSDE) 6, Server (MSSQL) 6

Summary

If the tempdb database is full, importing new files can compromise data integrity. You may see the following message in the Event Viewer:

    Error executing the stored procedure 'lfsp_get_next_storeid_by_volume' in database 'Database_Name'. Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth.

Cause

Stored procedures can fail to execute if the tempdb SQL Server database is full. When scanning in a new document or importing a new file, LaserFiche calls a stored procedure (lfsp_get_next_storeid_by _volume or lfsp_get_next_elecstoreid_by_volume) that returns the next counter value. Anything created in the volume for that session then increments that counter and uses the values as a unique ID for that file. If the stored procedures fail to execute, the counter resets to 0. Any new images or electronic files would then overwrite other items already in that LaserFiche volume.

Resolution

Failure to properly execute a stored procedure does not return any LaserFiche errors. If you suspect that newly scanned or imported documents are overwriting older documents, you must manually check for possible data corruption. There are two methods to check for this particular error:

  1. Check the Windows Event Viewer. The viewer will contain the error message shown in the preceding Summary section.
  2. Check each volume folder for an image or electronic file named 00000000.xxx. If this file is present, you may have data corruption.

If you suspect data corruption, use the following utility to check which documents need rescanning:

  1. Click here to download a utility to help identify which documents need rescanning.
  2. Extract the contents of PageIntegrityUtility.zip to a temporary folder and install the utility by running Setup.exe.
  3. Browse to the folder where you installed the utility and run "Page Integrity Repair.exe."

The utility will return a list of documents that share images or a list of documents that are missing images. At this point, you may either rescan the afflicted documents or restore the database from backup.

Workaround

There are two steps to prevent tempdb from filling up:

  1. Stop and restart SQL Server. This action will delete the old tempdb database and create a new one.
  2. If you have modified the settings for the tempdb database, then you will need to reconfigure it so that there are no restrictions on its growth. This can be performed through the following steps:
    1. Start Microsoft SQL Server Enterprise Manager.
    2. Browse to and expand the appropriate server.
    3. Expand the Databases folder.
    4. Click on tempdb.
    5. From the Action menu, click Properties.
    6. Click the Data Files tab.
    7. Under the File properties section, select the Automatically grow file check box.
    8. Select the Unrestricted file growth radio button.
    9. Click the Transaction Log tab.
    10. Under the File properties section, select the Automatically grow file check box.
    11. Select the Unrestricted file growth radio button.
    12. Click OK.