Sunday, March 11, 2012

detached db cant recover

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!
RichardHi 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
>|||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 [G:\MSSQL\Data\envision_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 [G:\MSSQL\Data\envision_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
>|||Take a look into the below KB article.
http://support.microsoft.com/default.aspx?scid=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 [G:\MSSQL\Data\envision_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 [G:\MSSQL\Data\envision_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
>|||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
>|||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...
>> 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
>

No comments:

Post a Comment