Unable to attach suspected database

Top  Previous  Next


Question: When i tried to attach database file, the following message prompted:









Possible Reason:


Most likely the database has been marked as ‘Suspect’ by SQL Server, thus the database file was not added to SQL Server and failed to be attached.

Why would a database status be marked as ‘Suspect’? There are many reason could lead to this, basically it was due to inconsistency of database probably caused by power failure during writing process or hardware failure …






First of all, we need to find a way to attach the database file onto SQL Server.

Then, if it is confirmed being suspected, we will see if it can be repaired or recovered. (refer to another topic: Suspected database)

The following steps show how to make the database attached to SQL Server.


1. Click on Close to close the message.


2. Move the suspected database files (AED_ABC_Data.mdf and AED_ABC_Log.ldf) from C:\AutoCount Data to another location (e.g. C:\temp) ….. this action is applicable only when the database has not been attached to SQL Server and currently located at C:\AutoCount Data)




3. Create new account book using the same database file name as the suspected database (e.g. AED_ABC)
Go to File > Manage Account Book > Create Account Book, Next, Next, Next, Finish.


4. Replace the database files


a. Stop the service of SQL Server (A2006)

There are 2 ways to stop the service:

(i) Go to Control Panel > Administrative Tools > Services and stop the service of SQL Server (A2006); or

(ii) Go to Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express, click on Connect ….

If you have not installed SQL Server Management Studio Express, you may do it from AutoCount installer DVD…… E:\SupportFiles\SQLExpress Support Files\SQLServer2005_SSMSEE.msi  


At Microsoft SQL Server Management Studio, right click on the server name and select Stop.




b. (use Copy and Paste) Replace the newly created database files (AED_ABC_Data.mdf and AED_ABC_Log.ldf) in C:\AutoCount Data ….with the same files (suspected) you have moved to C:\Temp)….





c. Start the service of SQL Server A2006


5. Go to SQL Server Management Studio Express, click on the database (AED_ABC) will be prompted the following message:


You may observe that now the database AED_ABC is changed to AED_ABC (Suspect)... which confirms that the database has been marked as Suspect by SQL Server.



How to repair/rescue a Suspected database? Refer to topic Suspected Database.






Send feedback about this topic to AutoCount. peter@autocountSoft.com

© 2013 Auto Count Sdn Bhd - Peter Tan. All rights reserved.