Home > Archive > MS SQL Server > October 2006 > detached db cant recover









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author detached db cant recover
Richard Douglass

2006-10-24, 6:30 pm

A genius here at work decided to detach a database because the disk the log
file was on was full. He copied the log to a different drive and now we
cant reattach the db. The db is 260 gig, the log us 70 gig. SQL Server
looks like it does the analysis to reattach in about 5 minutes then starts
what appears to be a 60 hour recovery cycle.

Is there anything I can do to speed this up? How can I truncate a detached
log??

Any ideas??

PLEASE HELP!
Richard


Kalen Delaney

2006-10-24, 6:30 pm

Hi Richard

Was the detach successful, as far as you know, i.e. no error messages
reported?
If so, you can try attaching without the log and have SQL Server build a new
one. Just change the name of the old log file so SQL Server can't find it,
and point to the primary file for the attach.

--
HTH
Kalen Delaney, SQL Server MVP


"Richard Douglass" <RDouglass@arisinc.com> wrote in message
news:ezShnrP3GHA.4024@TK2MSFTNGP03.phx.gbl...
>A genius here at work decided to detach a database because the disk the log
>file was on was full. He copied the log to a different drive and now we
>cant reattach the db. The db is 260 gig, the log us 70 gig. SQL Server
>looks like it does the analysis to reattach in about 5 minutes then starts
>what appears to be a 60 hour recovery cycle.
>
> Is there anything I can do to speed this up? How can I truncate a
> detached log??
>
> Any ideas??
>
> PLEASE HELP!
> Richard
>



Richard Douglass

2006-10-24, 6:30 pm

Ok That seems to be working but it is PAINFULLY slow.

Now I am getting these messages in the log. What the heck is going on??

SQL Server has encountered 13087 occurrence(s) of IO requests taking longer

than 15 seconds to complete on file & #91;G:\MSSQL\Data\en
vision_Data.MDF] in

database [envision] (7). The OS file handle is 0x0000055C. The offset of

the latest long IO is: 0x00000c83a76000



SQL Server has encountered 1 occurrence(s) of IO requests taking longer than

15 seconds to complete on file & #91;G:\MSSQL\Data\en
vision_Data.MDF] in database

[envision] (7). The OS file handle is 0x0000055C. The offset of the latest

long IO is: 0x00000c83a76000


"Richard Douglass" <RDouglass@arisinc.com> wrote in message
news:ezShnrP3GHA.4024@TK2MSFTNGP03.phx.gbl...
>A genius here at work decided to detach a database because the disk the log
>file was on was full. He copied the log to a different drive and now we
>cant reattach the db. The db is 260 gig, the log us 70 gig. SQL Server
>looks like it does the analysis to reattach in about 5 minutes then starts
>what appears to be a 60 hour recovery cycle.
>
> Is there anything I can do to speed this up? How can I truncate a
> detached log??
>
> Any ideas??
>
> PLEASE HELP!
> Richard
>



Hari Prasad

2006-10-24, 6:30 pm

Take a look into the below KB article.

http://support.microsoft.com/defaul...kb;en-us;897284

Thanks
Hari
SQL Server MVP

"Richard Douglass" <RDouglass@arisinc.com> wrote in message
news:%23lv8SaQ3GHA.4976@TK2MSFTNGP02.phx.gbl...
> Ok That seems to be working but it is PAINFULLY slow.
>
> Now I am getting these messages in the log. What the heck is going on??
>
> SQL Server has encountered 13087 occurrence(s) of IO requests taking
> longer
>
> than 15 seconds to complete on file & #91;G:\MSSQL\Data\en
vision_Data.MDF] in
>
> database [envision] (7). The OS file handle is 0x0000055C. The offset of
>
> the latest long IO is: 0x00000c83a76000
>
>
>
> SQL Server has encountered 1 occurrence(s) of IO requests taking longer
> than
>
> 15 seconds to complete on file & #91;G:\MSSQL\Data\en
vision_Data.MDF] in
> database
>
> [envision] (7). The OS file handle is 0x0000055C. The offset of the
> latest
>
> long IO is: 0x00000c83a76000
>
>
> "Richard Douglass" <RDouglass@arisinc.com> wrote in message
> news:ezShnrP3GHA.4024@TK2MSFTNGP03.phx.gbl...
>
>



Richard Douglass

2006-10-24, 6:30 pm

It just keeps going dowbn hill. Now the problem is that during recovery it
crashes with a primary key violation at abuot 9% complete. I am starting to
panic a little. Any ideas on this new error??

Thanks as ALWAYS!
Richard


"Richard Douglass" <RDouglass@arisinc.com> wrote in message
news:ezShnrP3GHA.4024@TK2MSFTNGP03.phx.gbl...
>A genius here at work decided to detach a database because the disk the log
>file was on was full. He copied the log to a different drive and now we
>cant reattach the db. The db is 260 gig, the log us 70 gig. SQL Server
>looks like it does the analysis to reattach in about 5 minutes then starts
>what appears to be a 60 hour recovery cycle.
>
> Is there anything I can do to speed this up? How can I truncate a
> detached log??
>
> Any ideas??
>
> PLEASE HELP!
> Richard
>



krishna

2006-10-24, 6:31 pm

richard

I had same kind of problem with small db when i was copying & attaching
files on different drive. transaction rollback happened.
( i dont know that time,the tlog was big)

Then I attached the original files as different dbname and took a
backup. Run checkpoint & backup before detaching db





Richard Douglass wrote:
> It just keeps going dowbn hill. Now the problem is that during recovery it
> crashes with a primary key violation at abuot 9% complete. I am starting to
> panic a little. Any ideas on this new error??
>
> Thanks as ALWAYS!
> Richard
>
>
> "Richard Douglass" <RDouglass@arisinc.com> wrote in message
> news:ezShnrP3GHA.4024@TK2MSFTNGP03.phx.gbl...
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com