Showing posts with label repair. Show all posts
Showing posts with label repair. Show all posts

Monday, March 19, 2012

HELP! How to repair corrupted database log file?

Hello folks,
Sorry if this has been asked before -- but I wonder if there is a check tool
that will fix/repair corrupted Db log file?
I cannot attach the database since it says the log file is corrupted.
I cannot use the DBCC checkdb script since the database is not attached to
the system tables.
I don't have any backups (they are corrupted)
HHHHHEEEEEEELLLLLPPPPP!!!!
Any advice is apprechiated!
DanDan,
If you have already or can detach the database using sp_detach_db then
reattach it using
sp_attach_single_file_db which will build a new log file. (Loses the data
in the log, of course.)
Russell Fields
"Microsoft News" <dant@.cdkkt.com> wrote in message
news:e3iTSAmmDHA.2424@.TK2MSFTNGP10.phx.gbl...
> Hello folks,
> Sorry if this has been asked before -- but I wonder if there is a check
tool
> that will fix/repair corrupted Db log file?
> I cannot attach the database since it says the log file is corrupted.
> I cannot use the DBCC checkdb script since the database is not attached to
> the system tables.
> I don't have any backups (they are corrupted)
> HHHHHEEEEEEELLLLLPPPPP!!!!
> Any advice is apprechiated!
> Dan
>|||did you try sp_attach_single_file_db ? Using this command
you can attach a datafile without logfile, sql server will
create a blank log file for you.
>--Original Message--
>Hello folks,
>Sorry if this has been asked before -- but I wonder if
there is a check tool
>that will fix/repair corrupted Db log file?
>I cannot attach the database since it says the log file
is corrupted.
>I cannot use the DBCC checkdb script since the database
is not attached to
>the system tables.
>I don't have any backups (they are corrupted)
>HHHHHEEEEEEELLLLLPPPPP!!!!
>Any advice is apprechiated!
>Dan
>
>.
>|||Thanks for responding...
I have tried to reattach using the sp_attach_single_file_db and I got back
an error:
The LSN (9731:1931:1) passed to log scan in database 'd110202' is invalid.
What does this mean'
Dan
"Microsoft News" <dant@.cdkkt.com> wrote in message
news:e3iTSAmmDHA.2424@.TK2MSFTNGP10.phx.gbl...
> Hello folks,
> Sorry if this has been asked before -- but I wonder if there is a check
tool
> that will fix/repair corrupted Db log file?
> I cannot attach the database since it says the log file is corrupted.
> I cannot use the DBCC checkdb script since the database is not attached to
> the system tables.
> I don't have any backups (they are corrupted)
> HHHHHEEEEEEELLLLLPPPPP!!!!
> Any advice is apprechiated!
> Dan
>|||Dan,
Your database d110202 did not have multiple log files did it?
Russell
"Dan Thurman" <dant@.cdkkt.com> wrote in message
news:%23JtdpNnmDHA.988@.TK2MSFTNGP10.phx.gbl...
> Thanks for responding...
> I have tried to reattach using the sp_attach_single_file_db and I got back
> an error:
> The LSN (9731:1931:1) passed to log scan in database 'd110202' is
invalid.
> What does this mean'
> Dan
> "Microsoft News" <dant@.cdkkt.com> wrote in message
> news:e3iTSAmmDHA.2424@.TK2MSFTNGP10.phx.gbl...
> > Hello folks,
> >
> > Sorry if this has been asked before -- but I wonder if there is a check
> tool
> > that will fix/repair corrupted Db log file?
> > I cannot attach the database since it says the log file is corrupted.
> >
> > I cannot use the DBCC checkdb script since the database is not attached
to
> > the system tables.
> >
> > I don't have any backups (they are corrupted)
> >
> > HHHHHEEEEEEELLLLLPPPPP!!!!
> >
> > Any advice is apprechiated!
> >
> > Dan
> >
> >
>

HELP! How to estimate the time it take...

to do a database repair on SQL server v7.
This is what I did
dbcc checkdb ('mydatabase', REPAIR_REBUILD) with estimateonly
It gave me error ...
estimateonly is not an option.
What did I do wrong? Thank you for your help!!!!!!!!!!It depends!|||What I want to do is to repair the database, but I want to
know ahead of time how long it will take.

Is there another way to do this?|||The ESTIMATEONLY clause was introduced in SQL-2000. If you are running SQL 7.0, that isn't a choice for you.

-PatP|||Thank you. Is there any way to estimate how long it
will take?|||There are ways, but the process usually runs very quickly and has zero impact on active users. I wouldn't worry about the time it will take because it isn't really significant... At least in my experience no one will realize you are running it, much less care.

-PatP|||It thought I have to change it to single-user mode in order to run dbcc checkdb

If I change it to single-user mode, only one user can use it.|||You CAN run it while database is in use, you'll just get a warning about "spureous" errors (check spelling, I am not sure).