|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transaction LogHi guys,
I dont know if im in the right group. My scenario is like this. Transaction logs are eating up my server's hard drive. Almost 60% of my space is transaction log. What are these? Can I simply delete it? Can I compress this? Can someone explain this log file. Thank you in advance. Allan M. Grafil Allan M. Grafil wrote:
> Transaction logs are eating up my server's hard drive. Almost 60% of You need to backup the transaction log regularly or switch to simple> my space is transaction log. What are these? Can I simply delete it? > Can I compress this? Can someone explain this log file. recovery model. For more information, see: http://technet.microsoft.com/en-us/library/ms189275.aspx http://support.microsoft.com/kb/873235 -- Razvan Socol SQL Server MVP Too add Razvan's comment backup is the perfered manner; but I know some
people just simply truncate the logs and shink the or regular basis because they don't need to the point-of-failure restores. BACKUP LOG DBNAME WITH NO_LOG DBCC SHRINKFILE file, targetsize Thanks! -- Show quoteMohit K. Gupta B.Sc. CS, Minor Japanese MCTS: SQL Server 2005 "Razvan Socol" wrote: > Allan M. Grafil wrote: > > Transaction logs are eating up my server's hard drive. Almost 60% of > > my space is transaction log. What are these? Can I simply delete it? > > Can I compress this? Can someone explain this log file. > > You need to backup the transaction log regularly or switch to simple > recovery model. For more information, see: > http://technet.microsoft.com/en-us/library/ms189275.aspx > http://support.microsoft.com/kb/873235 > > -- > Razvan Socol > SQL Server MVP > Allan M. Grafil (agra***@hotmail.com) writes:
> I dont know if im in the right group. My scenario is like this. First of all: never, I repeat NEVER delete your log file.> Transaction logs are eating up my server's hard drive. Almost 60% of my > space is transaction log. What are these? Can I simply delete it? Can I > compress this? Can someone explain this log file. Next: decide, what level of recovery do you need? If your database goes belly-up, are you content with restoring the most recent backup, or do your business require up-to-the-point recovery? In the first case, run ALTER DATBASE db SET RECOVERY SIMPLE and run DBCC SHRINKFILE with a target size that is 20-25% of your data file. Please check Books Online for the exact case. With simple recovery, the transaction log is frequently truncated. You should still have some size to permit for huge transactions. If you make it too small, it will grow, but growing steals performance. If you need up-to-the-point recocvery, you need backup the transaction log regularly, probably at least as often as once an hour. If you don't back up the log, it just keeps growing. -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
|||||||||||||||||||||||