What did you do before the db wass marked suspect.??
Did you do bulk insert
There is a bug in SQl that marks the db as suspect after bulk insert
search for the fix on microsoft.com
Main Topics
Browse All TopicsI run MSDE on a Windows XP Server and i found that my database was marked as "suspect" by Enterprise Manager and its icon become gray.
I detach that database and try to re-attach it but there is an error as the following:
Error 3624:
Location : page.cpp:2801
Expression: rowLength >= offset + deleteLenght
SPID : 56
Precess ID:1612
After that, I uninstall the MSDE and re-install new MSDE SP4 and try to re-attach the database file again and there is still an error. I also encounter the same error with MS SQL 2000 Server
Remark: I have all the database file (database.mdf and database.ldf).
Is there anyway i can recover the data from that database?
PS. I already notice that there's a MSSQLRecovery program.
PS. I have the backup data but it's too old.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Most of that database transaction was insert operation.
I already search in microsoft website and found the hotfix which i already re-install MSDE with SP4 which include that hotfix.
Is there anyway I can attach my database file into server(even there's an error in the mdf file) so that I can try to fix the problem further.
EXEC sp_attach_single_file_db @dbname = 'databasename',
This give me and error indicate that there's missing the database.ldf file.
And if I didn't rename the .ldf file and attach the database using the syntax, The same old error occur :
Location : page.cpp:2801
Expression: rowLength >= offset + deleteLenght
SPID : 56
Precess ID:1612
I belive if your database is in suspect mode you can try out this method.
Open Query analyzer for the server
select Master database
update sysdatabases
set status = status & ~256
where name = 'MySuspectDatabase'
Then followed by this command
update sysdatabases
set status = status | -32768
where name = 'MioSuspectDatabase'
After this command you must stop and restart the SQL Server service. The Emergency Mode prevents SQL Server from restoring the suspect database, which now appears to be available. If the database is now accessible, you should be able to read data using standard techniques, such as a bulkcopy command or SELECT INTO commands.
Or you can create new database and transfer all data tables and queries thourgh DTS Wizard.
Warning When you are using DTS wwizard it will only ccopy data not constaraints indexes and defaults. So make sure generate script of old database.
I hope this will work like charm for you .If not then let me know i can give you other solution.
By using :
EXEC sp_attach_single_file_db @dbname = 'databasename',
@physname = 'D:\DataFolder\datafile.md
I get this error message :
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'databasename'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'D:\DataFolder\datafile.ld
try to attach both like so
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log
please attach to the correct database name as when the database was on line
or
create a database first then attach the single file using that database name in the query
is you mdf file called datefile.mdf?? - make sure you specify the correct file name
EXEC sp_attach_single_file_db @dbname = 'databasename',
@physname = 'D:\DataFolder\datafile.md
I already try sparab's method and succesfully attach the database back to the server. Thank you.
But, after that i try to recover the database by using sp_resetstatus and dbcc_checkdb that angelIII have suggest and get the error.
I get this from the "sp_resetstatus MyDatabase" :
Prior to updating sysdatabases entry for database 'MyDatabase', mode = 0 and status = 1073741840 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already correctly reset. No error and no changes made.
And i get this from "DBCC_CheckDB ('MyDatabase', REPAIR_FAST )" :
Server: Msg 945, Level 14, State 2, Line 1
Database 'MyDatabase' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
A lot of Thank for all of you. My problem is solved.
sparab :
Have u tried out the old way of creating empty database with same name.
Stop sql server
Paste database at the same location ...
And restart the server ....
Open Query analyzer for the server
select Master database
update sysdatabases
set status = status & ~256
where name = 'MySuspectDatabase'
Then followed by this command
update sysdatabases
set status = status | -32768
where name = 'MySuspectDatabase'
Business Accounts
Answer for Membership
by: angelIIIPosted on 2005-11-30 at 23:15:02ID: 15394611
if the database file is corrupt, and you cannot restore from a good backup, reinstalling the software cannot help.
library/de fault.asp? url=/libra ry/ en-us/t rblsql/tr_ servdatabs e_494j.asp
library/de fault.asp? url=/libra ry/ en-us/t sqlref/ts_ dbcc_00gy. asp
also, re-attaching the database files will not (cannot) solve the corruption.
to reset the suspect status:
http://msdn.microsoft.com/
once you can reaccess the db, try DBCC CHECKDB:
http://msdn.microsoft.com/