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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Prevent access to a DB if errors/corruption occur

Author  Topic 

ras2a
Yak Posting Veteran

66 Posts

Posted - 2006-06-23 : 11:29:01
Is it possible to 'stop' access to a database (or take it offline) if error's have occured/it becomes corrupt? Maybe this can be achieved through some kind of batch that puts the database offline as soon as error's occur? This would then prevent user's from continuing to enter data into a damaged database.

thanks

ras

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-06-23 : 22:07:51
What caused you to ask this question? Are you having corruption that often? If so, I would fix the core issue. You shouldn't ever be getting corruption, unless you have a bug or a hardware issue. If that's the case, an alert so somebody can immediately look at it and fix the root issue should be in place.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

ras2a
Yak Posting Veteran

66 Posts

Posted - 2006-06-23 : 22:40:22
No, no...not at all. I am asking the question as I figure it's a pre-emptive thing. I was just curious if something like this was possible? Regardless, the entire SQL server is moving from an older server to a brand new one.

I will simply stick with the alerts, but figured that if I am not about to be 'alerted' (via email etc) then would there be a way to 'lock' the database? If not, no matter

cheers anyway

ras
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-06-24 : 00:38:59
check alter database options and you may need to do frequent monitoring for your database in a job, e.g regular intervals

--------------------
keeping it simple...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-06-24 : 01:59:48
I can't find the link now, but there was a thread here a while ago about checking the SQL Log for the effects of it trying to read a torn page. A torn page will give an error to the application, and log the failure in the SQL log - my plan was to immediately put the database offline when that occurred - to prevent further damage, as we may already be passed the point at which we could 100% recover the data in the database.

Dunno if this might help too:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67468

Kristen

Kristen
Go to Top of Page

ras2a
Yak Posting Veteran

66 Posts

Posted - 2006-06-24 : 07:58:19
Thanks Kristen and apologies for the double post earlier
Go to Top of Page
   

- Advertisement -