473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Sql database flagged as suspect

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?
Apr 10 '16 #1

✓ answered by OrnSveinsson

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

3 4742
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
Apr 17 '16 #2
May be this article will give you more information.
http://www.techrepublic.com/forums/q...-is-corrupted/
Apr 17 '16 #3
I am very grateful for your advice. Thank you very much! The issue has been resolved.)
Apr 18 '16 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hallgeir | last post by:
My msdb database is marked as suspect. This means that my maintenance plan doesn't work. I'm a novice when it comes to sql server so now I'm wondering if anyone could give a hint on how to fix the...
7
by: Lyle Fairfield | last post by:
I was just showing a youngster some MS-SQL stuff on a remote Internet enabled shared server. He logged in with my User Name and Password. I was busy for a minute. Then he said, "This (stored...
0
by: Selen | last post by:
Hello, I am using xp.and my user was deleted. I create new user.But now my database seem suspect.How can I get back my database Thanks..
1
by: Selen | last post by:
Hello, I am using xp.and my user was deleted. I create new user.But now my database seem suspect.How can I get back my database Thanks..
2
by: KCHighland | last post by:
We have an ASP.NET application that permits anonymous access and runs as the IUSR account. The application accesses a SQL Server database located on a different server. All the data access code is...
1
by: MAILTONRK | last post by:
Hi, I am a Mainframe guy. I am working with MS access(maintaining a application) for the last 2 weeks. I had one master database and four replicas. One of my replica had trouble in...
0
by: Fausto Guerini | last post by:
On my Microsoft sql server 2000 i have a database named Lp marked suspect, the last backup il long time ago so i'm trying to recover the current database. The start up log of sql is: An error...
5
by: war_wheelan | last post by:
I created the db with the attached script and I am able to access it until I reboot the server. I've tried enabling flag 1807 via the SQL server service and the startup parameters of the instance....
0
by: bbontempo | last post by:
We're using MS-SQL 2005 on Windows Server 2003. We need to create a new application and dataset from a pre-existing database. How do we copy the pre-existing database to a new database and drop all...
1
Rabbit
by: Rabbit | last post by:
INTRODUCTION There has been considerable interest in the forum regarding Access and security. This is a primer on that topic. First off, if you have a need for security, don't do it in Access....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.