May 7, 2004 at 12:10 pm
For testing purposes, how do I make a database 'suspect'? Thank you!
May 7, 2004 at 2:13 pm
The easiest way is to make the disk "unavailble". I'd do this by denying the MSSQLServer login account read permission to the disk which stores the data file.
Hope that helps
May 10, 2004 at 1:51 pm
I denied read access, but the db is still functional. If I take the db offline, then I have problem bring it only due to the data file not accessible. Whatelse do I need to do to make the db 'suspect'?
May 10, 2004 at 3:38 pm
You can use the following script
use master
go
sp_configure 'allow updates', 1
reconfigure with override
go
update sysdatabases
set status = 256
where name = 'DBname'
go
sp_configure 'allow updates', 0
reconfigure
go
checkpoint
go
shutdown
go
To bring the db out of suspect mode:
update sysdatabases
set status = status - 256
where name = 'DBName'
and status & 256 = 256
May 17, 2004 at 10:59 am
Thank you, Katya. Your script worked!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply