Hi All,
We need some help in reducing the size of our log files.
Our database has grown to 17gig and our log file is just over 12gig. Our database recovery model is "full".
We are running complete backups once a night, and also doing an hourly transaction log backup. I have tried right clicking the database in EM->all tasks->shrink database and specifically selected the log file and clicked ok, as well as just clicking ok, but there seems to be no effect.
Can anyone outline how to do this? From what I can tell, we are only using around 50Mb of the logfile and the rest is just empty space!
Thanks
Rajiv
Request clarification before answering.
Hi Rajiv
TransactionLog file of SQL Server 2005 can be truncated by following T-SQL.
USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
Please keep in mind:
1.a full backup should be done BEFORE and AFTER this operation.
2.It only works on SQL Server 2005.The TRUNCATE_ONLY has been
removed on SQL Server 2008.
The SQL Server 2008 is not supported for SBO yet though.
Regards,
Syn Qin
SAP Business One Forums Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 13 | |
| 9 | |
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.