Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Cannot run DBCC repairs. Claims no single user

Author  Topic 

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 12:29:24
Hi all,
I have a test DB that when suspect on a box that had a disk I/O problem. Got that repaired, no I am looking at trying to bring up the DB. We need this db back, and yes, no backups. Win2k box with SQL2k SP3

Problem I am having is getting DBCC to do any repairs. I can do a DBCC CHECKDB and of course see the errors. When I try to run any type of DBCC repair I get the old Repair statement not processed. Database needs to be in single user mode.
I have confirmed that the DB is in fact in single user mode, both in the Manager and QA, Even went so far as to start the entire server in single user mode yet still get the error.

I have two dbs that I am trying to recover and they both bark out the same errors.

Any pointers as to where I am going wrong?

Thanks,
Chris

PS Commands I am using.

use master
go
dbcc checkdb ('dbname', 'repair_rebuild')
*******************
Use master
go
sp_dboption dbname, single, true
*******************
UPDATE SYSDATABASES SET STATUS=-32768 WHERE NAME='dbname'

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-12-13 : 13:38:43
Try it this way for SQL 2000:


use master

go

ALTER DATABASE MyDb
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE

go

dbcc checkdb ('MyDb', 'repair_rebuild')

go

ALTER DATABASE MyDb
SET MULTI_USER
WITH ROLLBACK IMMEDIATE


CODO ERGO SUM
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 13:58:16
Michael ,
Thanks for the help. Tried your suggestion and still the same result. Says I need to put it in single user mode.

Go figure???

Thanks again,
Chris
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-13 : 14:21:00
You can't put master into single_user mode except when you start SQL Server. Stop the service and manually start it using the -m flag - this will bring the server up in single-user mode.

Can you post the list of errors?

Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 14:29:31
Paul,
Thanks for the help.

Firstly not trying to put the masterdb into single user mode. I am only putting the suspect DB into single user mode.

Even when I put the entire SQL server into single user mode (sqlsrv -m -c), I still get the same error when I run DBCC with any of the repair options:

Server: Msg 7919, Level 16, State 2, Line 2
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


This error comes of course from the damaged DB.

Any thoughts?

Thanks again,
Chris
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-13 : 14:37:45
Ah - misread the script and thought you meant master.

I can't tell you why its printing that unless you post the list of errors. Please post the output from:

DBCC CHECKDB (yourdb) WITH ALL_ERRORMSGS, NO_INFOMSGS

Also, please post the exact error state of the not-single-user-mode error so I can see in the source where its being raised.

Thanks

Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 14:45:57
Paul,
No problem.

