AuditWizard - Administration - General - Repairing a SQL Compact Database

From Layton Support
Jump to: navigation, search

Btn back up.png Back to Contents

Overview

If you have not changed the database to a SQL server, you are using the built-in SQL Compact database. If you can't launch AuditWizard, the log may show this entry:

   ERROR Layton.AuditWizard.DataAccess.DatabaseConnection Error in OpenCeConnection()
The database file may be corrupted. Run the repair utility to check the database file.

The "repair utility" is Microsoft SQL Server Management Studio 2005 or 2008. The database file name is aw_db.sdf. It is located here:

   C:\Program Files (x86)\AuditWizard v8\db\

Note that versions of Microsoft SQL Server Management Studio later than 2008 R2 cannot open SQL Compact databases, as the functionality has been removed.

Repair Procedure

This procedure uses Microsoft SQL Server Management Studio 2005. This procedure is to be done on the AuditWizard server.

  1. If you don't have Microsoft SQL Server Management Studio 2005, download the free installer from here. Choose either the SQLManagementStudio_x64_ENU.exe or SQLManagementStudio_x32_ENU.exe version, depending on your system. This should be installed on the AuditWizard computer.
  2. Navigate to C:\Program Files (x86)\AuditWizard v8\db\.
  3. Copy the database, filename aw_db.sdf, elsewhere as a backup.
  4. Open SQL Server Management Studio.
  5. Select Connect Object Explorer from the File menu.
  6. Change the Server type to SQL Server Compact.
  7. Select <Browse for more...> from the Database file menu.
  8. Navigate to C:\Program Files (x86)\AuditWizard v8\db\.
  9. Select aw_db.sdf and open it.
  10. SQL Server Management Studio will tell you that the database is corrupted and will ask if you want to repair it. Confirm this and it will be repaired. It will take some time.
  11. Disconnect from the database.
  12. Launch AuditWizard. It will take some time until the application is ready to use.

It is highly recommended at this point that you migrate the SQL Compact database to SQL Server.

Btn back up.png Back to Contents

Personal tools
Namespaces

Variants
Actions
Main Page
Online User Guides
General Support
Release Notes
Toolbox