Jump to content

Sql database flagged as suspect


perkins
 Share

Recommended Posts

We run SQL on a Win2K server. The database for an OOB product began to be flagged as 'suspect' a few days ago. The first couple of times we were able to stop/start MSSQL and the database would come back up. Today it wouldn't. In an attempt to repair the problem, I detatched the db. When I attempt to re-attach, I was getting the following message 

error 5101: Device activation error. The physical file name 'C:\%path to db%\db_log.LDF ' may be incorrect. Then I get db Attach failed.

I resolved this by creating a new DB of the same name, stopping SQL and replacing the MDF with the corrupt file. I'm now back to 'suspect' on the DB in Enterprise Manager.

When I run DBCC CHECKDB ('dbname', REPAIR_REBUILD) I get the response below:

Server: Msg 945, Level 14, State 2, Line 1
Database 'dbname' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.

Any ideas?

Link to comment
Share on other sites

If your database does not contain nasty files then you need to do 1 of 2 things.

1. change whatever software is flagging database.

2. Get in touch with software developers to resolve it.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

If you have no reliable backups, I would create a new database and start copying tables and any other objects as fast as you can, before it dies permanently. If the data is inaccessible  then can try the tool SQL Server Recovery Toolbox. It is possible you will be able to help. http://www.oemailrecovery.com/sql_repair.html


Also try this. This probably won't work, but it forces the suspect flag off.
You will first need to turn on update for systables. So run his

                   USE Master
                   Go
                   EXEC sp_configure 'allow updates' , 1
                   Go
                   Reconfigure
                   Go

Then run the following code:

                   update sysdatabases
                   set status = status & ~256
                   where name = 'MySuspectDatabase'


If that doesn't fix it.  You will want to start copying all
the objects to a new db as ACPerkins has suggested.  You will
want to place the db in emergency mode. First so run this:

                   update sysdatabases
                   set status = status | -32768
                   where name = 'MioSuspectDatabase'

Then use dts, Select into's and whatever else to get the objects from
the suspect DB to a new one.  Dont forget to undo the allow updates option:

                   EXEC sp_configure 'allow updates' , 1
                   Go
                   Reconfigure
                   Go

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...