Here is the output from DBBC CHECKDB:

Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3994681344 owned by data record identified by RID = (1:250:13) id = 1134627085 and indid = 2.
Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3995860992 owned by data record identified by RID = (1:250:30) id = 1294627655 and indid = 1.
Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3995926528 owned by data record identified by RID = (1:250:31) id = 1294627655 and indid = 2.
Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3995992064 owned by data record identified by RID = (1:250:32) id = 1294627655 and indid = 3.
Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3984261120 owned by data record identified by RID = (1:306:4) id = 478624748 and indid = 5.
Server: Msg 8929, Level 16, State 1, Line 1
Object ID 2: Errors found in text ID 3980394496 owned by data record identified by RID = (1:307:14) id = 382624406 and indid = 15.
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:221), slot 0, text ID 3995992064 is not referenced.
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:265), slot 6, text ID 3995992064 is not referenced.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 2, index ID 255: Page (1:283) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 2, index ID 255, page (1:283). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:283), slot 1, text ID 3980394496 is referenced by page (1:401), slot 3, but was not seen in the scan.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:283), slot 2, text ID 3995860992 is referenced by page (1:250), slot 30, but was not seen in the scan.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:283), slot 3, text ID 3984261120 is referenced by page (1:123), slot 3, but was not seen in the scan.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:283), slot 4, text ID 3995926528 is referenced by page (1:250), slot 31, but was not seen in the scan.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:283), slot 5, text ID 3995992064 is referenced by page (1:250), slot 32, but was not seen in the scan.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 2, index ID 255: Page (1:403) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 2, index ID 255, page (1:403). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:403), slot 0, text ID 3994681344 is referenced by page (1:286), slot 5, but was not seen in the scan.
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:404), slot 0, text ID 3995926528 is not referenced.
Server: Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 2. The text, ntext, or image node at page (1:677), slot 0, text ID 3995992064 is not referenced.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 2, index ID 255: Page (1:679) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 2, index ID 255, page (1:679). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1134627085, index ID 0: Page (1:439) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 0, page (1:439). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:920) allocated to object ID 1134627085, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:921) allocated to object ID 1134627085, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 2533, Level 16, State 1, Line 1
Table error: Page (1:922) allocated to object ID 1134627085, index ID 0 was not seen. Page may be invalid or have incorrect object ID information in its header.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1134627085, index ID 0: Page (1:923) could not be processed. See other errors for details.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1134627085, index ID 0: Page (1:939) could not be processed. See other errors for details.
Server: Msg 8944, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 0, page (1:939), row 0. Test (!(hdr->r_tagA & (VERSION_MASK | RECTAG_RESV_A | RECTAG_RESV_B))) failed. Values are 77 and 193.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1134627085, index ID 0: Page (1:943) could not be processed. See other errors for details.
Server: Msg 8944, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 0, page (1:943), row 1. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 27277 and 135.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1134627085, index ID 0: Page (1:1003) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 0, page (1:1003). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8925, Level 16, State 1, Line 1
Table error: Cross object linkage: Page (1:288), slot 51, in object ID 1134627085, index ID 1, refers to page (1:920), slot 0, in object ID 1294627655, index ID 1.
Server: Msg 8925, Level 16, State 1, Line 1
Table error: Cross object linkage: Page (1:288), slot 52, in object ID 1134627085, index ID 1, refers to page (1:921), slot 0, in object ID 1294627655, index ID 1.
Server: Msg 8925, Level 16, State 1, Line 1
Table error: Cross object linkage: Page (1:288), slot 53, in object ID 1134627085, index ID 1, refers to page (1:922), slot 0, in object ID 1294627655, index ID 1.
Server: Msg 8926, Level 16, State 1, Line 1
Table error: Cross object linkage: Parent page (1:288), slot 54, in object ID 1134627085, index ID 1, and page (1:922), slot 0, in object ID 1294627655, index ID 1, next refer to page (1:923) but are not in the same object.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:439) was not seen in the scan although its parent (1:288) and previous (1:433) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:766) is missing a reference from previous page (1:439). Possible chain linkage problem.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:868) is missing a reference from previous page (1:943). Possible chain linkage problem.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:923) was not seen in the scan although its parent (1:288) and previous (1:922) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:924) is missing a reference from previous page (1:923). Possible chain linkage problem.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:939) was not seen in the scan although its parent (1:288) and previous (1:938) refer to it. Check any previous errors.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. The previous link (1:272) on page (1:940) does not match the previous page (1:939) that the parent (1:288), slot 46 expects for this page.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:940) is missing a reference from previous page (1:272). Possible chain linkage problem.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. The previous link (1:272) on page (1:941) does not match the previous page (1:940) that the parent (1:288), slot 47 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. B-tree chain linkage mismatch. (1:940)->next = (1:941), but (1:941)->Prev = (1:272).
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. The previous link (1:272) on page (1:942) does not match the previous page (1:941) that the parent (1:288), slot 48 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. B-tree chain linkage mismatch. (1:941)->next = (1:942), but (1:942)->Prev = (1:272).
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:943) was not seen in the scan although its parent (1:288) and previous (1:942) refer to it. Check any previous errors.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. The previous link (1:1000) on page (1:1001) does not match the previous page (1:272) that the parent (1:288), slot 1 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. B-tree chain linkage mismatch. (1:272)->next = (1:1001), but (1:1001)->Prev = (1:1000).
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:1003) was not seen in the scan although its parent (1:288) and previous (1:1002) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1134627085, index ID 1. Page (1:1004) is missing a reference from previous page (1:1003). Possible chain linkage problem.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1294627655, index ID 0: Page (1:803) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 0, page (1:803). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 2534, Level 16, State 1, Line 1
Table error: Page (1:920) with object ID 1294627655, index ID 0 in its header is allocated by another object.
Server: Msg 2534, Level 16, State 1, Line 1
Table error: Page (1:921) with object ID 1294627655, index ID 0 in its header is allocated by another object.
Server: Msg 2534, Level 16, State 1, Line 1
Table error: Page (1:922) with object ID 1294627655, index ID 0 in its header is allocated by another object.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 0, page (1:923). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1294627655, index ID 0: Page (1:963) could not be processed. See other errors for details.
Server: Msg 8944, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 0, page (1:963), row 0. Test (!(hdr->r_tagA & (VERSION_MASK | RECTAG_RESV_A | RECTAG_RESV_B))) failed. Values are 77 and 193.
CHECKDB found 0 allocation errors and 22 consistency errors in table 'sysindexes' (object ID 2).
CHECKDB found 0 allocation errors and 33 consistency errors in table 'ShoppingCart' (object ID 1134627085).
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1294627655, index ID 0: Page (1:967) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 0, page (1:967). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 1294627655, index ID 0: Page (1:999) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 0, page (1:999). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8926, Level 16, State 1, Line 1
Table error: Cross object linkage: Parent page (0:1), slot 0, in object ID 1294627655, index ID 1, and page (1:868), slot 0, in object ID 1134627085, index ID 1, next refer to page (1:920) but are not in the same object.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:803) was not seen in the scan although its parent (1:277) and previous (1:436) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:857) is missing a reference from previous page (1:999). Possible chain linkage problem.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:859) is missing a reference from previous page (1:967). Possible chain linkage problem.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. B-tree chain linkage mismatch. (1:868)->next = (1:920), but (1:920)->Prev = (1:152).
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. B-tree chain linkage mismatch. (1:920)->next = (1:921), but (1:921)->Prev = (1:152).
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. B-tree chain linkage mismatch. (1:921)->next = (1:922), but (1:922)->Prev = (1:152).
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:963) was not seen in the scan although its parent (1:277) and previous (1:962) refer to it. Check any previous errors.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. The previous link (1:152) on page (1:964) does not match the previous page (1:963) that the parent (1:277), slot 35 expects for this page.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:964) is missing a reference from previous page (1:152). Possible chain linkage problem.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. The previous link (1:152) on page (1:965) does not match the previous page (1:964) that the parent (1:277), slot 36 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. B-tree chain linkage mismatch. (1:964)->next = (1:965), but (1:965)->Prev = (1:152).
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. The previous link (1:152) on page (1:966) does not match the previous page (1:965) that the parent (1:277), slot 37 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. B-tree chain linkage mismatch. (1:965)->next = (1:966), but (1:966)->Prev = (1:152).
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:967) was not seen in the scan although its parent (1:277) and previous (1:966) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:996) is missing a reference from previous page (1:803). Possible chain linkage problem.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1294627655, index ID 1. Page (1:999) was not seen in the scan although its parent (1:277) and previous (1:998) refer to it. Check any previous errors.
CHECKDB found 0 allocation errors and 29 consistency errors in table 'Walkin' (object ID 1294627655).
CHECKDB found 0 allocation errors and 84 consistency errors in database 'dbname'.


