Friday, March 9, 2012

Log file

SQL log file grew around 136Gb & I could not back it up.so I deleted it
without backup. I was told by my friend that it will recreate it
automatically as long as you have mdb file. Now i cannot recreate it and its
gives error messge. I tried attaching and sql query attaching single file but
none of the option works. Can someone suggest how to recover it. I only have
the original mdb file.Hitesh Patel wrote:
> SQL log file grew around 136Gb & I could not back it up.so I deleted
> it without backup. I was told by my friend that it will recreate it
> automatically as long as you have mdb file. Now i cannot recreate it
> and its gives error messge. I tried attaching and sql query attaching
> single file but none of the option works. Can someone suggest how to
> recover it. I only have the original mdb file.
What happens when you issue the sp_attach_single_file_db command?
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||You should have detahed the database first using sp_detach_db, and then
attach it without the log file. That would have worked.
Anyway, I think there are some undocumented DBCC commands that can add a log
file. But you really might want to contact Microsoft Support to sort out
this issue.
And then please make sure you select the appropriate recovery model for your
database, and that you have a backup plan as well.
--Vyas
"Hitesh Patel" <HiteshPatel@.discussions.microsoft.com> wrote in message
news:C8555A3B-4045-4FF6-A5D3-60C0C82F0959@.microsoft.com...
> SQL log file grew around 136Gb & I could not back it up.so I deleted it
> without backup. I was told by my friend that it will recreate it
> automatically as long as you have mdb file. Now i cannot recreate it and
> its
> gives error messge. I tried attaching and sql query attaching single file
> but
> none of the option works. Can someone suggest how to recover it. I only
> have
> the original mdb file.|||> You should have detahed the database first using sp_detach_db, and then
> attach it without the log file. That would have worked.
Unless the database has multiple log files. Hitesh should have use DBCC
SHRINKFILE to reduce the log file size.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uZJXPlxhFHA.3912@.tk2msftngp13.phx.gbl...
> You should have detahed the database first using sp_detach_db, and then
> attach it without the log file. That would have worked.
> Anyway, I think there are some undocumented DBCC commands that can add a
> log file. But you really might want to contact Microsoft Support to sort
> out this issue.
> And then please make sure you select the appropriate recovery model for
> your database, and that you have a backup plan as well.
> --Vyas
> "Hitesh Patel" <HiteshPatel@.discussions.microsoft.com> wrote in message
> news:C8555A3B-4045-4FF6-A5D3-60C0C82F0959@.microsoft.com...
>> SQL log file grew around 136Gb & I could not back it up.so I deleted it
>> without backup. I was told by my friend that it will recreate it
>> automatically as long as you have mdb file. Now i cannot recreate it and
>> its
>> gives error messge. I tried attaching and sql query attaching single file
>> but
>> none of the option works. Can someone suggest how to recover it. I only
>> have
>> the original mdb file.
>|||And please give your buddy a nice kick to the knee for giving such advice :-)
--
"Dan Guzman" wrote:
> > You should have detahed the database first using sp_detach_db, and then
> > attach it without the log file. That would have worked.
> Unless the database has multiple log files. Hitesh should have use DBCC
> SHRINKFILE to reduce the log file size.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:uZJXPlxhFHA.3912@.tk2msftngp13.phx.gbl...
> > You should have detahed the database first using sp_detach_db, and then
> > attach it without the log file. That would have worked.
> >
> > Anyway, I think there are some undocumented DBCC commands that can add a
> > log file. But you really might want to contact Microsoft Support to sort
> > out this issue.
> >
> > And then please make sure you select the appropriate recovery model for
> > your database, and that you have a backup plan as well.
> >
> > --Vyas
> >
> > "Hitesh Patel" <HiteshPatel@.discussions.microsoft.com> wrote in message
> > news:C8555A3B-4045-4FF6-A5D3-60C0C82F0959@.microsoft.com...
> >> SQL log file grew around 136Gb & I could not back it up.so I deleted it
> >> without backup. I was told by my friend that it will recreate it
> >> automatically as long as you have mdb file. Now i cannot recreate it and
> >> its
> >> gives error messge. I tried attaching and sql query attaching single file
> >> but
> >> none of the option works. Can someone suggest how to recover it. I only
> >> have
> >> the original mdb file.
> >
> >
>
>|||Thanks to everyone for sound advise. I have cotacted micorsoft support and
recovered the database. If any of you are intereseted, let me know i will
write the solution. its really useful to be a part of telented community.
"einman" wrote:
> And please give your buddy a nice kick to the knee for giving such advice :-)
> --
>
>
> "Dan Guzman" wrote:
> > > You should have detahed the database first using sp_detach_db, and then
> > > attach it without the log file. That would have worked.
> >
> > Unless the database has multiple log files. Hitesh should have use DBCC
> > SHRINKFILE to reduce the log file size.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> > news:uZJXPlxhFHA.3912@.tk2msftngp13.phx.gbl...
> > > You should have detahed the database first using sp_detach_db, and then
> > > attach it without the log file. That would have worked.
> > >
> > > Anyway, I think there are some undocumented DBCC commands that can add a
> > > log file. But you really might want to contact Microsoft Support to sort
> > > out this issue.
> > >
> > > And then please make sure you select the appropriate recovery model for
> > > your database, and that you have a backup plan as well.
> > >
> > > --Vyas
> > >
> > > "Hitesh Patel" <HiteshPatel@.discussions.microsoft.com> wrote in message
> > > news:C8555A3B-4045-4FF6-A5D3-60C0C82F0959@.microsoft.com...
> > >> SQL log file grew around 136Gb & I could not back it up.so I deleted it
> > >> without backup. I was told by my friend that it will recreate it
> > >> automatically as long as you have mdb file. Now i cannot recreate it and
> > >> its
> > >> gives error messge. I tried attaching and sql query attaching single file
> > >> but
> > >> none of the option works. Can someone suggest how to recover it. I only
> > >> have
> > >> the original mdb file.
> > >
> > >
> >
> >
> >

No comments:

Post a Comment