Shrink sql server 2000 log files




















Gail Shaw. It begs the question why it has been allowed to grow so large? This will truncate the log file but not shrink it.

Use the SHRINK commands posted already to reclaim the disk space, but try not to shrink db files regularly as this will increase fragmentation. If you are performing massive updates regularly, the log file will just grow large again and incur the overhead of having to grow the file again.

With regular log backups SQL Server should be able to reuse the space already assigned to the log file. If you never intend to use the logs to perform a Point-in-Time restore then consider changing the Recovery model of the db to "Simple". I should also mention that you should take regular backups of your transaction log to avoid this scenario again. If not, then fix that first. Assuming your T-Logs are being backed up regularly, and a backup was performed relatively recently, then what you need to do to reduce the log file or the main DB file is a [DBCC Shrinkfile][1] command.

And once you've done that, then you'll want to defrag your database, 'cos it'll be a mess. HOWEVER If your Log file keeps growing to that sort of size after you've shrunk it, then you'll need to re-evaluate the size of your file and your preconceptions about how big it should be.

Some tasks do have a big impact on the size of the log file - big insert or update operations, index rebuilds etc. Thanks Thomas here is the my senario we never take tran backups and we take full data base backup daily.

First step - set up regular tran log backups. Then, as I said, dbcc shrinkfile. Hi Thomas 1 If i take tran back up.. All the other posts here are excellent, but one thing to consider is putting the database in simple recovery mode before shrinking by if you do not need point in time recovery ability. Come for the solution, stay for everything else.

Welcome to our community! I need to shrink it down and control it's growth. It's on a GB drive with only 15GB free. The project is over for this year and I am only developing applications for it right now, so I can restart it or whatever right now without a problem. There's not enough space on the drive to make a backup of the full size log file and It's probabably not necessary to have a backup in this situation anyway.

What should I do to shrink the log file and keep it a reasonable size? What would a reasonable size be? It's just used to capture job applicants from a web form in one table and capture employers with worksites and jobs to fill in those respective three tables.

Each year, maybe applicants are added. There are currently records in the applicants table and just a few hundred records in each of the other tables.



0コメント

  • 1000 / 1000