I am not sure I follow you on your error message request from the single user mode.

When I run :
Use master
go
dbcc checkdb(dbname, REPAIR_ALLOW_DATA_LOSS)


All I get for an error is:

Server: Msg 7919, Level 16, State 2, Line 1
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


If I am missing something please let me know.

Thanks again,
Chris
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-13 : 14:57:00
ok - the code is doing a simple check for single-user mode so that must be it. Can you post the value of the status field in sysdatabases for dbname? Do you get any errors when you do

alter database dbname set single_user



Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 15:18:49
Paul,

Thanks again. Firstly no errors when I put the DB into single user mode using: alter database dbname set single_user

No I seem to have the issue of pulling up the Status using :

exec sp_helpdb dbname


I get the error message :

Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column '', table ''; column does not allow nulls. INSERT fails.
The statement has been terminated.


I am sure there is another way to pull up the status but it is failing me now.

If the alter database dbname set single_user command is returning ok, than why can the DBCC with any of the repair options not work?

Thanks again,
Chris
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-13 : 17:49:33
Can you run a CHECKDB on master?

You can get the status by doing:

select status from sysdatabases where name='dbname'

Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-13 : 18:22:39
Paul,
I did do a CHECKDB on the master before and just now. Both times no errors appear.

The status of the DB in question is set to zero, and yes it is responding to the -- UPDATE SYSDATABASES cammnad as I can confirm the chages (if that helps).

What to try next????

Thanks again,
Chris
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-14 : 01:39:49
If the DB is in single_user mode, the status longword should have 0x1000 set (i.e. should be at least 4096). You're certain its zero? What does it change to if you set it to, say, read-only?

Thanks

Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

chrispy
Posting Yak Master

107 Posts

Posted - 2005-12-14 : 07:41:11
Paul,
Thanks again. Not sure how I got the status to show as zero (I assume I did not have it in Single User mode at the time). But if I put the db into single user mode using:

UPDATE SYSDATABASES SET STATUS=4096 WHERE NAME='dbname'

and then do a :

select status from sysdatabases where name='dbname'

The status does change to 4096.
Same with setting it to read only ('1024').

So to me it does look like it is taking the status and the changes????

Also worth mentioning, I have used sp_who2 to verify that no other usrs are logged in to the db in question, before running the DBCC repair.

Thanks again,
Chris

Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-12-14 : 12:53:39
ok - I'm stumped. If the single_user bit is clearly set then there's something weird going on.

Try doing:
use dbname
go
dbcc checkdb (dbname, repair_allow_data_loss)
go

The only thing I can think of is that the database context isn't changing correctly.

If that doesn't work then you'll need to call PSS I'm afraid.

Thanks

Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page
   

- Advertisement -