Monday, March 12, 2012

log file 30GB

I would like to shrink the log file dbcc shrinkfile (abc_log,10) to 10MB
Before Shrinking the log file, what actions should be taken?
do i need checkpoint to make sure all transaction are comminted to data
file?Understand that SQL Server will not allow you to shrink the log file if it
still requires any data in there, so it's safe to shrink the file. It's the
truncate process you should be careful about. See
http://www.karaszi.com/sqlserver/info_dont_shrink.asp for some info on
shrinking log files.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Inamori" <test@.test.com> wrote in message
news:%23$jvZczrEHA.644@.tk2msftngp13.phx.gbl...
> I would like to shrink the log file dbcc shrinkfile (abc_log,10) to 10MB
> Before Shrinking the log file, what actions should be taken?
> do i need checkpoint to make sure all transaction are comminted to data
> file?
>|||that mean can i shrinkfile(abc_log, 1M)''
"Peter Yeoh" <nospam@.nospam.com> wrote in message
news:ONfC#hzrEHA.3876@.TK2MSFTNGP15.phx.gbl...
> Understand that SQL Server will not allow you to shrink the log file if it
> still requires any data in there, so it's safe to shrink the file. It's
the
> truncate process you should be careful about. See
> http://www.karaszi.com/sqlserver/info_dont_shrink.asp for some info on
> shrinking log files.
> --
> Peter Yeoh
> http://www.yohz.com
> Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
>
> "Inamori" <test@.test.com> wrote in message
> news:%23$jvZczrEHA.644@.tk2msftngp13.phx.gbl...
>|||Sure, if everything in that log file has been written to disk and there are
no active trxs at the end of the log file. SQL Server will ensure you do
not harm yourself performing a shrinkfile. But note Tibor's article: you
will probably fragment your log file badly if you constantly shrink it.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Inamori" <test@.test.com> wrote in message
news:ObuaSuzrEHA.3748@.TK2MSFTNGP09.phx.gbl...
> that mean can i shrinkfile(abc_log, 1M)''
>
> "Peter Yeoh" <nospam@.nospam.com> wrote in message
> news:ONfC#hzrEHA.3876@.TK2MSFTNGP15.phx.gbl...
it[vbcol=seagreen]
> the
10MB[vbcol=seagreen]
data[vbcol=seagreen]
>|||Are you interested in backups at all? Did you consider backing up the
database and seeing what happens after that?
http://www.aspfaq.com/
(Reverse address to reply.)
"Inamori" <test@.test.com> wrote in message
news:#$jvZczrEHA.644@.tk2msftngp13.phx.gbl...
> I would like to shrink the log file dbcc shrinkfile (abc_log,10) to 10MB
> Before Shrinking the log file, what actions should be taken?
> do i need checkpoint to make sure all transaction are comminted to data
> file?
>|||yes
i understand as follows
1. shrink only shrink something are inactive
2. No harm to data file
3. testing in testing environment
4. I will backup data file and log file first and shrink afterwards
5. even i want to shrink to 1M, i udnerstand actually it cannot if the log
data is active.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ePAtSZ0rEHA.1152@.TK2MSFTNGP11.phx.gbl...
> Are you interested in backups at all? Did you consider backing up the
> database and seeing what happens after that?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Inamori" <test@.test.com> wrote in message
> news:#$jvZczrEHA.644@.tk2msftngp13.phx.gbl...
>

No comments:

Post a Comment