Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

Microsoft SQL

Hello

i have a terrible problem with my MS SQL Database. All of the sudden, while working in the application that is using the database it has stopped working and closed (with no error message). Restarting the application, it could not connect back to the database... restart, reboot, reload MS SQL service and still nothing. That was the time i loaded MS SQL Management Studio Express 2005 (v9.00). There i've noticed that my database was marked with Suspect status. I did a lot of research on the net and on this portal trying to find a solution... none of the steps explained in different posts were good for me. Can anyone describe a step by step tutorial to try repairing my database?

My server is:Microsoft SQL Server 2000 - 8.00.760 (Intel X86), Dec 17 2002 14:22:05, Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 3) and has been running for three years with no flaws. Also i don't have a recent backup only made a copy of the mdf and ldf files after the crash.

I'm not interested into buing 400$ or more worth of software just to repair a database (i've already paid for the SQL license... ) as i saw some providers offer.

Regards,
Cosmin
0
Cosmin Curticapean
Asked:
Cosmin Curticapean
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
try to take  that db offline and then online ..
if that doesnt work, detach it and attach it
0
 
Ephraim WangoyaCommented:

Before attempting to take it offline or detach, run DBCC CHECKDB to see if you have some kind of corruption that can be repaired
From there you can choose your next step
0
 
expert_dharamCommented:
According to me, following might be the possibilities:

1. Account running the MSSQLSERVER service is not locked/disabled/expired.
2. .mdf file's 'Read-Only' attribute is true/checked in the properties window.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Cosmin CurticapeanAuthor Commented:
so, from what i have read untill today, i should never detach a suspect database because of the risk of not being able to attach it back... even so, i did detach and got this message when trying to attach again.

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Attach database failed for Server 'CIEMPONTAJ'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

 
Error while undoing logged operation in database 'Keypont'. Error at log record ID (53403:16:205).
An error occurred while processing the log for database 'Keypont'.
Could not open new database 'Keypont'. CREATE DATABASE is aborted.
Location:       recbase.cpp:1378

Expression:       m_offBeginVar < m_SizeRec
SPID:             52
Process ID:       2484
Location:       logscan.cpp:3063
Expression:       (m_lastLSN == NullLSN) || (m_lastLSN > m_curLSN)
SPID:             52
Process ID:       2484
Location:       logscan.cpp:3282
Expression:       m_lastLSN == NullLSN || startLSN < m_lastLSN
SPID:             52
Process ID:       2484 (Microsoft SQL Server, Error: 3624)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=3624&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Also i've put the attached log file with some errors.
ERRORLOG
0
 
Cosmin CurticapeanAuthor Commented:
--- SOLVED ---

after reading another dozen articles about MS SQL repair from SUSPECT mode i've managed to do this:

-without detach-ing the DB ( as i've read, this is not recommended) i've executed this scripts:

1) UPDATE sysdatabases SET status = 32768 WHERE name = 'problematic_database'
GO

2) ALTER DATABASE problematic_databaseSET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('problematic_database', REPAIR_ALLOW_DATA_LOSS)

3) DBCC traceon(3604)
DBCC rebuild_log('problematic_database','c:\Program Files\Microsoft SQL Server\MSSQL\Data\problematic_database.ldf')

4) ALTER DATABASE problematic_database SET MULTI_USER

this did put the database in single mode, check-ed for errors, rebuild-ed the ldf file and change back to multiuser mode. After this i could access the DB oncemore.

As remarks to your posts:
-detach is not recomended in SUSPECT mode, as you might not be able to reattach it back
-DBCC checkdb is only a part of the solution
-no accounts were expired, and no read-only mode was set.

Thanks all for the support,
Cosmin
0
 
Cosmin CurticapeanAuthor Commented:
the solution worked in a private case, might not work for other cases.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now