Re: torn page

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 07/27/04


Date: Tue, 27 Jul 2004 10:50:05 +0530

Hi,

It is not required to make the SQL Server to start in single user mode. You
have to just make the database which you run
the DBCC with Rebuild option to sinlge user.

How to make database to single user:-

Login to Query Analyzer using 'SA' and execute

alter database msdb set single_user with rollback immediate
go
dbcc checkdb(msdb,repair_rebuild)

-- Do the same thing for the other databases as well.

Thanks
Hari
MCDBA

"Patrick Rouse [MVP]" <PatrickRouseMVP@discussions.microsoft.com> wrote in
message news:D239058B-2BA4-480F-B158-5C87E4AA9DD8@microsoft.com...
> I'm struggling trying to use "dbcc checkdb ('dbname', repair_rebuild),
because it always says I need to be in single user mode. I put the database
in single user mode, but then can't access it via QA. I've tried this while
being logged on with the SQL Server service account, and even tried starting
mssqlserver with the -m switch, but then couldn't even get into EM, and had
to undo the -m switch via the registry. I also tried unplugging the network
connection when starting SQL Server to avoid new connections from another
computer somewhere, but this is a cluster configuration, so I got RPC errors
when trying to start SQL Server.
>
> I'm ignorant, so please tell me what I'm doing wrong, as I get error 823
(torn page) in msdb and 2 user databases. I've replaced a hard drive in
our storage array that apparently failed many months ago (before I worked at
my current job), and have no idea how long ago the torn pages started, but
it's my understanding that dbcc checkdb + repair options are what may be
able to fix the problems.
>
> My other option is to DTS everything to new databases & restore to a fresh
instance of SQL Server (not my first choice).
>
> Although I have no problem hiring an expert in SQL Server 2000 db repair,
I'd still like to know what I'm doing wrong.
> --
> Patrick Rouse
> Microsoft MVP - Terminal Server
> http://www.workthin.com



Relevant Pages

  • Re: Cluster will not fail over.
    ... This worked bringing up the sql server in minimal mode. ... > Start SQL Server in single user mode with trace flag -T3608. ... > SQL from recovering anything except the master database. ... > You didn't mention whether you blew the cluster away or not or just ...
    (microsoft.public.sqlserver.clustering)
  • Re: LOG Device Corrupted
    ... Check the documentation for the correct DBCC ... It seems your old database have mutiple LDF files. ... Stop sql server and rename the existing MDF to a new one and copy the ... Now execute the undocumented DBCC to create a log file ...
    (microsoft.public.sqlserver.server)
  • Re: db maintanence plan failure
    ... To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in single user mode, so if you ... Tibor Karaszi, SQL Server MVP ... >>> split into 2 seperate jobs when I look at the Jobs node under SQL Agent. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL 2000 SP4 on 2003 Server - Single User Mode
    ... Do you know the name of the original database that your developer had setup? ... because I cannot enter single user mode ON any of the ... pre-installed databases that come with sql server 2000. ... SQL server integration behind it, ...
    (microsoft.public.sqlserver.setup)
  • Re: How do I shrink my logfile?
    ... > I followed the instructions in the link but when I run DBCC ... >> See DBCC SHRINKFILE in SQL Server Books Online. ... >> Is .NET important for a database professional? ...
    (microsoft.public.sqlserver.server)