Re: Will this shrinkfile method work?
- From: smzrkh@xxxxxxxxx
- Date: Wed, 10 Dec 2008 08:43:16 -0800 (PST)
On Dec 9, 7:21 pm, pbrill1 <pbri...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Thanks, Andrew -
Your response - and those to 2 other questions I posted with this yesterday
- have been very informative with understanding how to handle log files.
Thanks,
--
pbrill1
"Andrew J. Kelly" wrote:
You might want to look at using other consultants if that is the advice they
are giving:). There is no need to change the recovery model at all. As
long as you have issued a recent Log backup and there are no long running
open transactions you should be able to shrink the log in FULL recovery
mode. If the active VLF is near the end of the log file it may take a little
while for it to shrink but it will. Then if you issue regular log backups
and ensure there are no long running trans there should be no reason why it
will grow that large again.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"pbrill1" <pbri...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A1EB6C90-1C97-4694-A92D-AE3E1C248BCD@xxxxxxxxxxxxxxxx
We are running SQL2005 - and have a few databases with large log files
(the
biggest a 13GB datafile, with what is now a 24.5GB transaction log).
My ERP consultant gave us this method to shrink logfiles from our FULL
RECOVERY model. Will this work, or might I lose data by doing this?
STEPS TO SHRINK LOGFILE
1. Change the recovery model from FULL RECOVERY to SIMPLE
a. Since simple recovery model does not use transaction logs in the
recovery technique, it allows you to trucate the logfile
2. Right click the database, choose TASKS - SHRINK - DATABASE
3. Select OK on the restulting dialog box to shrink database.
4. A dialog box appears, showing the database has been shrunk.
5. Change the recovery model back to FULL.
Question: Will this work for a small database shop, or is there a chance
that I could lose data?
--
pbrill1- Hide quoted text -
- Show quoted text -
it's not a good idea to shrink a log file unless you absolutely have
to. if it grows again then it can fragment over multiple sections of
your disk and cause performance issues. the rule with SQL files is to
create them with as much white space as you can and leave it alone.
this way you have one contignous block of space on your hard disk that
it uses and it will cut down on your hard disk looking for the data.
.
- References:
- Will this shrinkfile method work?
- From: pbrill1
- Re: Will this shrinkfile method work?
- From: Andrew J. Kelly
- Re: Will this shrinkfile method work?
- From: pbrill1
- Will this shrinkfile method work?
- Prev by Date: RE: Linked server with mirrored database
- Next by Date: Re: installing Tools on Vista
- Previous by thread: Re: Will this shrinkfile method work?
- Next by thread: Testing Environment + TestData + QA Setup
- Index(es):
Relevant Pages
|
Loading