Author |
Topic |
wkm1925
Posting Yak Master
207 Posts |
Posted - 2011-01-25 : 03:55:27
|
Hi,I've no experience to shrink log files. Based on reading, I would like to perform shrink command as followingDBCC SHRINKFILE (ST3DB_log, 1) WITH NO_INFOMSGS My question as following1. Did my shrink command is correct?2. Once Command(s) completed successfully, is that a guaranteed no any data is missing?Really looking for help |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-25 : 11:38:30
|
1. yes2. yes |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2011-01-25 : 15:50:30
|
Why do you want to shrink your log file? It is just going to grow again.Jeff |
|
|
X002548
Not Just a Number
15586 Posts |
|
wkm1925
Posting Yak Master
207 Posts |
Posted - 2011-01-25 : 22:54:22
|
Is that true, shrinking over & over is a very bad practice that leads to serious issuesSome people said, let alone just being a waste of processing time |
|
|
X002548
Not Just a Number
15586 Posts |
|
wkm1925
Posting Yak Master
207 Posts |
Posted - 2011-01-26 : 01:01:35
|
My MDF files is 22GB. My log files is 25GB. No regular maintenance at this moment |
|
|
Sachin.Nand
2937 Posts |
Posted - 2011-01-26 : 01:11:15
|
Have comprehensive log backup strategy which will keep the log file size in check.PBUH |
|
|
Sachin.Nand
2937 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2011-01-26 : 01:47:01
|
quote: Originally posted by wkm1925 Is that true, shrinking over & over is a very bad practice that leads to serious issuesSome people said, let alone just being a waste of processing time
Yes it's true that shrinking over and over is a very bad practice. It leads to file fragmentation, which affects performance. It's a waste of time to shrink if your database needs that space. But it does sound like your system isn't properly configured.What recovery model are you using? If it's not SIMPLE, then how often are you running transaction log backups?I have a feeling that the answer is going to be: FULL and none.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
|