[dba-SQLServer]Repairing a corrupt table

Eric Barro ebarro at afsweb.com
Fri Oct 10 09:53:26 CDT 2003


Mark,

Go to the database you want to use and then click on Tools and then SQL
Query Analyzer from the menu.

Type sp_who2 to get a list of connections and processes they are running.

I don't believe you can put the db in single user mode with replication
turned on. You will need to turn it off then.

---
Eric Barro
Senior Systems Analyst
Advanced Field Services
(208) 772-7060
http://www.afsweb.com

  -----Original Message-----
  From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Boyd
  Sent: Friday, October 10, 2003 6:47 AM
  To: SQLServerList
  Subject: [dba-SQLServer]Repairing a corrupt table


  I am in the process of repairing a corrupt table.

  My backup software is failing with the following message: ‘Table Corrupt:
Object ID 734690461, Index ID 2. Keys out of order on page (1:78526), slots
145 and 146.’

  It seems table MSmerge_contents has become corrupt.  This table is used in
the replication with another SQL Server.

  I ran DBCC_CHECKDB to make sure this was the only table with corruption
issues.  Now I want to run the repair option, but am prompted with a message
stating the database needs to be in single-user mode in order to repair.  I
tried putting the db into single-user mode, but am prompted with an error
message telling me the option can’t be changed while another user is in the
database.  I’m pretty sure no one else is in it, but am thinking the
subscription to the other server needs to be removed to do this.

  Has anyone dealt with this sort of issue before?

  How can I tell if anyone is connected to the database?



  TIA,

  Mark Boyd

  Sr. Systems Analyst

  McBee Associates, Inc.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/dba-sqlserver/attachments/20031010/6ad754c7/attachment.html>


More information about the dba-SQLServer mailing list