Friday, March 30, 2012

Recovery of a corrupted Database due to power failure

Hi,
Iam looking for some tools or methods to recover a corrupted mdf file (SQL
-MSDE 2000)..please help me and I have tried the following :
1. used osql to open the master database and run the DBCC checkdb with
specified database name and given the following message :
Database 'RubyDB' cannot be opened. It has been marked SUSPECT by recovery.
See the SQL Server errorlog for more information.
... i didn't find any useful information in the error log and looked in the
msdn articles and tried to reset the status using sp_resetstatus and didn't
helped. also tried to used the update to change the suspect flag status.
didn't helped
2. also tried to detach the database using the sp_detach_db and tried to
re-attach the particular db by using :
sp_attach_db @.dbname = N'RubyDB', @.filename1 = N'C:\Program Files\Microsoft
SQL Server\MSSQL$RUBYMSDEINSTANCE\Data\RubyDB_Data.MDF ', @.filename2 =
N'C:\Program Files\Microsoft SQL
Server\MSSQL$RUBYMSDEINSTANCE\Data\RubyDB_Log.LDF' ;
An got a message :
Msg 9003, Level 20, State 6, Server ADDSV1WD67Z461\RUBYMSDEINSTANCE, Line 1
The LSN (742:208:1) passed to log scan in database 'RubyDB' is invalid.
Please help me if there are any tools to analyze the database problem (in
the .mdf file) and a way to get back the data (at least in partial)...
Thanks in advance
Hari
"Got Backup?"
If you're against restoring from your last good backup for some reason, then
Google up on suspect databases. There are "unofficial" ways to reset
suspect databases. They're not 100% though, and you may end up having to
restore from backup anyway.
"Hari" <Hari@.discussions.microsoft.com> wrote in message
news:3AB6DE2D-FE0A-450C-A8CF-8E597C97ED5B@.microsoft.com...
> Hi,
> Iam looking for some tools or methods to recover a corrupted mdf file (SQL
> -MSDE 2000)..please help me and I have tried the following :
> 1. used osql to open the master database and run the DBCC checkdb with
> specified database name and given the following message :
> Database 'RubyDB' cannot be opened. It has been marked SUSPECT by
> recovery.
> See the SQL Server errorlog for more information.
> ... i didn't find any useful information in the error log and looked in
> the
> msdn articles and tried to reset the status using sp_resetstatus and
> didn't
> helped. also tried to used the update to change the suspect flag status.
> didn't helped
> 2. also tried to detach the database using the sp_detach_db and tried to
> re-attach the particular db by using :
> sp_attach_db @.dbname = N'RubyDB', @.filename1 = N'C:\Program
> Files\Microsoft
> SQL Server\MSSQL$RUBYMSDEINSTANCE\Data\RubyDB_Data.MDF ', @.filename2 =
> N'C:\Program Files\Microsoft SQL
> Server\MSSQL$RUBYMSDEINSTANCE\Data\RubyDB_Log.LDF' ;
> An got a message :
>
> Msg 9003, Level 20, State 6, Server ADDSV1WD67Z461\RUBYMSDEINSTANCE, Line
> 1
> The LSN (742:208:1) passed to log scan in database 'RubyDB' is invalid.
>
> Please help me if there are any tools to analyze the database problem (in
> the .mdf file) and a way to get back the data (at least in partial)...
>
> Thanks in advance
> Hari
>
|||Mike C# wrote:
> "Got Backup?"
>
What is this "backup" of which you speak? :-)
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Mike, could you give me more deatils on this unoffical way of resetting the
suspect database.
hari
"Mike C#" wrote:

> "Got Backup?"
> If you're against restoring from your last good backup for some reason, then
> Google up on suspect databases. There are "unofficial" ways to reset
> suspect databases. They're not 100% though, and you may end up having to
> restore from backup anyway.
> "Hari" <Hari@.discussions.microsoft.com> wrote in message
> news:3AB6DE2D-FE0A-450C-A8CF-8E597C97ED5B@.microsoft.com...
>
>
|||I haven't had to do it in a long time, but basically you try to trick SQL
Server into thinking the database is no longer suspect. As I mentioned, my
good buddies Larry Page and Sergey Brin have a ton of information on it over
at their website (GOOGLE.COM).
If you do get it to work, then I would recommend immediately copying
everything to a NEW database and immediately starting to take daily BACKUPS
so you don't have to go through this again.
"Hari" <Hari@.discussions.microsoft.com> wrote in message
news:BB4CE1FD-CC3C-4DFA-A1D2-6BA056CBFA79@.microsoft.com...[vbcol=seagreen]
> Mike, could you give me more deatils on this unoffical way of resetting
> the
> suspect database.
> hari
> "Mike C#" wrote:
|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AF77C7.8000807@.realsqlguy.com...
> Mike C# wrote:
> What is this "backup" of which you speak? :-)
It's them high-falutin' words I done heard the DBA's slangin' around the
uther day
On the plus side, nothing makes you start thinking about backups like losing
(or almost losing) a bunch of critical data because you didn't bother
backing it up in the first place

No comments:

Post a Comment